//Calendar.js//
// JavaScript Document
function isPastDate(strDate) { var check_In=new Date(); check_In=new Date(strDate);  var strCurrentDate = new Date(date()); if(check_In<strCurrentDate) return true; else return false; }
 function frmSubmit() { var f= window.document.quicksearch; var intMon=parseInt(f.checkInMonth.options[f.checkInMonth.selectedIndex].value,10); var intDate=parseInt(f.checkInDay.options[f.checkInDay.selectedIndex].value,10); var intYear=parseInt(f.checkInYear.options[f.checkInYear.selectedIndex].value,10); var checkindate = new Date(intMon+"/"+intDate+"/"+intYear); var checkinday = checkindate.getDate(); f.checkInDate.value=checkinday; var checkinmonth = checkindate.getMonth(); var checkinyear = checkindate.getFullYear(); checkindate.setDate(checkindate.getDate()+parseInt(f.number_Nights.value)); MM2=checkindate.getMonth()+parseInt(1); YY2=checkindate.getFullYear(); DD2=checkindate.getDate();   f.checkInMonthYear.value = checkinmonth+""+checkinyear;   window.document.quicksearch.DateOut.value = window.document.quicksearch.MM2.value+"/"+window.document.quicksearch.DD2.value+"/"+window.document.quicksearch.YY2.value; window.document.quicksearch.checkOutFullDate.value=MM2+"/"+DD2+"/"+YY2;   if(isPastDate(intMon+"/"+intDate+"/"+intYear)) { alert("Check-IN Date can not be passed date."); f.checkInDay.focus(); return false; } else{ strEvent = "event1"; strText = "Home Page - " +"Reservation Widget"; var s=s_gi('thayintermiami');s.linkTrackVars='prop1,eVar1,events';s.events="'"+strEvent+"'";s.prop1=""+strText+"";s.eVar1=""+strText+"";s.tl(this,'o', ""+strText+""); } }
 function fnToday() { var strDate = new Date(); window.document.quicksearch.checkInMonth.value=strDate.getMonth()+parseInt(1); window.document.quicksearch.checkInDay.value=strDate.getDate(); window.document.quicksearch.checkInYear.value=strDate.getFullYear();  }   function lastday(mon, yr) { var start_date= new Date(yr, mon, 1); var end_date= new Date(yr, mon+1, 1); lday =( end_date - start_date); lday = lday/(24*60*60000); return lday; }  function idays(m,d,y) { lday=lastday(m.options[m.selectedIndex].value-1 ,     y.options[y.selectedIndex].value); d.length=lday;     for(i=0;i<lday;i++)     { d.options[i].text=i+1; d.options[i].value=i+1;     } }
///End Calendar.js///
//SWFobject.js//
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
//end swfobject.js//
///promo//
function submitPromo(){ var promoCodeEntered = document.forms['promo'].promocode.value; switch (promoCodeEntered) { case 'IBPHI': case 'ILCOC': case 'IPCHV': case 'IPDDT': case 'IPIBM': case 'IPPCW': case 'IPXOM': self.location = 'corporate/' + promoCodeEntered + '.html'; break; default: break; } }
function submitForm(){ b_valid = true; if(!htlDoaCal.returnSelectedDate("doa_yy","doa_mm","doa_dd")) b_valid = false; if(!htlDodCal.returnSelectedDate("dod_yy","dod_mm","dod_dd")) b_valid = false; return (b_valid); }
//END promo//
function showit(z){ if(z=="attract"){ document.getElementById('muse').style.display="none"; document.getElementById('rest').style.display="none"; document.getElementById('attract').style.display="block"; }		
if(z=="rest"){ document.getElementById('attract').style.display="none"; document.getElementById('muse').style.display="none"; document.getElementById('rest').style.display="block"; }				
if(z=="muse"){ document.getElementById('attract').style.display="none"; document.getElementById('rest').style.display="none";		 document.getElementById('muse').style.display="block"; } }

//Google//
try { var pageTracker = _gat._getTracker("UA-15979539-1"); pageTracker._trackPageview(); } catch(err) {}
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
//End Google//
//Boxover.js//
/* --- BoxOver ---
/* --- v 2.1 17th June 2006
By Oliver Bryant with help of Matthew Tagg
http://boxover.swazz.org */

if (typeof document.attachEvent!='undefined') {
   window.attachEvent('onload',init);
   document.attachEvent('onmousemove',moveMouse);
   document.attachEvent('onclick',checkMove); }
else {
   window.addEventListener('load',init,false);
   document.addEventListener('mousemove',moveMouse,false);
   document.addEventListener('click',checkMove,false);
}

var oDv=document.createElement("div");
var dvHdr=document.createElement("div");
var dvBdy=document.createElement("div");
var windowlock,boxMove,fixposx,fixposy,lockX,lockY,fixx,fixy,ox,oy,boxLeft,boxRight,boxTop,boxBottom,evt,mouseX,mouseY,boxOpen,totalScrollTop,totalScrollLeft;
boxOpen=false;
ox=10;
oy=10;
lockX=0;
lockY=0;

function init() {
	oDv.style.zIndex="1";
	oDv.appendChild(dvHdr);
	oDv.appendChild(dvBdy);
	oDv.style.position="absolute";
	oDv.style.visibility='hidden';
	document.body.appendChild(oDv);	
}

function defHdrStyle() {
	dvHdr.style.zIndex="1";
	dvHdr.innerHTML='<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;'+dvHdr.innerHTML;
	dvHdr.style.fontWeight='bold';
	dvHdr.style.width='150px';
	dvHdr.style.fontFamily='arial';
	dvHdr.style.border='1px solid #b9963a';
	dvHdr.style.padding='3';
	dvHdr.style.fontSize='11';
	dvHdr.style.color='#b9963a';
	dvHdr.style.background='#000000';
	dvHdr.style.filter='alpha(opacity=100)'; // IE
	dvHdr.style.opacity='1.00'; // FF
}

function defBdyStyle() {
	dvBdy.style.zIndex="1";
	dvBdy.style.borderBottom='1px solid #b9963a';
	dvBdy.style.borderLeft='1px solid #b9963a';
	dvBdy.style.borderRight='1px solid #b9963a';
	dvBdy.style.width='150px';
	dvBdy.style.fontFamily='arial';
	dvBdy.style.fontSize='11';
	dvBdy.style.padding='3';
	dvBdy.style.color='#1B4966';
	dvBdy.style.background='#FFFFFF';
	dvBdy.style.filter='alpha(opacity=100)'; // IE
	dvBdy.style.opacity='1.00'; // FF
}

