var width,height
var image,ext
var cond1,cond2

function transferview(image,width,height,kuvaus) {
if (width==0) cond1=" "
else cond1="width="+(width+20)+"";
if (height==0) cond2=" ";
else cond2="height="+(height+70)+"";

var s1 ="<head><TITLE>Kuva</TITLE><link rel='stylesheet' type='text/css' href='tyylit_ki.css'></head>"
var s15="<BODY>"
var s2 ="<CENTER><IMG SRC='"+image+"' BORDER=1>"
var s2b ="<BR><p>"+kuvaus+"</p>"
var s3 ="<FORM><INPUT TYPE='BUTTON' VALUE='Sulje ikkuna'"+ " onClick='self.close()'>"
var s4 ="</FORM></CENTER></BODY>"

ImageWindow=window.open("", "newwin"+width,"toolbar=no,scrollbars="+scroll+",menubar=no,"+cond1+","+cond2);
ImageWindow.document.write(s1+s15+s2+s2b+s3+s4);
ImageWindow.document.close();
}