//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 dragapp=false
var mrest=0
var initw,inith
var ie5c=document.all&&document.getElementById
var ns6c=document.getElementById&&!document.all

function ietester(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_dropE(e){
if (ie5c&&dragapp&&event.button==1){
document.getElementById("enlargeWindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("enlargeWindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6c&&dragapp){
document.getElementById("enlargeWindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("enlargeWindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedragE(e){
offsetx=ie5c? event.clientX : e.clientX
offsety=ie5c? event.clientY : e.clientY
document.getElementById("enlargeWindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("enlargeWindow").style.left)
tempy=parseInt(document.getElementById("enlargeWindow").style.top)

document.getElementById("enlargeWindow").style.border='2px dashed black'

dragapp=true
document.getElementById("enlargeWindow").onmousemove=drag_dropE
}

function loadenlargeWindow(height,width){

document.getElementById("enlargeWindow").style.display=''
document.getElementById("enlargeWindow").style.width=initw=width+"px"
document.getElementById("enlargeWindow").style.height=inith=height+"px"
document.getElementById("enlargeWindow").style.left="30px"
document.getElementById("enlargeWindow").style.top=ns6c? window.pageYOffset*1+30+"px" : ietester().scrollTop*1+30+"px"

}

function maximizeE(){
if (mrest==0){
mrest=1 //maximize window
document.getElementById("maxnameE").setAttribute("src","http://www.cevado.com/gmap/images/min.gif")
document.getElementById("enlargeWindow").style.width=ns6c? window.innerWidth-20+"px" : ietester().clientWidth+"px"
document.getElementById("enlargeWindow").style.height=ns6c? window.innerHeight-20+"px" : ietester().clientHeight+"px"
}
else{
mrest=0 //restore window
document.getElementById("maxnameE").setAttribute("src","http://www.cevado.com/gmap/images/max.gif")
document.getElementById("enlargeWindow").style.width=initw
document.getElementById("enlargeWindow").style.height=inith
}
document.getElementById("enlargeWindow").style.left=ns6c? window.pageXOffset+"px" : ietester().scrollLeft+"px"
document.getElementById("enlargeWindow").style.top=ns6c? window.pageYOffset+"px" : ietester().scrollTop+"px"
}

function closeitE(){
document.getElementById("enlargeWindow").style.display="none"
}

function stopdragE(){
dragapp=false;
document.getElementById("enlargeWindow").onmousemove=null;
document.getElementById("enlargeWindow").style.border='none'
document.getElementById("enlargeWindowcontent").style.display="" //extra
}
