var win; function popup(name,url,width,height,resize) { width=Math.min(width,screen.width); height=Math.min(height,screen.height); var winleft=(screen.width-width)/2; var wintop=(screen.height-height)/2; var properties="height="+height+",width="+width+",top="+wintop+",left="+winleft+",scrollbars=1"; if(resize) { properties+=",noresizable"; } win=window.open(url,name,properties); if(parseInt(navigator.appVersion)>=4) { win.window.focus(); } } function popup2(name, page, w, h, scroll) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; var winprop = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'; win = window.open(page,name,winprop); if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function closeWindow() { window.close(); }