function checkElemBO(txt) {
if (!txt || typeof(txt) != 'string') return false;
if ((txt.indexOf('header')>-1)&&(txt.indexOf('body')>-1)&&(txt.indexOf('[')>-1)&&(txt.indexOf('[')>-1)) 
   return true;
else
   return false;
}

function scanBO(curNode) {
	  if (checkElemBO(curNode.title)) {
         curNode.boHDR=getParam('header',curNode.title);
         curNode.boBDY=getParam('body',curNode.title);
			curNode.boCSSBDY=getParam('cssbody',curNode.title);			
			curNode.boCSSHDR=getParam('cssheader',curNode.title);
			curNode.IEbugfix=(getParam('hideselects',curNode.title)=='on')?true:false;
			curNode.fixX=parseInt(getParam('fixedrelx',curNode.title));
			curNode.fixY=parseInt(getParam('fixedrely',curNode.title));
			curNode.absX=parseInt(getParam('fixedabsx',curNode.title));
			curNode.absY=parseInt(getParam('fixedabsy',curNode.title));
			curNode.offY=(getParam('offsety',curNode.title)!='')?parseInt(getParam('offsety',curNode.title)):10;
			curNode.offX=(getParam('offsetx',curNode.title)!='')?parseInt(getParam('offsetx',curNode.title)):10;
			curNode.fade=(getParam('fade',curNode.title)=='on')?true:false;
			curNode.fadespeed=(getParam('fadespeed',curNode.title)!='')?getParam('fadespeed',curNode.title):0.04;
			curNode.delay=(getParam('delay',curNode.title)!='')?parseInt(getParam('delay',curNode.title)):0;
			if (getParam('requireclick',curNode.title)=='on') {
				curNode.requireclick=true;
				document.all?curNode.attachEvent('onclick',showHideBox):curNode.addEventListener('click',showHideBox,false);
				document.all?curNode.attachEvent('onmouseover',hideBox):curNode.addEventListener('mouseover',hideBox,false);
			}
			else {// Note : if requireclick is on the stop clicks are ignored   			
   			if (getParam('doubleclickstop',curNode.title)!='off') {
   				document.all?curNode.attachEvent('ondblclick',pauseBox):curNode.addEventListener('dblclick',pauseBox,false);
   			}	
   			if (getParam('singleclickstop',curNode.title)=='on') {
   				document.all?curNode.attachEvent('onclick',pauseBox):curNode.addEventListener('click',pauseBox,false);
   			}
   		}
			curNode.windowLock=getParam('windowlock',curNode.title).toLowerCase()=='off'?false:true;
			curNode.title='';
			curNode.hasbox=1;
	   }
	   else
	      curNode.hasbox=2;   
}


function getParam(param,list) {
	var reg = new RegExp('([^a-zA-Z]' + param + '|^' + param + ')\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]');
	var res = reg.exec(list);
	var returnvar;
	if(res)
		return res[2].replace('[[','[').replace(']]',']');
	else
		return '';
}

function Left(elem){	
	var x=0;
	if (elem.calcLeft)
		return elem.calcLeft;
	var oElem=elem;
	while(elem){
		 if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderLeftWidth)))&&(x!=0))
		 	x+=parseInt(elem.currentStyle.borderLeftWidth);
		 x+=elem.offsetLeft;
		 elem=elem.offsetParent;
	  } 
	oElem.calcLeft=x;
	return x;
	}

function Top(elem){
	 var x=0;
	 if (elem.calcTop)
	 	return elem.calcTop;
	 var oElem=elem;
	 while(elem){		
	 	 if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderTopWidth)))&&(x!=0))
		 	x+=parseInt(elem.currentStyle.borderTopWidth); 
		 x+=elem.offsetTop;
	         elem=elem.offsetParent;
 	 } 
 	 oElem.calcTop=x;
 	 return x;
 	 
}

var ah,ab;
function applyStyles() {
	if(ab)
		oDv.removeChild(dvBdy);
	if (ah)
		oDv.removeChild(dvHdr);
	dvHdr=document.createElement("div");
	dvBdy=document.createElement("div");
	CBE.boCSSBDY?dvBdy.className=CBE.boCSSBDY:defBdyStyle();
	CBE.boCSSHDR?dvHdr.className=CBE.boCSSHDR:defHdrStyle();
	dvHdr.innerHTML=CBE.boHDR;
	dvBdy.innerHTML=CBE.boBDY;
	dvHdr.style.zIndex="1";
	dvBdy.style.zIndex="1";
	ah=false;
	ab=false;
	if (CBE.boHDR!='') {		
		oDv.appendChild(dvHdr);
		ah=true;
	}	
	if (CBE.boBDY!=''){
		oDv.appendChild(dvBdy);
		ab=true;
	}	
}

var CSE,iterElem,LSE,CBE,LBE, totalScrollLeft, totalScrollTop, width, height ;
var ini=false;

// Customised function for inner window dimension
function SHW() {
   if (document.body && (document.body.clientWidth !=0)) {
      width=document.body.clientWidth;
      height=document.body.clientHeight;
   }
   if (document.documentElement && (document.documentElement.clientWidth!=0) && (document.body.clientWidth + 20 >= document.documentElement.clientWidth)) {
      width=document.documentElement.clientWidth;   
      height=document.documentElement.clientHeight;   
   }   
   return [width,height];
}


