//Drag and drop popup start
var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function loadwindowfly(url,width,height,left,top,len){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=0")

else{
document.getElementById("dwindowfly").style.display='';
document.getElementById("dwindowfly").style.width=initialwidth=width+"px"
document.getElementById("dwindowfly").style.height=initialheight=height+"px"
//document.getElementById("dwindowfly").style.top=ns6? window.pageYOffset*1+100+"px" : iecompattest().scrollTop*1+150+"px"
//document.getElementById("dwindowfly").style.top=top+"px"
document.getElementById("flycframe").src=url
	var tbox=document.getElementById("flydato");
    if(len == 0)
	   var pos=getElementPosition(tbox);
   else 
    var pos=getElementPositionfly(tbox);

	document.getElementById("dwindowfly").style.left=pos.x+"px";
	document.getElementById("dwindowfly").style.top=pos.y+"px";
   
}
}

function getElementPositionfly(theElement)
	{  var posX = 0;  var posY = 0;
	   while(theElement != null)
		   {    
		     posX += theElement.offsetLeft;    posY += theElement.offsetTop;    theElement = theElement.offsetParent; 
		   }  
		
         posX = parseInt(posX)-190; 
        //alert(posX);

	    return {x:posX,y: posY};
	    
	 }


function chgdate(){
    if(document.flyplushotel.fra.value=="0" | document.flyplushotel.til.value=="0" | document.flyplushotel.til.value == "") {
		document.getElementById("flydato").disabled=true;
		document.getElementById("imghref").disabled =true;
    } else { document.getElementById("flydato").disabled=false; 
	document.getElementById("imghref").disabled=false;	}
	document.getElementById("flydato").value="Avresedatum";

}
