	
            document.write('<iframe id=CalFrame name=CalFrame frameborder=0 src=/hotel/calendar/calendar.htm style=display:none;position:absolute;z-index:100></iframe>');
			document.onclick=hideCalendar;
 
 			function ShowCheckInCalendar(sInput, sInputName, sOutputName) {
			   var oInputname,oStartdate, oOutputName;
			   var CFrame=document.getElementById("CalFrame");
			   var WCFrame=window.frames.CalFrame;
  			   var oInput=document.getElementById(sInput);
  			   
  			   if(!oInput) {alert("Object does not exist");return;}
  			   
  			   if(!sInputName){alert("Input field does not exist");return;}
			   oInputname=document.getElementById(sInputName);
			   oOutputName=document.getElementById(sOutputName);
			   
			   if (CFrame.style.display=="block") {
			        CFrame.style.display="none";return;
			   }
			   
  			   var eT=0,eL=0,p=oInput;
  			   var sT=document.body.scrollTop,  sL=document.body.scrollLeft;
			   var eH=oInput.height, eW=oInput.width;
			    
			   while (p && p.tagName!="BODY") {
			        eT+=p.offsetTop;
			        eL+=p.offsetLeft;
			        p=p.offsetParent;
			   }
			   
			   CFrame.style.top=(document.body.clientHeight-(eT-sT)-eH>=CFrame.height)?eT+eH:eT-CFrame.height;		
			   CFrame.style.left=(document.body.clientWidth-(eL-sL)>=CFrame.width)?eL:eL+eW-CFrame.width;
			   
  			   CFrame.style.display="block";  //show frame of CalFrame
  			   
  			   //alert("oInputname=" + oInputname.name);
  			   
  			   WCFrame.oInputname=oInputname;
  			   WCFrame.oOutputName=oOutputName;
  			   
  			   WCFrame.initCalendar(); 
			}
			
			function ShowCalendar(sInput, sInputName) {
			   var oInputname,oStartdate;
			   var CFrame=document.getElementById("CalFrame");
			   var WCFrame=window.frames.CalFrame;
  			   var oInput=document.getElementById(sInput);
  			   if(!oInput) {alert("Object does not exist");return;}
  			   
  			   if(!sInputName){alert("Input field does not exist");return;}
			   oInputname=document.getElementById(sInputName);
			   
			   if (CFrame.style.display=="block") {
			        CFrame.style.display="none";return;
			   }
			   
  			   var eT=0,eL=0,p=oInput;
  			   var sT=document.body.scrollTop,  sL=document.body.scrollLeft;
			   var eH=oInput.height, eW=oInput.width;
			    
			   while (p && p.tagName!="BODY") {
			        eT+=p.offsetTop;
			        eL+=p.offsetLeft;
			        p=p.offsetParent;
			   }
			   
			   CFrame.style.top=(document.body.clientHeight-(eT-sT)-eH>=CFrame.height)?eT+eH:eT-CFrame.height;		
			   CFrame.style.left=(document.body.clientWidth-(eL-sL)>=CFrame.width)?eL:eL+eW-CFrame.width;
			   
  			   CFrame.style.display="block";  //show frame of CalFrame
  			   
  			   WCFrame.oInputname=oInputname;
  			   WCFrame.initCalendar(); 
			}
			
			function hideCalendar(){
				var CFrame=document.getElementById("CalFrame");
				CFrame.style.display="none";
			}

   