var ID=null;
function moveMouse(e) {
   //boxMove=true;
	e?evt=e:evt=event;
	
	CSE=evt.target?evt.target:evt.srcElement;
	
	if (!CSE.hasbox) {
	   // Note we need to scan up DOM here, some elements like TR don't get triggered as srcElement
	   iElem=CSE;
	   while ((iElem.parentNode) && (!iElem.hasbox)) {
	      scanBO(iElem);
	      iElem=iElem.parentNode;
	   }	   
	}
	
	if ((CSE!=LSE)&&(!isChild(CSE,dvHdr))&&(!isChild(CSE,dvBdy))){		
	   if (!CSE.boxItem) {
			iterElem=CSE;
			while ((iterElem.hasbox==2)&&(iterElem.parentNode))
					iterElem=iterElem.parentNode; 
			CSE.boxItem=iterElem;
			}
		iterElem=CSE.boxItem;
		if (CSE.boxItem&&(CSE.boxItem.hasbox==1))  {
			LBE=CBE;
			CBE=iterElem;
			if (CBE!=LBE) {
				applyStyles();
				if (!CBE.requireclick)
					if (CBE.fade) {
						if (ID!=null)
							clearTimeout(ID);
						ID=setTimeout("fadeIn("+CBE.fadespeed+")",CBE.delay);
					}
					else {
						if (ID!=null)
							clearTimeout(ID);
						COL=1;
						ID=setTimeout("oDv.style.visibility='visible';ID=null;",CBE.delay);						
					}
				if (CBE.IEbugfix) {hideSelects();} 
				fixposx=!isNaN(CBE.fixX)?Left(CBE)+CBE.fixX:CBE.absX;
				fixposy=!isNaN(CBE.fixY)?Top(CBE)+CBE.fixY:CBE.absY;			
				lockX=0;
				lockY=0;
				boxMove=true;
				ox=CBE.offX?CBE.offX:10;
				oy=CBE.offY?CBE.offY:10;
			}
		}
		else if (!isChild(CSE,dvHdr) && !isChild(CSE,dvBdy) && (boxMove))	{
			// The conditional here fixes flickering between tables cells.
			if ((!isChild(CBE,CSE)) || (CSE.tagName!='TABLE')) {   			
   			CBE=null;
   			if (ID!=null)
  					clearTimeout(ID);
   			fadeOut();
   			showSelects();
			}
		}
		LSE=CSE;
	}
	else if (((isChild(CSE,dvHdr) || isChild(CSE,dvBdy))&&(boxMove))) {
		totalScrollLeft=0;
		totalScrollTop=0;
		
		iterElem=CSE;
		while(iterElem) {
			if(!isNaN(parseInt(iterElem.scrollTop)))
				totalScrollTop+=parseInt(iterElem.scrollTop);
			if(!isNaN(parseInt(iterElem.scrollLeft)))
				totalScrollLeft+=parseInt(iterElem.scrollLeft);
			iterElem=iterElem.parentNode;			
		}
		if (CBE!=null) {
			boxLeft=Left(CBE)-totalScrollLeft;
			boxRight=parseInt(Left(CBE)+CBE.offsetWidth)-totalScrollLeft;
			boxTop=Top(CBE)-totalScrollTop;
			boxBottom=parseInt(Top(CBE)+CBE.offsetHeight)-totalScrollTop;
			doCheck();
		}
	}
	
	if (boxMove&&CBE) {
		// This added to alleviate bug in IE6 w.r.t DOCTYPE
		bodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
		bodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;
		mouseX=evt.pageX?evt.pageX-bodyScrollLet:evt.clientX-document.body.clientLeft;
		mouseY=evt.pageY?evt.pageY-bodyScrollTop:evt.clientY-document.body.clientTop;
		if ((CBE)&&(CBE.windowLock)) {
			mouseY < -oy?lockY=-mouseY-oy:lockY=0;
			mouseX < -ox?lockX=-mouseX-ox:lockX=0;
			mouseY > (SHW()[1]-oDv.offsetHeight-oy)?lockY=-mouseY+SHW()[1]-oDv.offsetHeight-oy:lockY=lockY;
			mouseX > (SHW()[0]-dvBdy.offsetWidth-ox)?lockX=-mouseX-ox+SHW()[0]-dvBdy.offsetWidth:lockX=lockX;			
		}
		oDv.style.left=((fixposx)||(fixposx==0))?fixposx:bodyScrollLet+mouseX+ox+lockX+"px";
		oDv.style.top=((fixposy)||(fixposy==0))?fixposy:bodyScrollTop+mouseY+oy+lockY+"px";		
		
	}
}

function doCheck() {	
	if (   (mouseX < boxLeft)    ||     (mouseX >boxRight)     || (mouseY < boxTop) || (mouseY > boxBottom)) {
		if (!CBE.requireclick)
			fadeOut();
		if (CBE.IEbugfix) {showSelects();}
		CBE=null;
	}
}

function pauseBox(e) {
   e?evt=e:evt=event;
	boxMove=false;
	evt.cancelBubble=true;
}

function showHideBox(e) {
	oDv.style.visibility=(oDv.style.visibility!='visible')?'visible':'hidden';
	oDv.style.zIndex="1";
}

function hideBox(e) {
	oDv.style.visibility='hidden';
}

var COL=0;
var stopfade=false;
function fadeIn(fs) {
		ID=null;
		COL=0;
		oDv.style.visibility='visible';
		oDv.style.zIndex="1";
		fadeIn2(fs);
}

function fadeIn2(fs) {
		COL=COL+fs;
		COL=(COL>1)?1:COL;
		oDv.style.filter='alpha(opacity='+parseInt(100*COL)+')';
		oDv.style.opacity=COL;
		oDv.style.zIndex="1";		
		if (COL<1)
		 setTimeout("fadeIn2("+fs+")",20);		
}


function fadeOut() {
	oDv.style.visibility='hidden';
	
}

function isChild(s,d) {
	while(s) {
		if (s==d) 
			return true;
		s=s.parentNode;
	}
	return false;
}

var cSrc;
function checkMove(e) {
	e?evt=e:evt=event;
	cSrc=evt.target?evt.target:evt.srcElement;
	if ((!boxMove)&&(!isChild(cSrc,oDv))) {
		fadeOut();
		if (CBE&&CBE.IEbugfix) {showSelects();}
		boxMove=true;
		CBE=null;
	}
}

function showSelects(){
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++){
      elements[i].style.visibility='visible';
   }
}

function hideSelects(){
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++){
   elements[i].style.visibility='hidden';
   }
}
//end boxover.js//
//cal.js//
	<!--
	var calCheckIn= new CalendarPopup("calendarCheckIn");
	calCheckIn.setReturnFunction("showDateCheckIn");
	calCheckIn.setDayHeaders('Su','M','Tu','W','Th','F','Sa');
	var offsetX=0;
	var offsetY=0;
	var bn=navigator.platform;
	var leftmargin=0;
	var scrheight=0;scrwidth=0;
	var bw=navigator.userAgent;
	var os="Win";
	var ie=false;
	var ns=false;
	var sf=false;
	var fx=false;
	var op=false;
	var mz=false;
