timeout =30; 
// Close window after 30 of seconds
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + (WIDTH+100) + ",height=" + (HEIGHT+50);

text = "<html><head><title>Temple Gallery</title></head><body bgcolor='#ffffff'";

if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";

text += "><center><img src='" + URL + "'>";

if (timeout != 0) text +="<br><font face='verdana' size='-1'><b>This window closes after " + timeout + " seconds.</b></font>";

text += "</center></body></html>";

preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}


