if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	window.attachEvent("onload", alphaBackgrounds);
}

function fnIntcptEnter(sButton,evt)
{
	var keyCode = evt.which ? evt.which : evt.keyCode;	
	if (keyCode==13)
	{
		try
		{		
			document.getElementById(sButton).focus();
			document.getElementById(sButton).click();			
			return false;
		}
		catch(e){}
	}
		
}

 function setCookie(name, value, expiry) {
  var today = new Date();
  //expiry = new Date(today.getTime() + 3 * 24 * 60 * 60 * 1000); 
  if (value != null && value != "")
    {
      if(expiry!=null) 
        {            
            document.cookie=name + "=" + escape(value) + ";path=/; expires=" + expiry.toGMTString();
        }
      else
        {
            document.cookie=name + "=" + escape(value) + ";path=/; ";
        }
      
    } 
    
  }
  
  function getCookie(name) { // use: getCookie("name");
    bikky= document.cookie;
    var index = bikky.indexOf(name + "=");
    if (index == -1) return null;
    index = bikky.indexOf("=", index) + 1;
    var endstr = bikky.indexOf(";", index);
    if (endstr == -1) endstr = bikky.length;
    return unescape(bikky.substring(index, endstr));
  }


function alphaBackgrounds(){
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	for (i=0; i<document.all.length; i++){
		var bg = document.all[i].currentStyle.backgroundImage;
		if (itsAllGood && bg){
			if (bg.match(/\.png/i) != null){
				var mypng = bg.substring(5,bg.length-2);
				document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
				document.all[i].style.backgroundImage = "url('images/x.gif')";
			}
		}
	}
}

if (window.addEventListener)
{
	window.addEventListener("load", fixLayout, false);
	window.addEventListener("resize", fixLayout, false);
}

function fixLayout()
{
	var d = document.getElementById("bgdiv");
	if (d)
	{
		d.style.minHeight = document.documentElement.clientHeight + "px";
	}
}

function expand(thistag){
   styleObj=document.getElementById(thistag).style;
   if(styleObj.display=='none'){styleObj.display='';}
   else {styleObj.display='none';}
}

function printpage(){  
    if (window.print) {
        window.print() ;  
    } else {
        var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
        WebBrowser1.ExecWB(6, 2);  
    }
    }

   function SetFocus() {
        document.getElementById('hdnCalBtnClicked').value = "1";
        document.getElementById('AvailAndBook1_txtDate').focus();
    }
