closetime = 0;
// Close window after __ number of seconds
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=100,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=no";
preview = window.open(URL, "preview", windowprops);
preview.focus();
if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup(page,myWidth,myHeight) {
url = page;
width = myWidth; // width of window in pixels
height = myHeight; // height of window in pixels
delay = 0;    // time in seconds before popup opens
timer = setTimeout("Start(url, width, height)", delay*1000);
}