
timeout = 0; // Close window after __ number of seconds?  0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT, TITLE) {

var sw = screen.width;
var sh = screen.height;

	if (sw >= 800)
			{
            var x = ((sw-WIDTH)/2);
            var y = ((sh-HEIGHT)/2)-10;
			}
	else
			{
			var x = 0;
			var y = 0;
			}

windowprops = "left=0,top=0,scrollbars=yes,resizable=yes,width=" + (WIDTH) + ",height=" + (HEIGHT);
text = "<html><head><title>" + TITLE ;
if (timeout != 0) text +="  - closes after " + timeout + " sec.";
text +="</title><LINK REL=\"stylesheet\" href=\"css/zippo.css\" type=\"text/css\" media=\"screen\" title=\"Site Style\" /></head>";
text +="<body onload='self.focus();' bgcolor='000000'";
if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");top.window.focus();\"";
text += " leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'><div align=\"center\"><center>";
text += "<div class='navside' style=\"background-color:#666666;padding:2px;\"><a class='navside' href='javascript:void(0);' onclick='window.print();'>print this</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
text += "<a class='navside' href='javascript:void(0);' onclick='window.close();'>close window</a></div>";
text += "<img src='" + URL + "' width='" + WIDTH + "' height='" + HEIGHT + "' border='0'>";
text += "<div class='navside' style=\"background-color:#666666;padding:2px;\"><a class='navside' href='javascript:void(0);' onclick='window.print();'>print this</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
text += "<a class='navside' href='javascript:void(0);' onclick='window.close();'>close window</a></div>";
text += "</center></div></body></html>";
preview = window.open("", "preview", windowprops);
preview.moveTo(x,y);
preview.window.focus();
preview.document.open();
preview.document.write(text);
preview.document.close();
}

