//DHTML Window script- Copyright Dynamic Drive (http://www.dynamicdrive.com) //For full source code, documentation, and terms of usage, //Visit http://www.dynamicdrive.com/dynamicindex9/dhtmlwindow.htm //var dragapproved=false //var minrestore=0 var initialwidth,initialheight var ie5=document.all&&document.getElementById var ns6=document.getElementById&&!document.all function iecompattest(){ return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function ipopup(url,width,height,title,popnum){ if (popnum == null) {popnum = 1}; var el_dwindow = document.getElementById("dwindow" + popnum); var el_cframe = document.getElementById("cframe" + popnum); var el_ipopTitle = document.getElementById("ipopTitle" + popnum); if (!ie5&&!ns6) window.open(url,"","width=width,height=height,scrollbars=1") else{ var windowwidth = ns6? window.innerWidth : iecompattest().document.body.clientWidth; var windowheight = ns6? window.innerHeight : iecompattest().document.body.clientHeight; //var winl = ((windowwidth-width)/2); //alert(windowwidth); //alert(width); var winl = (windowwidth/2) - (width/2) - 10; //alert(winl); var wint = ((windowheight-height)/2); el_dwindow.style.display='' el_dwindow.style.width=initialwidth=width+"px" el_dwindow.style.height=initialheight=height+"px" el_dwindow.style.left=winl+"px"; el_dwindow.style.top=ns6? window.pageYOffset*1+40+"px" : iecompattest().scrollTop*1+40+"px" document.getElementById(el_cframe.name).src=url //el_dwindow.style.zIndex="99"; el_ipopTitle.innerHTML=title; } } function closeit(popnum){ var el_dwindow = document.getElementById("dwindow" + popnum); el_dwindow.style.display="none" }