//	alert(bw);
	scrheight =(window.screen.height);
	scrwidth =(window.screen.width);
	//alert("scrheight:" +scrheight +" scrwidth:" +scrwidth);
	//alert(bw);
	if(bn.indexOf("Win32")==-1){os="Mac";}
	if(bw.indexOf("Opera")!=-1)
	{op=true;}
	else if(bw.indexOf("Safari")!=-1)
	{sf=true;}
	else if(bw.indexOf("Firefox")!=-1)
	{fx=true;}
	else if(bw.indexOf("MSIE")!=-1)
	{ie=true;}
	else if(bw.indexOf("Netscape")!=-1 && bw.indexOf("Mozilla")!=-1)
	{ns=true;}
	else if(bw.indexOf("Mozilla")!=-1)
	{mz=true;}
	else
	{op=true;}
//cal one
	var pos=new Array(-248,0,-248,0,-248,0,-248,0,  		// win-ie 800x600;1024x768;1152x864;1280x720 
				      -248,0,-248,0,-248,0,-248,0, 	  		// win-op 800x600;1024x768;1152x864;1280x720
				      550,336,600,336,664,336,730,336,	// win-fx 800x600;1024x768;1152x864;1280x720 
				  	  550,336,600,336,664,336,730,336,	// win-ns 800x600;1024x768;1152x864;1280x720
				  	  550,336,600,336,664,336,730,336,	// win-mz 800x600;1024x768;1152x864;1280x720
					   
				     -250,-308,-296,-308,-364,-308,-426,-308,// mac-ie 800x600;1024x768;1152x864;1280x720 
					  -248,0,-248,0,-248,0,-248,0, 	           // mac-op 800x600;1024x768;1152x864;1280x720 
				      550,336,600,336,664,336,730,336,	// mac-fx 800x600;1024x768;1152x864;1280x720 
					  550,336,600,336,664,336,730,336,	// mac-ns 800x600;1024x768;1152x864;1280x720
					  550,336,600,336,664,336,730,336,
					  730,730,730);   // mac-sf 800x600;1024x768;1152x864;1280x720 			
	setPos(pos);

	function setPos(pos)
	{
		if(os=="Win")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800" && parseInt(scrheight)=="600") {offsetX=parseInt(pos[0]);offsetY=parseInt(pos[1]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[2]);offsetY=parseInt(pos[3]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[4]);offsetY=parseInt(pos[5]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				//alert("X:"+offsetX+"   Y:"+offsetY);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[8]);offsetY=parseInt(pos[9]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[10]);offsetY=parseInt(pos[11]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[12]);offsetY=parseInt(pos[13]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				//alert("X:"+offsetX+"   Y:"+offsetY);

			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[16]);offsetY=parseInt(pos[17]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[18]);offsetY=parseInt(pos[19]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[20]);offsetY=parseInt(pos[21]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[22]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[23]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
			else if(ns)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[24]);offsetY=parseInt(pos[25]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[26]);offsetY=parseInt(pos[27]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[28]);offsetY=parseInt(pos[29]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[30]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[31]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
			else if(mz)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[32]);offsetY=parseInt(pos[33]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[34]);offsetY=parseInt(pos[35]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[36]);offsetY=parseInt(pos[37]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[38]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[39]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
		}
		else if(os=="Mac")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[40]);offsetY=parseInt(pos[41]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[42]);offsetY=parseInt(pos[43]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[44]);offsetY=parseInt(pos[45]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[46]);offsetY=parseInt(pos[47]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[48]);offsetY=parseInt(pos[49]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[50]);offsetY=parseInt(pos[51]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[52]);offsetY=parseInt(pos[53]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[54]);offsetY=parseInt(pos[55]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[56]);offsetY=parseInt(pos[57]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[58]);offsetY=parseInt(pos[59]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[60]);offsetY=parseInt(pos[61]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[62]);offsetY=parseInt(pos[63]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(ns)
			{
				
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[64]);offsetY=parseInt(pos[65]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[66]);offsetY=parseInt(pos[67]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[68]);offsetY=parseInt(pos[69]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[70]);offsetY=parseInt(pos[71]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			
			else if(sf)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[72]);offsetY=parseInt(pos[73]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[74]);offsetY=parseInt(pos[75]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[76]);offsetY=parseInt(pos[77]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[78]);offsetY=parseInt(pos[79]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
		}
	}
	if(ie){ calCheckIn.offsetY = offsetY-185; 
	}else if(fx){
		calCheckIn.offsetY = offsetY-150; 
	}else{
		calCheckIn.offsetY = offsetY;
	}
	if(fx){ calCheckIn.offsetX = 0; }else{
		calCheckIn.offsetX = offsetX;
	}
	var calCheckOut= new CalendarPopup("calendarCheckOut");
	calCheckOut.setReturnFunction("showDateCheckOut");
	calCheckOut.setDayHeaders('Su','M','Tu','W','Th','F','Sa');
		
	if(ie){ calCheckOut.offsetY = offsetY-185; }else{
		calCheckOut.offsetY = offsetY;
	}
	if(fx){ calCheckOut.offsetX = 0; }else{
		calCheckOut.offsetX = offsetX;
	}
	
	//calCheckIn.offsetX = 0;
	//calCheckIn.offsetY = 35;
	function changeDate(varSelectedDate)
	{
		var takeDay = parseInt(varSelectedDate.value);
		var SelectedDate = new Date(window.document.quicksearch.checkInDate1.value);
		var dispDate=new Date(parseInt(SelectedDate.getMonth()+1,10) + "/" + (parseInt(SelectedDate.getDate()+takeDay)) + "/" + SelectedDate.getFullYear());
		var dispDay = dispDate.getDate();
		var dispMonth = parseInt(dispDate.getMonth()+1,10);
		var dispYear = dispDate.getFullYear();
		
		// display check out date
		window.document.quicksearch.checkOutDate1.value=dispMonth+"/"+dispDay+"/"+dispYear;
	}
	
	function showDateCheckIn(y,m,d)
	{
		// display check in date
		window.document.quicksearch.checkInDate1.value=m+"/"+d+"/"+y;
		var dispNights="";
		var dispDate="";
		var dispMonth ="";
		var dispYear ="";
		var iShowNights ;
		var SelectedDate = new Date(window.document.quicksearch.checkInDate1.value);
		var dtShowCheckOut =new Date(window.document.quicksearch.checkOutDate1.value);
		if (dtShowCheckOut<SelectedDate)
		{
			iShowNights = 1;
		}
		else
		{
			iShowNights = Math.ceil((dtShowCheckOut.getTime() - SelectedDate.getTime())/(1000*60*60*24));
			if (iShowNights > 30) 
			{
				iShowNights = 30;
			}
		}
		window.document.quicksearch.numberOfNights.value = iShowNights;
		dispNights=parseInt(window.document.quicksearch.numberOfNights.value);
		
		dispDate=new Date(parseInt(SelectedDate.getMonth()+1,10) + "/" + (SelectedDate.getDate()+dispNights) + "/" + SelectedDate.getFullYear());
		dispDay = dispDate.getDate();
		dispMonth = parseInt(dispDate.getMonth()+1,10);
		dispYear = dispDate.getFullYear();
		
		// display check out date
		
		window.document.quicksearch.checkOutDate1.value=dispMonth+"/"+dispDay+"/"+dispYear;
	}
	document.write(calCheckIn.getStyles());
	
	//calendar 2
	

	function calDatesNights()
	{
		var dtCheckIn = new Date(window.document.quicksearch.checkInDate1.value);
		var dtCheckOut = new Date(window.document.quicksearch.checkOutDate1.value);
		var iNights = Math.ceil((dtCheckOut.getTime() - dtCheckIn.getTime())/(1000*60*60*24));
		var displayNights = "";
		if ( dtCheckOut < dtCheckIn )
		{
			var showDate1=new Date(parseInt(dtCheckIn.getMonth()+1,10) + "/" + (dtCheckIn.getDate()+1) + "/" + dtCheckIn.getFullYear());
		    window.document.quicksearch.checkOutDate1.value=parseInt(showDate1.getMonth()+1,10)+"/"+showDate1.getDate()+"/"+showDate1.getFullYear();
			iNights = 1;
		}
		if (iNights > 30) 
		{
			displayNights = 30;
			var showDate=new Date(parseInt(dtCheckIn.getMonth()+1,10) + "/" + (dtCheckIn.getDate()+displayNights) + "/" + dtCheckIn.getFullYear());
		    window.document.quicksearch.checkOutDate1.value=parseInt(showDate.getMonth()+1,10)+"/"+showDate.getDate()+"/"+showDate.getFullYear();
		}
		else
		{
			displayNights = iNights;
		}
		window.document.quicksearch.numberOfNights.value = displayNights;
	}
	function showDateCheckOut(y,m,d)
	{
		/*window.document.quicksearch.checkOutMonth.value = m;
		window.document.quicksearch.checkOutDay.value = d;
		window.document.quicksearch.checkOutYear.value = y;*/
		window.document.quicksearch.checkOutDate1.value=m+"/"+d+"/"+y
		calDatesNights();
		
	}
	document.write(calCheckOut.getStyles());
	//-->
