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 loadwindow(url,width,height){

popwidth=curwidth-(Math.round(curwidth/2)+368);

if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left=popwidth+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+100+"px" : iecompattest().scrollTop*1+100+"px"
document.getElementById("cframe").src=url
}
}

function resizeit()
{
	if (document.all){curwidth=(document.body.clientWidth);}else{curwidth=(window.innerWidth);}
	popwidth=curwidth-(Math.round(curwidth/2)+368);
	document.getElementById("dwindow").style.left=popwidth+"px";
	document.getElementById('overlaybase').style.width=(curwidth)+"px";

}

function closeit(){
document.getElementById("dwindow").style.display="none";
document.getElementById('overlaybase').style.display='none';
}
