/* 
DFM Popup Windows Script                        
Version 1.0                                       
Copyright (c) 2004 UCHSC-DFM. All Rights Reserved.
*/

<!--
// Var close window after X number of seconds
// 0 = do not close, anything else = number of seconds to close window.
var closetime = 0;	

function Start(URL, WIDTH, HEIGHT) {
	windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ",scrollbars=yes";
	preview = window.open(URL, "preview", windowprops);
	if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup() {
	url = "report_summary.aspx";
	width = 600;  // width of window in pixels
	height = 400; // height of window in pixels
	delay = 2;    // time in seconds before popup opens
	timer = setTimeout("Start(url, width, height)", delay*1000);
}

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// -->