//end cal.js//
//calpos.js
// Common part Position Start Here 
var offsetX=0;
var offsetY=0;
var bn=navigator.platform;
var leftmargin=0;
var scrheight=0;scrwidth=0;
var bw=navigator.userAgent;
var os="Win";
var ie=false;
var ns=false;
var sf=false;
var fx=false;
var op=false;
var mz=false;
scrheight =(window.screen.height);
scrwidth =(window.screen.width);
//alert("scrheight:" +scrheight +" scrwidth:" +scrwidth);
//alert(bw);
if(bn.indexOf("Win32")==-1){os="Mac";}
if(bw.indexOf("Opera")!=-1)
{op=true;}
else if(bw.indexOf("Safari")!=-1)
{sf=true;}
else if(bw.indexOf("Firefox")!=-1)
{fx=true;}
else if(bw.indexOf("MSIE")!=-1)
{ie=true;}
else if(bw.indexOf("Netscape")!=-1 && bw.indexOf("Mozilla")!=-1)
{ns=true;}
else if(bw.indexOf("Mozilla")!=-1)
{mz=true;}
else
{op=true;}	

function setPos(pos)
{
	if(os=="Win")
	{
		if(ie)
		{//alert('ie');
			if(parseInt(scrwidth)=="800" && parseInt(scrheight)=="600") {offsetX=parseInt(pos[0]);offsetY=parseInt(pos[1]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[2]);offsetY=parseInt(pos[3]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[4]);offsetY=parseInt(pos[5]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[8]);offsetY=parseInt(pos[9]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[10]);offsetY=parseInt(pos[11]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[12]);offsetY=parseInt(pos[13]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
			
			//alert("X:"+offsetX+"   Y:"+offsetY);
		}
		else if(op)
		{//alert('op');
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[16]);offsetY=parseInt(pos[17]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[18]);offsetY=parseInt(pos[19]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[20]);offsetY=parseInt(pos[21]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[22]);offsetY=parseInt(pos[23]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[24]);offsetY=parseInt(pos[25]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[26]);offsetY=parseInt(pos[27]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[28]);offsetY=parseInt(pos[29]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[30]);offsetY=parseInt(pos[31]);}
			
			//alert("X:"+offsetX+"   Y:"+offsetY);
		}
		else if(fx)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[32]);offsetY=parseInt(pos[33]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[34]);offsetY=parseInt(pos[35]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[36]);offsetY=parseInt(pos[37]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[38]);offsetY=parseInt(pos[39]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[40]);offsetY=parseInt(pos[41]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[42]);offsetY=parseInt(pos[43]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[44]);offsetY=parseInt(pos[45]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[46]);offsetY=parseInt(pos[47]);}
			if(parseInt(scrwidth)=="1600" && parseInt(scrheight)=="900"){offsetX=parseInt(pos[123]);offsetY=parseInt(pos[124]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
		else if(ns)
		{//alert('ns');
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[48]);offsetY=parseInt(pos[49]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[50]);offsetY=parseInt(pos[51]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[52]);offsetY=parseInt(pos[53]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[54]);offsetY=parseInt(pos[55]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[56]);offsetY=parseInt(pos[57]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[58]);offsetY=parseInt(pos[59]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[60]);offsetY=parseInt(pos[61]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[62]);offsetY=parseInt(pos[63]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
		else if(mz)
		{//alert('mz');
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[64]);offsetY=parseInt(pos[65]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[66]);offsetY=parseInt(pos[67]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[68]);offsetY=parseInt(pos[69]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[70]);offsetY=parseInt(pos[71]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[72]);offsetY=parseInt(pos[73]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[74]);offsetY=parseInt(pos[75]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[76]);offsetY=parseInt(pos[77]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[78]);offsetY=parseInt(pos[79]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
	}
	else if(os=="Mac")
	{
		if(ie)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[81]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[83]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[84]);offsetY=parseInt(pos[85]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[86]);offsetY=parseInt(pos[87]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(op)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[88]);offsetY=parseInt(pos[89]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[90]);offsetY=parseInt(pos[91]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[92]);offsetY=parseInt(pos[93]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[94]);offsetY=parseInt(pos[95]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(fx)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[96]);offsetY=parseInt(pos[97]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[98]);offsetY=parseInt(pos[99]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[100]);offsetY=parseInt(pos[101]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[102]);offsetY=parseInt(pos[103]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(ns)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[104]);offsetY=parseInt(pos[105]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[106]);offsetY=parseInt(pos[107]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[108]);offsetY=parseInt(pos[109]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[110]);offsetY=parseInt(pos[111]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}

		else if(sf)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[112]);offsetY=parseInt(pos[113]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[114]);offsetY=parseInt(pos[115]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[116]);offsetY=parseInt(pos[117]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[118]);offsetY=parseInt(pos[119]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
	}
}

var pos=new Array(    800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,  		// win-ie 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-op 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				      800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-fx 800x600;1024x768;1152x864;1280x720(110,65,60);1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,  	// win-ns 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-mz 800x600;1024x768;1152x864;1280x720

				      800,600,1024,768,1152,864,1280,720,		// mac-ie 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720,            			// mac-op 800x600;1024x768;1152x864;1280x720
				      800,600,1024,768,1152,864,1280,720,   		// mac-fx 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720, 	    	// mac-ns 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720,
					  1280,1280,1280,900,1600);     						// mac-sf 800x600;1024x768;1152x864;1280x720
	setPos(pos);
//end calpos.js
//popupwindow.js//
function PopupWindow_getXYPosition(anchorname) {
	var coordinates;
	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
	this.x = coordinates.x;
	this.y = coordinates.y;
	}
// Set width/height of DIV/popup window
function PopupWindow_setSize(width,height) {
	this.width = width;
	this.height = height;
	}
// Fill the window with contents
function PopupWindow_populate(contents) {
	this.contents = contents;
	this.populated = false;
	}
// Refresh the displayed contents of the popup
function PopupWindow_refresh() {
	if (this.divName != null) {
		// refresh the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).innerHTML = this.contents;
			}
		else if (this.use_css) { 
			document.all[this.divName].innerHTML = this.contents;
			}
		else if (this.use_layers) { 
			var d = document.layers[this.divName]; 
			d.document.open();
			d.document.writeln(this.contents);
			d.document.close();
			}
		}
	else {
		if (this.popupWindow != null && !this.popupWindow.closed) {
			this.popupWindow.document.open();
			this.popupWindow.document.writeln(this.contents);
			this.popupWindow.document.close();
			}
		}
	}
