var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5_M=document.all&&document.getElementById
var ns6_M=document.getElementById&&!document.all
function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function drag_drop(e){
if (ie5_M&&dragapproved&&event.button==1){
document.getElementById("dwindowMULTIMEDIA").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindowMULTIMEDIA").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6_M&&dragapproved){
document.getElementById("dwindowMULTIMEDIA").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindowMULTIMEDIA").style.top=tempy+e.clientY-offsety+"px"
}
}
function initializedrag(e){
offsetx=ie5_M? event.clientX : e.clientX
offsety=ie5_M? event.clientY : e.clientY
document.getElementById("dwindowcontentMULTIMEDIA").style.display="none"
tempx=parseInt(document.getElementById("dwindowMULTIMEDIA").style.left)
tempy=parseInt(document.getElementById("dwindowMULTIMEDIA").style.top)
dragapproved=true
document.getElementById("dwindowMULTIMEDIA").onmousemove=drag_drop
}
function loadwindow(url,width,height){
if (!ie5_M&&!ns6_M)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindowMULTIMEDIA").style.display=''
document.getElementById("dwindowMULTIMEDIA").style.width=initialwidth=width+"px"
document.getElementById("dwindowMULTIMEDIA").style.height=initialheight=height+"px"
document.getElementById("dwindowMULTIMEDIA").style.left="60px"
document.getElementById("dwindowMULTIMEDIA").style.top=ns6_M? window.pageYOffset*1+60+"px" : iecompattest().scrollTop*1+60+"px"
document.getElementById("cframeMULTIMEDIA").src=url
}
}
function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindowMULTIMEDIA").style.width=ns6_M? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindowMULTIMEDIA").style.height=ns6_M? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindowMULTIMEDIA").style.width=initialwidth
document.getElementById("dwindowMULTIMEDIA").style.height=initialheight
}
document.getElementById("dwindowMULTIMEDIA").style.left=ns6_M? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindowMULTIMEDIA").style.top=ns6_M? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}
function closeit(){
document.getElementById("dwindowMULTIMEDIA").style.display="none"
}
function stopdrag(){
dragapproved=false;
document.getElementById("dwindowMULTIMEDIA").onmousemove=null;
document.getElementById("dwindowcontentMULTIMEDIA").style.display="" //extra
}
document.writeln('<div id="dwindowMULTIMEDIA" style="position:absolute;cursor:hand;left:0px;top:0px;display:none;z-index:100" onMousedown="initializedrag(event)" onMouseup="stopdrag()" onSelectStart="return false">')
document.writeln('<div align="right" style="background-color:#000000"><a href="javascript:closeit()"><font size="2" face="Verdana" color="#FFFFFF"><b>CERRAR</font></b></a> <img src="http://www.colombia.com/images2/cerrar_vyf.gif" onClick="closeit()" align="absmiddle"></div>')
document.writeln('<div id="dwindowcontentMULTIMEDIA" style="height:100%">')
document.writeln('<iframe id="cframeMULTIMEDIA" src="" width=100% height=100% frameborder="0" scrolling="no"></iframe>')
document.writeln('</div>')
document.writeln('</div>')