// Position and show the popup, relative to an anchor object
function PopupWindow_showPopup(anchorname) {
	this.getXYPosition(anchorname);
	this.x += this.offsetX;
	this.y += this.offsetY;
	if (!this.populated && (this.contents != "")) {
		this.populated = true;
		this.refresh();
		}
	if (this.divName != null) {
		// Show the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).style.left = this.x;
			document.getElementById(this.divName).style.top = this.y;
			document.getElementById(this.divName).style.visibility = "visible";
			}
		else if (this.use_css) {
			document.all[this.divName].style.left = this.x;
			document.all[this.divName].style.top = this.y;
			document.all[this.divName].style.visibility = "visible";
			}
		else if (this.use_layers) {
			document.layers[this.divName].left = this.x;
			document.layers[this.divName].top = this.y;
			document.layers[this.divName].visibility = "visible";
			}
		}
	else {
		if (this.popupWindow == null || this.popupWindow.closed) {
			this.popupWindow = window.open("about:blank","window_"+anchorname,"toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no,width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
			}
		this.refresh();
		}
	}
// Hide the popup
function PopupWindow_hidePopup() {
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).style.visibility = "hidden";
			}
		else if (this.use_css) {
			document.all[this.divName].style.visibility = "hidden";
			}
		else if (this.use_layers) {
			document.layers[this.divName].visibility = "hidden";
			}
		}
	else {
		if (this.popupWindow && !this.popupWindow.closed) {
			this.popupWindow.close();
			this.popupWindow = null;
			}
		}
	}
// Pass an event and return whether or not it was the popup DIV that was clicked
function PopupWindow_isClicked(e) {
	if (this.divName != null) {
		if (this.use_layers) {
			var clickX = e.pageX;
			var clickY = e.pageY;
			var t = document.layers[this.divName];
			if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
				return true;
				}
			else { return false; }
			}
		else if (document.all) { // Need to hard-code this to trap IE for error-handling
			var t = window.event.srcElement;
			while (t.parentElement != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentElement;
				}
			return false;
			}
		else if (this.use_gebi) {
			var t = e.originalTarget;
			while (t.parentNode != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentNode;
				}
			return false;
			}
		return false;
		}
	return false;
	}

// Check an onMouseDown event to see if we should hide
function PopupWindow_hideIfNotClicked(e) {
	if (this.autoHideEnabled && !this.isClicked(e)) {
		this.hidePopup();
		}
	}
// Call this to make the DIV disable automatically when mouse is clicked outside it
function PopupWindow_autoHide() {
	this.autoHideEnabled = true;
	}
// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
function PopupWindow_hidePopupWindows(e) {
	for (var i=0; i<popupWindowObjects.length; i++) {
		if (popupWindowObjects[i] != null) {
			var p = popupWindowObjects[i];
			p.hideIfNotClicked(e);
			}
		}
	}
// Run this immediately to attach the event listener
function PopupWindow_attachListener() {
	if (document.layers) {
		document.captureEvents(Event.MOUSEUP);
		}
	window.popupWindowOldEventListener = document.onmouseup;
	if (window.popupWindowOldEventListener != null) {
		document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
		}
	else {
		document.onmouseup = PopupWindow_hidePopupWindows;
		}
	}
// CONSTRUCTOR for the PopupWindow object
// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
function PopupWindow() {
	if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
	if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
	if (!window.listenerAttached) {
		window.listenerAttached = true;
		PopupWindow_attachListener();
		}
	this.index = popupWindowIndex++;
	popupWindowObjects[this.index] = this;
	this.divName = null;
	this.popupWindow = null;
	this.width=0;
	this.height=0;
	this.populated = false;
	this.visible = false;
	this.autoHideEnabled = false;
	
	this.contents = "";
	if (arguments.length>0) {
		this.type="DIV";
		this.divName = arguments[0];
		}
	else {
		this.type="WINDOW";
		}
	this.use_gebi = false;
	this.use_css = false;
	this.use_layers = false;
	if (document.getElementById) { this.use_gebi = true; }
	else if (document.all) { this.use_css = true; }
	else if (document.layers) { this.use_layers = true; }
	else { this.type = "WINDOW"; }
	this.offsetX = 0;
	this.offsetY = 0;
	// Method mappings
	this.getXYPosition = PopupWindow_getXYPosition;
	this.populate = PopupWindow_populate;
	this.refresh = PopupWindow_refresh;
	this.showPopup = PopupWindow_showPopup;
	this.hidePopup = PopupWindow_hidePopup;
	this.setSize = PopupWindow_setSize;
	this.isClicked = PopupWindow_isClicked;
	this.autoHide = PopupWindow_autoHide;
	this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
	}
//end popupwindow.js//
//thayercalendarpopup.js
function CalendarPopup() {
	var newCalendar;
	if (arguments.length>0) {
		newCalendar = new PopupWindow(arguments[0]);
		}
	else {
		newCalendar = new PopupWindow();
		newCalendar.setSize(150,175);
		}
	newCalendar.offsetX = -152;
	newCalendar.offsetY = 25;
	newCalendar.autoHide();
	// Calendar-specific properties
	newCalendar.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	newCalendar.dayHeaders = new Array("S","M","T","W","T","F","S");
	newCalendar.returnFunction = "tmpReturnFunction";
	newCalendar.weekStartDay = 0;
	// Method mappings
	newCalendar.setReturnFunction = CalendarPopup_setReturnFunction;
	newCalendar.setMonthNames = CalendarPopup_setMonthNames;
	newCalendar.setDayHeaders = CalendarPopup_setDayHeaders;
	newCalendar.setWeekStartDay = CalendarPopup_setWeekStartDay;
	newCalendar.showCalendar = CalendarPopup_showCalendar;
	newCalendar.hideCalendar = CalendarPopup_hideCalendar;
	newCalendar.getStyles = CalendarPopup_getStyles;
	newCalendar.refreshCalendar = CalendarPopup_refreshCalendar;
	newCalendar.getCalendar = CalendarPopup_getCalendar;
	// Return the object
	return newCalendar;
	}

// Temporary default function to be called when a date is clicked, so no error is thrown
function CalendarPopup_tmpReturnFunction(y,m,d) {
	alert('Use setReturnFunction() to define which function will get the clicked results!');
	}

// Set the name of the function to call to get the clicked date
function CalendarPopup_setReturnFunction(name) {
	this.returnFunction = name;
	}

// Over-ride the built-in month names
function CalendarPopup_setMonthNames() {
	for (var i=0; i<arguments.length; i++) {
		this.monthNames[i] = arguments[i];
		}
	}

// Over-ride the built-in column headers for each day
function CalendarPopup_setDayHeaders() {
	for (var i=0; i<arguments.length; i++) {
		this.dayHeaders[i] = arguments[i];
		}
	}

// Set the day of the week (0-7) that the calendar display starts on
// This is for countries other than the US whose calendar displays start on Monday(1), for example
function CalendarPopup_setWeekStartDay(day) {
	this.weekStartDay = day;
	}

// Hide a calendar object
function CalendarPopup_hideCalendar() {
	if (arguments.length > 0) {
		window.popupWindowObjects[arguments[0]].hidePopup();
		}
	else {
		this.hidePopup();
		}
	}

// Refresh the contents of the calendar display
function CalendarPopup_refreshCalendar(index) {
	var calObject = window.popupWindowObjects[index];
	if (arguments.length>1) { 
		calObject.populate(calObject.getCalendar(arguments[1],arguments[2]));
		}
	else {
		calObject.populate(calObject.getCalendar());
		}
	calObject.refresh();
	}

// Populate the calendar and display it
function CalendarPopup_showCalendar(anchorname) {
	this.populate(this.getCalendar());
	this.showPopup(anchorname);
	}

// Get style block needed to display the calendar correctly
function CalendarPopup_getStyles() {
	var result = "";
	result += "<STYLE>\n";
	result += "TD.cal { font-family:arial; font-size: 8pt; }\n";
	result += "TD.calmonth { font-family:arial; font-size: 8pt; text-align: right;}\n";
	result += "TD.caltoday { font-family:arial; font-size: 8pt; text-align: right; color: red; border-width:1; border-type:solid; border-color:#800000; }\n";
	result += "A.cancel { font-family:arial; font-size: 8pt; height: 20px; color: gray; }\n";
	result += "A.cal { text-decoration:none; color:#000000; }\n";
	result += "A.calthismonth { text-decoration:none; color:#000000; font-weight: bold;}\n";
	result += "A.calothermonth { text-decoration:none; color:#808080; }\n";
	result += "</STYLE>\n";
	return result;
	}

// Return a string containing all the calendar code to be displayed
function CalendarPopup_getCalendar() {
	var now = new Date();
	if (arguments.length > 0) { var month = arguments[0]; }
		else { var month = now.getMonth()+1; }
	if (arguments.length > 1) { var year = arguments[1]; }
		else { var year = now.getFullYear(); }
	var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
	if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) { // leap year
		daysinmonth[2] = 29;
		}
	var current_month = new Date(year,month-1,1);
	var display_year = year;
	var display_month = month;
	var display_date = 1;
	var weekday= current_month.getDay();
	var offset = 0;
	if (weekday >= this.weekStartDay) {
		offset = weekday - this.weekStartDay;
		}
	else {
		offset = 7-this.weekStartDay+weekday;
		}
	if (offset > 0) {
		display_month--;
		if (display_month < 1) { display_month = 12; display_year--; }
		display_date = daysinmonth[display_month]-offset+1;
		}
	var next_month = month+1;
	var next_month_year = year;
	if (next_month > 12) { next_month=1; next_month_year++; }
	var last_month = month-1;
	var last_month_year = year;
	if (last_month < 1) { last_month=12; last_month_year--; }
	var date_class;
	var result = "";
	if (this.type == "WINDOW") {
		var windowref = "window.opener.";
		}
	else {
		var windowref = "";
		}
	// If POPUP, write entire HTML document
	if (this.type == "WINDOW") {
		result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
		result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';
		result += '<TR BGCOLOR="#99CCFF">\n';
		result += ' <TD BGCOLOR="#99CCFF" COLSPAN="3" VALIGN="MIDDLE"><A HREF="#" onClick="cal.hidePopup();return false;"><img src="http://www.thayerinteractive.com/images/calclose.gif" width="7" height="7" alt="" border="0"></a></TD>\n';
		result += '</TR>\n';
		}
	else {
		result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=1 BORDERCOLOR="#000000" CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">\n';
		// result += '<TR BGCOLOR="#99CCFF">\n';
		// result += ' <TD BGCOLOR="#99CCFF" COLSPAN="3" VALIGN="MIDDLE"><A HREF="#" onClick="cal.hidePopup();return false;"><img src="http://www.thayerinteractive.com/images/calclose.gif" alt="" border="0"></A></TD>\n';
		// result += '</TR>\n';
		result += '<TR><TD ALIGN=CENTER>\n';
		result += '<CENTER>\n';
		result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF">\n';
		}
	result += '<TR BGCOLOR="#FFFFFF" HEIGHT="15">\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+last_month+','+last_month_year+');"><img src="http://www.thayerinteractive.com/images/prevmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=100 ALIGN=CENTER>'+this.monthNames[month-1]+' '+year+'</TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+next_month+','+next_month_year+');"><img src="http://www.thayerinteractive.com/images/nextmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '</TR></TABLE>\n';
	result += '<TABLE WIDTH=120 BORDER=1 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
	result += '<TR BGCOLOR="#ffffff">\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+1)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+2)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+3)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+4)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+5)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+6)%7]+'</TD>\n';
	result += '</TR>\n';
	result += '<TR><TD COLSPAN=7 ALIGN=CENTER><IMG SRC="images/graypixel.gif" WIDTH=120 HEIGHT=1></TD></TR>\n';
	for (var row=1; row<=6; row++) {
		result += '<TR>\n';
		for (var col=1; col<=7; col++) {
			if (display_month == month) {
				date_class = "calthismonth";
				}
			else {
				date_class = "calothermonth";
				}
			if ((display_month == now.getMonth()+1) && (display_date==now.getDate()) && (display_year==now.getFullYear())) {
				td_class="caltoday";
				}
			else {
				td_class="calmonth";
				}
			result += '	<TD CLASS="'+td_class+'" ALIGN="CENTER"><A HREF="javascript:'+windowref+this.returnFunction+'('+display_year+','+display_month+','+display_date+');'+windowref+'CalendarPopup_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+display_date+'</A></TD>\n';
			display_date++;
			if (display_date > daysinmonth[display_month]) {
				display_date=1;
				display_month++;
				}
			if (display_month > 12) {
				display_month=1;
				display_year++;
				}
			}
		result += '</TR>';
		}
	result += '<TR><TD COLSPAN=7 ALIGN=CENTER><IMG SRC="images/graypixel.gif" WIDTH=120 HEIGHT=1></TD></TR>\n';
	result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF">\n';
	result += '<TR BGCOLOR="#ffffff" HEIGHT="15">\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+last_month+','+last_month_year+');"><img src="http://www.thayerinteractive.com/images/prevmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=100 ALIGN=CENTER></TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+next_month+','+next_month_year+');"><img src="http://www.thayerinteractive.com/images/nextmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '</TR></TABLE>\n';
	// result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
	// result += '<TR>\n';
	// result += '	<TD COLSPAN=7 ALIGN=CENTER>\n';
	// result += '		<A HREF="#" class="cancel" onClick="cal.hidePopup();return false;">Cancel</A>\n';
	// result += '		<BR>\n';
	// result += '	</TD></TR></TABLE>';
	result += '	</CENTER></TD></TR></TABLE>\n';
	if (this.type == "WINDOW") {
		result += "</BODY></HTML>\n";
		}
	return result;
	}
//end//
//anchorposition.js//
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var coordinates = new Object();
	var x=0;
	var y=0;
	// Browser capability sniffing
	var use_gebi = false;
	var use_css = false;
	var use_layers = false;
	if (document.getElementById) { use_gebi = true; }
	else if (document.all) { use_css = true; }
	else if (document.layers) { use_layers = true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o = document.getElementById(anchorname);
		x = o.offsetLeft;
		y = o.offsetTop;
		}
 	else if (use_css) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name == anchorname) {
				found=1;
				break;
				}
			}
		if (found == 0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x = document.anchors[i].x;
		y = document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates = getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x = coordinates.x + window.screenLeft;
			y = coordinates.y + window.screenTop;
			}
		else {
			x = coordinates.x + window.screenX + (window.outerWidth-window.innerWidth) - window.pageXOffset;
			y = coordinates.y + window.screenY + (window.outerHeight-24-window.innerHeight) - window.pageYOffset;
			}
		}
	else if (document.all) {
		x = coordinates.x + window.screenLeft;
		y = coordinates.y + window.screenTop;
		}
	else if (document.layers) {
		x = coordinates.x + window.screenX + (window.outerWidth-window.innerWidth) - window.pageXOffset;
		y = coordinates.y + window.screenY + (window.outerHeight-24-window.innerHeight) - window.pageYOffset;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol = el.offsetLeft;
	while ((el = el.offsetParent) != null) { 
		ol += el.offsetLeft; 
		}
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	var scrollamount = document.body.scrollLeft;
	return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot = el.offsetTop;
	while((el = el.offsetParent) != null) { 
		ot += el.offsetTop; 
		}
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	var scrollamount = document.body.scrollTop;
	return AnchorPosition_getPageOffsetTop(el)-scrollamount;
	}
