function errorsuppressor(){window.status='JavaScript Error';return true;}
function confirmAction(){return confirm("THIS ACTION WILL DELETE THIS COMPLETELY..\n\nClick OK to DELETE!\nClick Cancel to ABORT!")}
function go(box){var val=box.options[box.selectedIndex].value;if(val !=""){window.location.href=val;}}
function OpenWindow(page){var cal=window.open(page,"popup","directories=no,height=400,location=no,menubar=no,scrollbars=yes,status=no,resizable=1,width=500");}
function PopUp(URL,Window,w,h,x,y){var popupwin=window.open(URL,Window,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+w+",height="+h+",left="+x+",top="+y);}
function OpenTest(){PopUp('/testimonials.asp','Test','590','360','10','10');}
function Jump(Location){opener.location.href=Location;window.close()}
function newImage(arg){if(document.images){rslt=new Image();rslt.src=arg;return rslt;}}
function changeImages(){if(document.images){for(var i=0;i<changeImages.arguments.length;i+=2){document[changeImages.arguments[i]].src=changeImages.arguments[i+1];}}}
function Browser(){var ua,s,i;this.isIE=false;this.isOP=false;this.isNS=false;this.version=null;ua=navigator.userAgent;s="Opera";if((i=ua.indexOf(s))>=0){this.isOP=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Netscape6/";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Gecko";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=6.1;return;}
s="MSIE";if((i=ua.indexOf(s))){this.isIE=true;this.version=parseFloat(ua.substr(i+s.length));return;}}
var browser=new Browser();var activeButton=null;function buttonClick(event,menuId){var button;if(browser.isIE)
button=window.event.srcElement;else
button=event.currentTarget;button.blur();if(button.menu==null){button.menu=document.getElementById(menuId);if(button.menu.isInitialized==null)
menuInit(button.menu);}
if(button.onmouseout==null)
button.onmouseout=buttonOrMenuMouseout;if(button==activeButton)
return false;if(activeButton !=null)
resetButton(activeButton);if(button !=activeButton){depressButton(button);activeButton=button;}else
activeButton=null;return false;}
function buttonMouseover(event,menuId){var button;if(activeButton==null){buttonClick(event,menuId);return;}
if(browser.isIE)
button=window.event.srcElement;else
button=event.currentTarget;if(activeButton !=null&&activeButton !=button)
buttonClick(event,menuId);}
function depressButton(button){var x,y;button.className+=" menuButtonActive";if(button.onmouseout==null)
button.onmouseout=buttonOrMenuMouseout;if(button.menu.onmouseout==null)
button.menu.onmouseout=buttonOrMenuMouseout;x=getPageOffsetLeft(button);y=getPageOffsetTop(button)+button.offsetHeight;if(browser.isIE){x+=button.offsetParent.clientLeft;y+=button.offsetParent.clientTop;}
button.menu.style.left=x-2+"px";button.menu.style.top=y-1+"px";button.menu.style.visibility="visible";}
function resetButton(button){removeClassName(button,"menuButtonActive");if(button.menu !=null){closeSubMenu(button.menu);button.menu.style.visibility="hidden";}}
function menuMouseover(event){var menu;if(browser.isIE)
menu=getContainerWith(window.event.srcElement,"DIV","menu");else
menu=event.currentTarget;if(menu.activeItem !=null)
closeSubMenu(menu);}
function menuItemMouseover(event,menuId){var item,menu,x,y;if(browser.isIE)
item=getContainerWith(window.event.srcElement,"A","menuItem");else
item=event.currentTarget;menu=getContainerWith(item,"DIV","menu");if(menu.activeItem !=null)
closeSubMenu(menu);menu.activeItem=item;item.className+=" menuItemHighlight";if(item.subMenu==null){item.subMenu=document.getElementById(menuId);if(item.subMenu.isInitialized==null)
menuInit(item.subMenu);}
if(item.subMenu.onmouseout==null)
item.subMenu.onmouseout=buttonOrMenuMouseout;x=getPageOffsetLeft(item)+item.offsetWidth;y=getPageOffsetTop(item);var maxX,maxY;if(browser.isIE){maxX=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)+(document.documentElement.clientWidth !=0?document.documentElement.clientWidth:document.body.clientWidth);maxY=Math.max(document.documentElement.scrollTop,document.body.scrollTop)+(document.documentElement.clientHeight !=0?document.documentElement.clientHeight:document.body.clientHeight);}
if(browser.isOP){maxX=document.documentElement.scrollLeft+window.innerWidth;maxY=document.documentElement.scrollTop+window.innerHeight;}
if(browser.isNS){maxX=window.scrollX+window.innerWidth;maxY=window.scrollY+window.innerHeight;}
maxX-=item.subMenu.offsetWidth;maxY-=item.subMenu.offsetHeight;if(x>maxX)
x=Math.max(0,x-item.offsetWidth-item.subMenu.offsetWidth+(menu.offsetWidth-item.offsetWidth));y=Math.max(0,Math.min(y,maxY));item.subMenu.style.left=x+"px";item.subMenu.style.top=y+"px";item.subMenu.style.visibility="visible";if(browser.isIE)
window.event.cancelBubble=true;else
event.stopPropagation();}
function closeSubMenu(menu){if(menu==null||menu.activeItem==null)
return;if(menu.activeItem.subMenu !=null){closeSubMenu(menu.activeItem.subMenu);menu.activeItem.subMenu.style.visibility="hidden";menu.activeItem.subMenu=null;}
removeClassName(menu.activeItem,"menuItemHighlight");menu.activeItem=null;}
function buttonOrMenuMouseout(event){var el;if(activeButton==null)
return;if(browser.isIE)
el=window.event.toElement;else if(event.relatedTarget !=null)
el=(event.relatedTarget.tagName?event.relatedTarget:event.relatedTarget.parentNode);if(getContainerWith(el,"DIV","menu")==null){resetButton(activeButton);activeButton=null;}}
function menuInit(menu){var itemList,spanList;var textEl,arrowEl;var itemWidth;var w,dw;var i,j;if(browser.isIE){menu.style.lineHeight="2.5ex";spanList=menu.getElementsByTagName("SPAN");for(i=0;i<spanList.length;i++)
if(hasClassName(spanList[i],"menuItemArrow")){spanList[i].style.fontFamily="Webdings";spanList[i].firstChild.nodeValue="4";}}
itemList=menu.getElementsByTagName("A");if(itemList.length>0)
itemWidth=itemList[0].offsetWidth;else
return;for(i=0;i<itemList.length;i++){spanList=itemList[i].getElementsByTagName("SPAN");textEl=null;arrowEl=null;for(j=0;j<spanList.length;j++){if(hasClassName(spanList[j],"menuItemText"))
textEl=spanList[j];if(hasClassName(spanList[j],"menuItemArrow"))
arrowEl=spanList[j];}
if(textEl !=null&&arrowEl !=null){textEl.style.paddingRight=(itemWidth
-(textEl.offsetWidth+arrowEl.offsetWidth))+"px";if(browser.isOP)
arrowEl.style.marginRight="0px";}}
if(browser.isIE){w=itemList[0].offsetWidth;itemList[0].style.width=w+"px";dw=itemList[0].offsetWidth-w;w-=dw;itemList[0].style.width=w+"px";}
menu.isInitialized=true;}
function getContainerWith(node,tagName,className){while(node !=null){if(node.tagName !=null&&node.tagName==tagName&&hasClassName(node,className))
return node;node=node.parentNode;}
return node;}
function hasClassName(el,name){var i,list;list=el.className.split(" ");for(i=0;i<list.length;i++)
if(list[i]==name)
return true;return false;}
function removeClassName(el,name){var i,curList,newList;if(el.className==null)
return;newList=new Array();curList=el.className.split(" ");for(i=0;i<curList.length;i++)
if(curList[i]!=name)
newList.push(curList[i]);el.className=newList.join(" ");}
function getPageOffsetLeft(el){var x;x=el.offsetLeft;if(el.offsetParent !=null)
x+=getPageOffsetLeft(el.offsetParent);return x;}
function getPageOffsetTop(el){var y;y=el.offsetTop;if(el.offsetParent !=null)
y+=getPageOffsetTop(el.offsetParent);return y;}
function isEmailAddr(email){var result=false;var theStr=new String(email);var index=theStr.indexOf("@");if(index>0){var pindex=theStr.indexOf(".",index);if((pindex>index+1)&&(theStr.length>pindex+1))
result=true;}
return result;}
function validRequired(formField,fieldLabel){var result=true;if(formField.value==""){alert('Please enter a value for the "'+fieldLabel+'" field.');formField.focus();result=false;}
return result;}
function allDigits(str){return inValidCharSet(str,"0123456789");}
function inValidCharSet(str,charset){var result=true;for(var i=0;i<str.length;i++)
if(charset.indexOf(str.substr(i,1))<0){result=false;break;}
return result;}
function validEmail(formField,fieldLabel,required){var result=true;if(required&&!validRequired(formField,fieldLabel))
result=false;if(result&&((formField.value.length<3)||!isEmailAddr(formField.value))){alert("Please enter a complete email address in the form: yourname@yourdomain.com");formField.focus();result=false;}
return result;}
function validNum(formField,fieldLabel,required){var result=true;if(required&&!validRequired(formField,fieldLabel))
result=false;if(result){if(!allDigits(formField.value)){alert('Please enter a number for the "'+fieldLabel+'" field.');formField.focus();result=false;}}
return result;}
function validInt(formField,fieldLabel,required){var result=true;if(required&&!validRequired(formField,fieldLabel))
result=false;if(result){var num=parseInt(formField.value,10);if(isNaN(num)){alert('Please enter a number for the "'+fieldLabel+'" field.');formField.focus();result=false;}}
return result;}
function validDate(formField,fieldLabel,required){var result=true;if(required&&!validRequired(formField,fieldLabel))
result=false;if(result){var elems=formField.value.split("/");result=(elems.length==3);if(result){var month=parseInt(elems[0],10);var day=parseInt(elems[1],10);var year=parseInt(elems[2],10);result=allDigits(elems[0])&&(month>0)&&(month<13)&&allDigits(elems[1])&&(day>0)&&(day<32)&&allDigits(elems[2])&&((elems[2].length==2)||(elems[2].length==4));}
if(!result){alert('Please enter a date in the format MM/DD/YYYY for the "'+fieldLabel+'" field.');formField.focus();}}
return result;}
function updateEndDate(sender){startDate=javaCalendar.getSelectedDate("txtStartDate");if(startDate !=null)
javaCalendar.setSelectedDate(sender.getSelectedDate().addDays(calMinDays),"txtEndDate");}
function toggleDisable(){var startDate=JavaCalendarLoadControl("txtStartDate");var endDate=JavaCalendarLoadControl("txtEndDate");var todaysdate=new Date();todaysdate.setDate(todaysdate.getDate()+2);javaCalendar.setEnabled(true,"txtEndDate");javaCalendar.setEnabled(true,"txtStartDate");javaCalendar.setSelectedDate(todaysdate,"txtStartDate");javaCalendar.setSelectedDate(startDate.getSelectedDate().addDays(calMinDays),"txtEndDate");}
JavaCalendar=function(suppressInit){if(!suppressInit)
this.init();var today=new Date();this.todayDate=today.getDate(),this.todayMonth=today.getMonth(),this.todayYear=today.getFullYear(),this.dateCounts=new Array(31,28,31,30,31,30,31,31,30,31,30,31),this.viewingYear,this.viewingMonth,this.selectedYear,this.selectedMonth,this.selectedDay,this.buttonElement,this.valueElement,this.labelElement,this.yearInc,this.params,this.timeout,this.interval,this.popUp,this.popUpShim,this.monthSelectorShim,this.yearSelectorShim,this.monthSelector,this.yearSelector,this.stayOpen=false,this.cancelFocus=false,this.cancelTextBoxClick,this.isIE,this.isIEWin,this.isOpera,this.isSafari,this.isNS6,this.isIEMac;};JavaCalendar.prototype.init=function(){var ua=navigator.userAgent.toLowerCase();var isMac=(ua.indexOf("mac")!=-1);this.isIE=(ua.indexOf("ie")!=-1);this.isOpera=(ua.indexOf("opera")!=-1);this.isSafari=(ua.indexOf("safari")!=-1);this.isNS6=(ua.indexOf("netscape6/")!=-1);this.isIEWin=(this.isIE&&!isMac&&!this.isOpera);this.isIEMac=(this.isIE&&isMac&&!this.isOpera);};JavaCalendar.prototype.ehTextBoxClick=function(buttonElement,valueElement,labelElement,params){this.stayOpen=true;if(this.cancelTextBoxClick){this.cancelTextBoxClick=false;return false;}else{this.showPopUp(buttonElement,valueElement,labelElement,params);}};JavaCalendar.prototype.showPopUp=function(buttonElement,valueElement,labelElement,params){if(this.cancelFocus){this.cancelFocus=false;return false;}
this.inputFocusValue=valueElement.value;if(!params.enabled)
return false;if(this.params !=null&&(this.params !=params)){this.hidePopUp();}else if(this.params==params&&this.buttonElement==buttonElement&&this.valueElement==valueElement){this.hidePopUp();return false;}
this.buttonElement=buttonElement;this.valueElement=valueElement;this.labelElement=labelElement;this.params=this.loadParams(params);if(!this.popUp){this.popUp=document.createElement("DIV");with(this.popUp){id="javaCalendarPopUp";style.position="absolute";style.visibility="hidden";style.zIndex="1000";}
this.popUp.onclick=this.ehPopUpClick;document.body.appendChild(this.popUp);}
this.parseDate(this.valueElement.value);if(this.params.onClientBeforeCalendarOpen.length>0&&eval("window."+this.params.onClientBeforeCalendarOpen)){var clientFunction=this.params.onClientBeforeCalendarOpen+"(this)";if(eval(clientFunction)==false){this.hidePopUp();return;}}
this.buildCalendar();var buttonPosition=this.findPosition(this.buttonElement);var leftPosition=this.params.xOffset+buttonPosition.x;var topPosition=this.params.yOffset+buttonPosition.y;this.popUp.style.left=(leftPosition+this.buttonElement.offsetWidth-this.popUp.offsetWidth)+"px";this.popUp.style.top=(topPosition+this.buttonElement.offsetHeight)+"px";if(parseInt(this.popUp.style.left)<0){this.popUp.style.left=0;}
if(parseInt(this.popUp.style.top)<0){this.popUp.style.top=0;}
this.popUpShim=this.showShim(this.popUpShim,this.popUp);this.popUp.style.visibility="visible";if(this.params.onClientAfterCalendarOpen.length>0&&eval("window."+this.params.onClientAfterCalendarOpen)){var clientFunction=this.params.onClientAfterCalendarOpen+"(this)";if(eval(clientFunction)==false){this.hidePopUp();return;}}
document.onclick=this.ehDocumentClick;document.onkeydown=this.ehKeyPress;};JavaCalendar.prototype.showShim=function(v,o){if(this.isIEWin){if(!v){v=document.createElement("IFRAME");with(v){src="javascript:false;";style.position="absolute";style.visibility="hidden";style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";}
document.body.appendChild(v);}
with(v){style.width=o.offsetWidth;style.height=o.offsetHeight;style.top=o.style.top;style.left=o.style.left;style.zIndex=o.style.zIndex-1;style.visibility="visible";}}
return v;};JavaCalendar.prototype.hideShim=function(v){if(this.isIEWin){if(v){v.style.visibility="hidden";}}};JavaCalendar.prototype.hidePopUp=function(){if(this.params.onClientBeforeCalendarClose.length>0&&eval("window."+this.params.onClientBeforeCalendarClose)){var clientFunction=this.params.onClientBeforeCalendarClose+"(this)";if(eval(clientFunction)==false){return;}}
if(this.popUp)
this.popUp.style.visibility="hidden";this.clearTimers();this.hideShim(this.popUpShim);this.hideSelectors();this.reset();document.onclick=null;document.onkeydown=null;};JavaCalendar.prototype.hideSelectors=function(){if(this.monthSelector)
this.monthSelector.style.visibility="hidden";if(this.yearSelector)
this.yearSelector.style.visibility="hidden";this.hideShim(this.monthSelectorShim);this.hideShim(this.yearSelectorShim);};JavaCalendar.prototype.clearTimers=function(){if(this.timeout)
clearTimeout(this.timeout);if(this.interval)
clearInterval(this.interval);};JavaCalendar.prototype.buildStyleAttributes=function(style,cssClass){var atts="";if(style.length>0||cssClass.length>0){if(style.length>0){atts+=" style=\""+style+"\"";}
if(cssClass.length>0){atts+=" class=\""+cssClass+"\"";}}
return atts;};JavaCalendar.prototype.buildCalendar=function(){var specialDates=null;if(this.params.specialDates.length>0){specialDates=eval(this.params.specialDates);}
this.hideSelectors();if(this.viewingMonth==null||this.viewingYear==null){(this.params.visibleDate)?this.viewingMonth=this.params.visibleDate.getMonth():this.viewingMonth=this.todayMonth;(this.params.visibleDate)?this.viewingYear=this.params.visibleDate.getFullYear()
:this.viewingYear=this.todayYear;}
var viewingPrevMonth=this.viewingMonth-1;var viewingPrevMonthYear=this.viewingYear;if(viewingPrevMonth==-1){viewingPrevMonth=11;viewingPrevMonthYear--;}
var viewingNextMonth=this.viewingMonth+1;var viewingNextMonthYear=this.viewingYear;if(viewingNextMonth==12){viewingNextMonth=0;viewingNextMonthYear++;}
var o="";o+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\""+this.buildStyleAttributes(this.params.popUpStyle,this.params.popUpStyleCssClass)+">";o+="<tr><td>";if(this.params.showTitle){o+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\""+this.buildStyleAttributes(this.params.titleStyle,this.params.titleStyleCssClass)+">";o+="<tr>";var monthAndYear="<th>";var monthName=this.params.culture.monthNames[this.viewingMonth];if(this.params.monthSelectorEnabled){monthAndYear+="<span onclick=\"javaCalendar.ehMonthSelectorClick(this)\" style=\"cursor:pointer\">"+monthName+"</span>";}else{monthAndYear+=monthName;}
monthAndYear+=" ";if(this.params.yearSelectorEnabled){monthAndYear+="<span onclick=\"javaCalendar.ehYearSelectorClick(this)\" style=\"cursor:pointer\">"+this.viewingYear+"</span>";}else{monthAndYear+=this.viewingYear;}
monthAndYear+="</th>";if(this.params.showNextPrevMonth){var prevMonth,nextMonth;switch(this.params.nextPrevFormat){case "ShortMonth":
prevMonth=this.params.culture.monthNamesAbbr[viewingPrevMonth];nextMonth=this.params.culture.monthNamesAbbr[viewingNextMonth];break;case "FullMonth":
prevMonth=this.params.culture.monthNames[viewingPrevMonth];nextMonth=this.params.culture.monthNames[viewingNextMonth];break;case "Image":
prevMonth="<img src=\""+this.params.prevMonthImageUrl+"\"";var prevMonthWidthHeight=(this.params.nextPrevMonthImageWidth !="")
?"width:"+this.params.nextPrevMonthImageWidth+";":"";prevMonthWidthHeight+=(this.params.nextPrevMonthImageHeight !="")
?"height:"+this.params.nextPrevMonthImageHeight+";":"";if(prevMonthWidthHeight !="")
prevMonth+=" style=\""+prevMonthWidthHeight+"\"";prevMonth+=" border=\"0\" />";nextMonth="<img src=\""+this.params.nextMonthImageUrl+"\"";var nextMonthWidthHeight=(this.params.nextPrevMonthImageWidth !="")
?"width:"+this.params.nextPrevMonthImageWidth+";":"";nextMonthWidthHeight+=(this.params.nextPrevMonthImageHeight !="")
?"height:"+this.params.nextPrevMonthImageHeight+";":"";if(nextMonthWidthHeight !="")
nextMonth+=" style=\""+nextMonthWidthHeight+"\"";nextMonth+=" border=\"0\" />";break;case "CustomText":
default:
prevMonth=this.params.prevMonthText;nextMonth=this.params.nextMonthText;break;}
o+="<td onclick=\"javaCalendar.viewPrevMonth()\" onmousedown=\"javaCalendar.clearTimers();javaCalendar.timeout=setTimeout('javaCalendar.ehPrevMonthMouseDown()', 400);\" onmouseup=\"javaCalendar.clearTimers();\" onmouseout=\"javaCalendar.clearTimers();\""+this.buildStyleAttributes(this.params.nextPrevStyle,this.params.nextPrevStyleCssClass)+">";o+=prevMonth;o+="</td>";o+=monthAndYear;o+="<td onclick=\"javaCalendar.viewNextMonth()\" onmousedown=\"javaCalendar.clearTimers();javaCalendar.timeout=setTimeout('javaCalendar.ehNextMonthMouseDown()', 400);\" onmouseup=\"javaCalendar.clearTimers();\" onmouseout=\"javaCalendar.clearTimers();\""+this.buildStyleAttributes(this.params.nextPrevStyle,this.params.nextPrevStyleCssClass)+">";o+=nextMonth;o+="</td>";}else
o+=monthAndYear;o+="</tr>";o+="</table>";}
if(((this.viewingYear%4==0)&&(this.viewingYear%100 !=0))||(this.viewingYear%400==0))
this.dateCounts[1]=29;else
this.dateCounts[1]=28;o+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\""+this.buildStyleAttributes(this.params.calendarStyle,this.params.calendarStyleCssClass)+">";if(this.params.showDayHeader){o+="<thead><tr>";if(this.params.showWeekNumbers&&this.params.firstDayOfWeek==0)
o+="<th"+this.buildStyleAttributes(this.params.dayHeaderStyle,this.params.dayHeaderStyleCssClass)+">&nbsp;</th>";var dayPointer=this.params.firstDayOfWeek;for(var i=0;i<7;i++,dayPointer++){if(dayPointer==7)
dayPointer=0;o+="<th"+this.buildStyleAttributes(this.params.dayHeaderStyle,this.params.dayHeaderStyleCssClass)+">";switch(this.params.dayNameFormat){case "Short":
o+=this.params.culture.dayNamesAbbr[dayPointer];break;case "Full":
o+=this.params.culture.dayNames[dayPointer];break;case "FirstTwoLetters":
o+=this.params.culture.dayNames[dayPointer].substring(0,2);break;case "FirstLetter":
default:
o+=this.params.culture.dayNames[dayPointer].substring(0,1);break;}
o+="</th>";}
o+="</tr></thead>";}
o+="<tbody><tr>";var column=0;var startOfMonth=new Date(this.viewingYear,this.viewingMonth,1).getDay();startOfMonth=startOfMonth-this.params.firstDayOfWeek;if(startOfMonth<0)
startOfMonth=7+startOfMonth;for(var i=0;i<startOfMonth;i++,column++)
o+=this.buildDayCell(viewingPrevMonthYear,viewingPrevMonth,this.dateCounts[viewingPrevMonth]
-startOfMonth+i+1,"prev",specialDates);var row=0;for(var i=1;i<=this.dateCounts[this.viewingMonth];i++,column++){o+=this.buildDayCell(this.viewingYear,this.viewingMonth,i,"current",specialDates);if(column==6)
if(i<this.dateCounts[this.viewingMonth]){o+="</tr><tr>";row++;column=-1;}}
if(column>0){for(var i=1;column<7;i++,column++)
o+=this.buildDayCell(viewingNextMonthYear,viewingNextMonth,i,"next",specialDates);}
if(this.params.forceSixRows){for(var y=row;y<5;y++){o+="</tr><tr>";for(var x=0;x<7;x++,i++)
o+=this.buildDayCell(viewingNextMonthYear,viewingNextMonth,i,"next",specialDates);}}
o+="</tr></tbody>";o+="</table>";o+="<div"+this.buildStyleAttributes(this.params.footerStyle,this.params.footerStyleCssClass)+">";if(this.params.showTodayButton)
o+="<input type=\"button\"  class=\"btnsubmit\" onClick=\"javaCalendar.selectDate(javaCalendar.todayYear,javaCalendar.todayMonth,javaCalendar.todayDate,true);\" value=\""+this.params.todayButtonText+"\""+this.buildStyleAttributes(this.params.todayButtonStyle,this.params.todayButtonStyleCssClass)+" />";if(this.params.showNoneButton)
o+="<input  class=\"btnsubmit\" type=\"button\" onClick=\"javaCalendar.clearSelectedDate();\" value=\""+this.params.noneButtonText+"\""+this.buildStyleAttributes(this.params.noneButtonStyle,this.params.noneButtonStyleCssClass)+" />";o+="</div>";if(this.params.footNoteText !='')
o+="<div"+this.buildStyleAttributes(this.params.footNoteStyle,this.params.footNoteStyleCssClass)+">"+this.params.footNoteText+"</div>";o+="</td></tr>";o+="</table>";this.popUp.innerHTML=o;};JavaCalendar.prototype.buildDayCell=function(y,m,d,type,specialDates){var curDate=new Date(y,m,d);var arrSpecialDates=null;var dayOfWeek=curDate.getDay(),dayClassName="";var isWeekDay=(dayOfWeek !=0&&dayOfWeek !=6);var styleToUse=null;var styleCssClassToUse=null;var specialDateSelectable=true;var specialDateOnClick="";var specialDateText="";switch(type){case "current":
var isSelectedDay=(this.selectedYear==y&&this.selectedMonth==m&&this.selectedDay==d);var isTodayDay=(this.viewingYear==this.todayYear&&this.viewingMonth==this.todayMonth&&this.todayDate==d);if(isSelectedDay&&isTodayDay){if(isWeekDay){styleToUse=this.params.selectedDayTodayDayStyle;styleCssClassToUse=this.params.selectedDayTodayDayStyleCssClass;}else{styleToUse=this.params.selectedDayWeekendDayStyle;styleCssClassToUse=this.params.selectedDayWeekendDayStyleCssClass;}}else if(isSelectedDay){if(isWeekDay){styleToUse=this.params.selectedDayStyle;styleCssClassToUse=this.params.selectedDayStyleCssClass;}else{styleToUse=this.params.selectedDayWeekendDayStyle;styleCssClassToUse=this.params.selectedDayWeekendDayStyleCssClass;}}else if(isTodayDay){if(isWeekDay){styleToUse=this.params.todayDayStyle;styleCssClassToUse=this.params.todayDayStyleCssClass;}else{styleToUse=this.params.todayDayWeekendDayStyle;styleCssClassToUse=this.params.todayDayWeekendDayStyleCssClass;}}else{if(isWeekDay){styleToUse=this.params.dayStyle;styleCssClassToUse=this.params.dayStyleCssClass;}else{styleToUse=this.params.weekendDayStyle;styleCssClassToUse=this.params.weekendDayStyleCssClass;}}
break;case "prev":
case "next":
if(isWeekDay){styleToUse=this.params.otherMonthDayStyle;styleCssClassToUse=this.params.otherMonthDayStyleCssClass;}else{styleToUse=this.params.otherMonthDayWeekendDayStyle;styleCssClassToUse=this.params.otherMonthDayWeekendDayStyleCssClass;}
break;}
if(specialDates !=null){arrSpecialDates=specialDates.getByDate(curDate);for(var i=0;i<arrSpecialDates.length;i++){styleToUse+=arrSpecialDates[i].style;styleCssClassToUse+=" "+arrSpecialDates[i].styleCssClass;specialDateSelectable=arrSpecialDates[i].selectable;if(arrSpecialDates[i].text.length>0){if(i !=0){if(this.isIE||this.isOpera||this.isSafari)
specialDateText+="\n";else
specialDateText+=", ";}
specialDateText+=arrSpecialDates[i].text;}
if(arrSpecialDates[i].clientSpecialDateClickFunction.length>0){specialDateOnClick+="eval("+arrSpecialDates[i].clientSpecialDateClickFunction+"(new Date("+this.viewingYear+","+this.viewingMonth+","+d+")));";}}
if(arrSpecialDates.length>0)
specialDateSelectable=false;for(var i=0;i<arrSpecialDates.length;i++){if(arrSpecialDates[i].selectable==true){specialDateSelectable=true;break;}}}
var o="";if(this.params.showWeekNumbers&&dayOfWeek==this.params.firstDayOfWeek&&this.params.firstDayOfWeek==0){var when=new Date(y,m,d);var newYear=new Date(y,0,1);var offset=7+1-newYear.getDay();if(offset==8)
offset=1;var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/1000/60/60/24)+1;var weeknum=Math.floor((daynum-offset+7)/7);if(weeknum==this.params.firstDayOfWeek){y--;var prevNewYear=new Date(y,0,1);var prevOffset=7+1-prevNewYear.getDay();if(prevOffset==2||prevOffset==8)
weeknum=53;else
weeknum=52;}
o+="<td"+this.buildStyleAttributes(this.params.weekNumberStyle,this.params.weekNumberStyleCssClass)+">"+weeknum+"</td>";}
o+="<td"+this.buildStyleAttributes(styleToUse,styleCssClassToUse);o+=" title=\""+specialDateText+"\"";if(this.params.dayStatusBarText.length>0){var statusText=this.params.dayStatusBarText;if(statusText.indexOf("{0}")!=-1){var dateText=this.formatDate(curDate);statusText=statusText.replace("{0}",dateText);}
o+=" onmouseover=\"window.status = '"+statusText+"';return true;\"";o+=" onmouseout=\"window.status = '';return true;\"";}
o+=">";var onClick="javaCalendar.selectDate("+this.viewingYear+","+this.viewingMonth+","+d+", true)";if(type=="prev"||type=="next")
onClick="javaCalendar.selectDate("+y+","+m+","+d+", true)";onClick=onClick+";"+specialDateOnClick;if(type=="current"||type=="prev"&&this.params.showDaysInPrevMonth||type=="next"&&this.params.showDaysInNextMonth){if(specialDateSelectable==true&&((isWeekDay&&this.params.selectableWeekDays||!isWeekDay&&this.params.selectableWeekendDays)&&(type=="current"||type=="prev"&&this.params.selectablePrevMonthDays||type=="next"&&this.params.selectableNextMonthDays)&&(!this.params.maximumDate||this.params.maximumDate>=curDate)&&(!this.params.minimumDate||this.params.minimumDate<=curDate))){o+="<a href=\"javascript:void(0);"+onClick.replace("{0}",d)+"\" title=\""+specialDateText+"\">"+d+"</a>";}else{o+=d;}}else{o+="&nbsp;";}
o+="</td>";if(!this.isNS6&&this.params.onClientDayRender.length>0&&eval("window."+this.params.onClientDayRender)){var objectConverterDIV=document.createElement("DIV");objectConverterDIV.innerHTML="<table><tr>"+o+"</tr></table>";var newTD=eval(this.params.onClientDayRender+"(this, curDate , objectConverterDIV.firstChild.firstChild.firstChild.firstChild )");if(newTD !=null&&newTD.tagName&&newTD.tagName=="TD"){var objectConverterTR=document.createElement("TR");objectConverterTR.appendChild(newTD);return objectConverterTR.innerHTML;}}
return o;};JavaCalendar.prototype.findPosition=function(element,stopElement){var scrollLeft=0,scrollTop=0;if(element.tagName.toLowerCase()=="div"){scrollLeft=element.scrollLeft;scrollTop=element.scrollTop;}
var elementPosition={x:element.offsetLeft-scrollLeft,y:element.offsetTop-scrollTop};if((element.offsetParent)&&(typeof(stopElement)=="undefined"||(element.offsetParent.offsetParent&&element.offsetParent.offsetParent
!=stopElement))){var combinedParentPositions=this.findPosition(element.offsetParent,stopElement);elementPosition.x+=combinedParentPositions.x;elementPosition.y+=combinedParentPositions.y;}
if(this.isIEMac){var mmLeft=document.body.currentStyle.marginLeft;var mmTop=document.body.currentStyle.marginTop;if(mmLeft.indexOf("%")!=-1){var mpWidth=parseInt(document.body.offsetWidth);var mpHeight=parseInt(document.body.offsetHeight);mmLeft=(parseInt(mmLeft)/100)*mpWidth;mmTop=(parseInt(mmTop)/100)*mpHeight;}
elementPosition.x+=parseInt(mmLeft);elementPosition.y+=parseInt(mmTop);}
return elementPosition;};JavaCalendar.prototype.viewNextMonth=function(){var nextMonth=this.viewingMonth+1;var nextMonthYear=this.viewingYear;if(nextMonth>11){nextMonth=0;nextMonthYear++;}
if(this.params.onClientBeforeVisibleMonthChanged.length>0&&eval("window."+this.params.onClientBeforeVisibleMonthChanged)){var newVisibleDate=new Date(nextMonthYear,nextMonth,1);var clientFunction=this.params.onClientBeforeVisibleMonthChanged+"(this, newVisibleDate)";if(eval(clientFunction)==false){return false;}}
this.viewingMonth=nextMonth;this.viewingYear=nextMonthYear;this.buildCalendar();if(this.params&&this.params.onClientAfterVisibleMonthChanged.length>0&&eval("window."+this.params.onClientAfterVisibleMonthChanged)){var clientFunction=this.params.onClientAfterVisibleMonthChanged+"(this)";if(eval(clientFunction)==false){return false;}}};JavaCalendar.prototype.viewPrevMonth=function(){var prevMonth=this.viewingMonth-1;var prevMonthYear=this.viewingYear;if(prevMonth<0){prevMonth=11;prevMonthYear--;}
if(this.params.onClientBeforeVisibleMonthChanged.length>0&&eval("window."+this.params.onClientBeforeVisibleMonthChanged)){var newVisibleDate=new Date(prevMonthYear,prevMonth,1);var clientFunction=this.params.onClientBeforeVisibleMonthChanged+"(this, newVisibleDate)";if(eval(clientFunction)==false){return false;}}
this.viewingMonth=prevMonth;this.viewingYear=prevMonthYear;this.buildCalendar();if(this.params.onClientAfterVisibleMonthChanged.length>0&&eval("window."+this.params.onClientAfterVisibleMonthChanged)){var clientFunction=this.params.onClientAfterVisibleMonthChanged+"(this)";if(eval(clientFunction)==false){return false;}}};JavaCalendar.prototype.wireUpBeforeSelectionChanged=function(newDate){if(this.params.onClientBeforeSelectionChanged.length>0&&eval("window."+this.params.onClientBeforeSelectionChanged)){var clientFunction=this.params.onClientBeforeSelectionChanged+"(this, newDate)";if(eval(clientFunction)==false){return false;}else{return true;}}else{return true;}};JavaCalendar.prototype.wireUpAfterSelectionChanged=function(){if(this.params.onClientAfterSelectionChanged.length>0&&eval("window."+this.params.onClientAfterSelectionChanged)){var clientFunction=this.params.onClientAfterSelectionChanged+"(this)";if(eval(clientFunction)==false){return false;}else{return true;}}else{return true;}};JavaCalendar.prototype.clearSelectedDate=function(){this.clear();if(this.valueElement.style.display !="none"&&!this.valueElement.disabled){this.valueElement.focus();}
this.hidePopUp();};JavaCalendar.prototype.selectDate=function(y,m,d,hide){this.selectedYear=y,this.selectedMonth=m,this.selectedDay=d;this.viewingYear=y,this.viewingMonth=m;var prevFormattedDate=this.valueElement.value;var formattedDate=this.formatDate(new Date(this.selectedYear,this.selectedMonth,this.selectedDay));if(prevFormattedDate !=formattedDate){if(!this.wireUpBeforeSelectionChanged(new Date(this.selectedYear,this.selectedMonth,this.selectedDay))){return;}
if(this.params.displayType=="Button")
this.buttonElement.value=formattedDate;else if(this.params.displayType=="HyperLink")
this.buttonElement.innerHTML=formattedDate;else if(this.labelElement)
this.labelElement.innerHTML=formattedDate;this.valueElement.value=formattedDate;this.clearTimers();if(!this.wireUpAfterSelectionChanged()){return;}
if(this.params.autoPostBack&&hide){eval(this.params.postBackFunction);}
if(this.params.displayType=="TextBox"||this.params.displayType.indexOf("TextBox")!=-1&&this.params.openCalendarOnTextBoxFocus){this.cancelFocus=true;}
if(this.valueElement.style.display !="none"){this.valueElement.focus();}}
if(hide){this.hidePopUp();}};JavaCalendar.prototype.padWithZero=function(num){return(num<10)?"0"+num:num;};JavaCalendar.prototype.trim=function(string){while((string.substring(0,1)==' ')||(string.substring(0,1)=='\n')||(string.substring(0,1)=='\r')){string=string.substring(1,string.length);}
while((string.substring(string.length-1,string.length)==' ')||(string.substring(string.length-1,string.length)=='\n')||(string.substring(string.length-1,string.length)=='\r')){string=string.substring(0,string.length-1);}
return string;};JavaCalendar.prototype.formatDate=function(date){if(date){var y=date.getFullYear(),m=date.getMonth(),d=date.getDate(),dow=date.getDay();var finalDate=this.params.dateFormat;finalDate=finalDate.replace("yyyy",y);finalDate=finalDate.replace("yy",this.padWithZero(y%100));finalDate=finalDate.replace("dddd","{0}");finalDate=finalDate.replace("ddd","{1}");finalDate=finalDate.replace("dd","{2}");finalDate=finalDate.replace("d","{3}");finalDate=finalDate.replace("MMMM","{4}");finalDate=finalDate.replace("MMM","{5}");finalDate=finalDate.replace("MM","{6}");finalDate=finalDate.replace("M","{7}");finalDate=finalDate.replace("{0}",this.params.culture.dayNames[dow]);finalDate=finalDate.replace("{1}",this.params.culture.dayNamesAbbr[dow]);finalDate=finalDate.replace("{2}",this.padWithZero(d));finalDate=finalDate.replace("{3}",d);finalDate=finalDate.replace("{4}",this.params.culture.monthNames[m]);finalDate=finalDate.replace("{5}",this.params.culture.monthNamesAbbr[m]);finalDate=finalDate.replace("{6}",this.padWithZero(m+1));finalDate=finalDate.replace("{7}",m+1);return finalDate;}else
return null;};JavaCalendar.prototype.parseDate=function(valueString){if(valueString&&valueString !=this.params.nullDateText){var format=this.params.dateFormat;var i_value=0,i_format=0;var c,token;var x,y;var year=null,month=null,date=null;while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++);}
switch(token){case "d":
case "dd":
date=this.getInt(valueString,i_value,token.length,2);if(!date)
return null;i_value+=date.length;date=this.parsePaddedInt(date);break;case "ddd":
for(var i=0;i<this.params.culture.dayNamesAbbr.length;i++){var dayName=this.params.culture.dayNamesAbbr[i];if(valueString.substring(i_value,i_value+dayName.length).toLowerCase()==dayName.toLowerCase()){i_value+=dayName.length;break;}}
break;case "dddd":
for(var i=0;i<this.params.culture.dayNames.length;i++){var dayName=this.params.culture.dayNames[i];if(valueString.substring(i_value,i_value+dayName.length).toLowerCase()==dayName.toLowerCase()){i_value+=dayName.length;break;}}
break;case "M":
case "MM":
month=this.getInt(valueString,i_value,token.length,2);if(!month)
return null;i_value+=month.length;month=this.parsePaddedInt(month)-1;break;case "MMM":
for(var i=0;i<this.params.culture.monthNamesAbbr.length;i++){var monthName=this.params.culture.monthNamesAbbr[i];if(valueString.substring(i_value,i_value+monthName.length).toLowerCase()==monthName.toLowerCase()){month=i;i_value+=monthName.length;break;}}
break;case "MMMM":
for(var i=0;i<this.params.culture.monthNames.length;i++){var monthName=this.params.culture.monthNames[i];if(valueString.substring(i_value,i_value+monthName.length).toLowerCase()==monthName.toLowerCase()){month=i;i_value+=monthName.length;break;}}
break;case "yy":
case "yyyy":
if(token=="yyyy"){x=1;y=4;}
if(token=="yy"){x=2;y=2;}
year=this.getInt(valueString,i_value,x,y);if(year !=null){i_value+=year.length;if(year.length==2){if(year>this.params.twoDigitYearBreak){year=1900+(year-0);}else{year=2000+(year-0);}}}
break;default:i_value+=token.length;}}
if(date==null||month==null||year==null||isNaN(date)||isNaN(month)||isNaN(year)){return null;}else{this.selectDate(year,month,date);return new Date(year,month,date);}}else
return null;};JavaCalendar.prototype.isInteger=function(val){var digits="1234567890";for(var i=0;i<val.length;i++){if(digits.indexOf(val.charAt(i))==-1){return false;}}
return true;};JavaCalendar.prototype.getInt=function(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var valuePart=str.substring(i,i+x);if(valuePart.length<minlength){return null;}
if(this.isInteger(valuePart)){return valuePart;}}
return null;};JavaCalendar.prototype.parsePaddedInt=function(valuePart){if(valuePart.length>1&&valuePart.substring(0,1)=="0")
return valuePart.substring(1,valuePart.length);else
return valuePart;};JavaCalendar.prototype.ehKeyPress=function(e){if(!e)
e=window.event;if(e.keyCode==9)
javaCalendar.hidePopUp();};JavaCalendar.prototype.ehPopUpClick=function(e){javaCalendar.stayOpen=true;};JavaCalendar.prototype.ehDocumentClick=function(){if(!javaCalendar.stayOpen){javaCalendar.hidePopUp();}else{javaCalendar.stayOpen=false;}};JavaCalendar.prototype.ehPrevMonthMouseDown=function(){javaCalendar.interval=setInterval("javaCalendar.viewPrevMonth()",200);};JavaCalendar.prototype.ehNextMonthMouseDown=function(){javaCalendar.interval=setInterval("javaCalendar.viewNextMonth()",200);};JavaCalendar.prototype.ehUpYearMouseDown=function(baseYear){javaCalendar.interval=setInterval("javaCalendar.buildYearSelectorLinks("+(baseYear-1)+", -1)",90);};JavaCalendar.prototype.ehDownYearMouseDown=function(baseYear){javaCalendar.interval=setInterval("javaCalendar.buildYearSelectorLinks("+(baseYear-1)+", 1)",90);};JavaCalendar.prototype.ehMonthSelectorClick=function(oSpan){this.hideSelectors();if(!this.monthSelector){this.monthSelector=document.createElement("DIV");with(this.monthSelector){id="javaCalendarMonthSelector";className="javaCalMonthSelector";style.position="absolute";style.zIndex="1001";}
document.body.appendChild(this.monthSelector);}
this.monthSelector.innerHTML="";var o="";var monthNames=this.params.culture.monthNames;for(var i=0;i<monthNames.length;i++){var className=(i==this.viewingMonth)
?"javaCalMonthSelectorSelectedItem":"javaCalMonthSelectorItem";o+="<a href=\"javascript:void(0);\" onclick=\"javaCalendar.ehMonthSelectorMonthClick("+i+");\" class=\""+className+"\">"+monthNames[i]+"</a>";}
this.monthSelector.innerHTML=o;var pos=this.findPosition(oSpan,this.popUp);this.monthSelector.style.top=(parseInt(this.popUp.style.top)+pos.y+oSpan.offsetHeight+this.params.monthSelectorYOffset)+"px";this.monthSelector.style.left=(parseInt(this.popUp.style.left)+pos.x+this.params.monthSelectorXOffset)+"px";this.monthSelectorShim=this.showShim(this.monthSelectorShim,this.monthSelector);this.monthSelector.style.visibility="visible";};JavaCalendar.prototype.ehMonthSelectorMonthClick=function(newViewingMonth){if(this.params.onClientBeforeVisibleMonthChanged.length>0&&eval("window."+this.params.onClientBeforeVisibleMonthChanged)){var newVisibleDate=new Date(this.viewingYear,newViewingMonth,1);var clientFunction=this.params.onClientBeforeVisibleMonthChanged+"(this, newVisibleDate)";if(eval(clientFunction)==false){return false;}}
this.viewingMonth=newViewingMonth;this.buildCalendar();this.ehPopUpClick();if(this.params.onClientAfterVisibleMonthChanged.length>0&&eval("window."+this.params.onClientAfterVisibleMonthChanged)){var clientFunction=this.params.onClientAfterVisibleMonthChanged+"(this)";if(eval(clientFunction)==false){return false;}}};JavaCalendar.prototype.ehYearSelectorClick=function(oSpan){this.hideSelectors();if(!this.yearSelector){this.yearSelector=document.createElement("DIV");with(this.yearSelector){id="javaCalendarYearSelector";className="javaCalYearSelector";style.position="absolute";style.zIndex="1001";}
document.body.appendChild(this.yearSelector);}
this.buildYearSelectorLinks(this.viewingYear);var pos=this.findPosition(oSpan,this.popUp);this.yearSelector.style.top=(parseInt(this.popUp.style.top)+pos.y+oSpan.offsetHeight+this.params.yearSelectorYOffset)+"px";this.yearSelector.style.left=(parseInt(this.popUp.style.left)+pos.x+this.params.yearSelectorXOffset)+"px";this.yearSelectorShim=this.showShim(this.yearSelectorShim,this.yearSelector);this.yearSelector.style.visibility="visible";};JavaCalendar.prototype.ehYearSelectorYearClick=function(newViewingYear){if(this.params.onClientBeforeVisibleMonthChanged.length>0&&eval("window."+this.params.onClientBeforeVisibleMonthChanged)){var newVisibleDate=new Date(newViewingYear,this.viewingMonth,1);var clientFunction=this.params.onClientBeforeVisibleMonthChanged+"(this, newVisibleDate)";if(eval(clientFunction)==false){return false;}}
this.viewingYear=newViewingYear;this.buildCalendar();this.ehPopUpClick();if(this.params.onClientAfterVisibleMonthChanged.length>0&&eval("window."+this.params.onClientAfterVisibleMonthChanged)){var clientFunction=this.params.onClientAfterVisibleMonthChanged+"(this)";if(eval(clientFunction)==false){return false;}}};JavaCalendar.prototype.buildYearSelectorLinks=function(baseYear,optTimeoutChange){var p,m;switch(this.params.upDownYearSelectorFormat){case "Image":
p="<img src=\""+this.params.upYearSelectorImageUrl+"\"";var pWidthHeight=(this.params.upDownYearSelectorImageWidth !="")
?"width:"+this.params.upDownYearSelectorImageWidth+";":"";pWidthHeight+=(this.params.upDownYearSelectorImageHeight !="")
?"height:"+this.params.upDownYearSelectorImageHeight+";":"";if(pWidthHeight !="")
p+=" style=\""+pWidthHeight+"\"";p+=" border=\"0\" />";m="<img src=\""+this.params.downYearSelectorImageUrl+"\"";var mWidthHeight=(this.params.upDownYearSelectorImageWidth !="")
?"width:"+this.params.upDownYearSelectorImageWidth+";":"";mWidthHeight+=(this.params.upDownYearSelectorImageHeight !="")
?"height:"+this.params.upDownYearSelectorImageHeight+";":"";if(mWidthHeight !="")
m+=" style=\""+mWidthHeight+"\"";m+=" border=\"0\" />";break;case "CustomText":
default:
p=this.params.downYearSelectorText;m=this.params.upYearSelectorText;break;}
baseYear=(optTimeoutChange !=null)?(this.yearInc+optTimeoutChange):parseInt(baseYear);var o="<a href=\"javascript:void(0);\" onclick=\"javaCalendar.buildYearSelectorLinks("+(baseYear)+");\" onmousedown=\"javaCalendar.clearTimers();javaCalendar.timeout = setTimeout('javaCalendar.ehUpYearMouseDown("+baseYear+")', 300);if(javaCalendar.isOpera || javaCalendar.isSafari)javaCalendar.ehPopUpClick();\" onmouseup=\"javaCalendar.clearTimers();\" onmouseout=\"javaCalendar.clearTimers();\" class=\"javaCalYearSelectorImg\">"+p+"</a>";for(var i=(baseYear-1);i<=(baseYear+4);i++){var className=(i==this.viewingYear)
?"javaCalYearSelectorSelectedItem":"javaCalYearSelectorItem";o+="<a href=\"javascript:void(0);\" onclick=\"javaCalendar.ehYearSelectorYearClick("+i+");\" class=\""+className+"\">"+i+"</a>";}
o+="<a href=\"javascript:void(0);\" onclick=\"javaCalendar.buildYearSelectorLinks("+(baseYear)+");\" onmousedown=\"javaCalendar.clearTimers();javaCalendar.timeout = setTimeout('javaCalendar.ehDownYearMouseDown("+baseYear+")', 300);if(javaCalendar.isOpera || javaCalendar.isSafari)javaCalendar.ehPopUpClick();\" onmouseup=\"javaCalendar.clearTimers();\" onmouseout=\"javaCalendar.clearTimers();\" class=\"javaCalYearSelectorImg\">"+m+"</a>";var children=this.yearSelector.childNodes;if(children){for(var i=0;i<children.length;i++){this.yearSelector.removeChild(children[i]);}}
var dd=document.createElement("DIV");dd.innerHTML=o;this.yearSelector.appendChild(dd);this.yearInc=baseYear;};JavaCalendar.prototype.ehFocus=function(valueElement){this.inputFocusValue=valueElement.value;};JavaCalendar.prototype.ehBlur=function(buttonElement,valueElement,params){javaCalendar.buttonElement=buttonElement;javaCalendar.valueElement=valueElement;javaCalendar.params=javaCalendar.loadParams(params);if(javaCalendar.valueElement.value !=javaCalendar.inputFocusValue){if(!javaCalendar.wireUpBeforeSelectionChanged(javaCalendar.getSelectedDate())){return;}
if(!javaCalendar.wireUpAfterSelectionChanged()){return;}
if(javaCalendar.params.autoPostBack){eval(javaCalendar.params.postBackFunction);}}
if(this.params.displayType !="TextBox"&&!this.params.openCalendarOnTextBoxFocus){javaCalendar.reset();}};JavaCalendar.prototype.reset=function(){this.selectedMonth=null;this.selectedDay=null;this.selectedYear=null;this.viewingMonth=null;this.viewingYear=null;this.params=null;};JavaCalendar.prototype.loadParams=function(params){params.culture=eval(params.culture);if(params.firstDayOfWeek==7)
params.firstDayOfWeek=params.culture.firstDayOfWeek;return params;};function JavaCalendarLoadControl(javaCalId){var javaCal=new JavaCalendar(true);javaCal.params=javaCal.loadParams(eval(javaCalId+"Params"));javaCal.valueElement=document.getElementById(javaCalId+"_textBox");javaCal.labelElement=null;switch(javaCal.params.displayType){case "TextBoxAndButton":
javaCal.buttonElement=document.getElementById(javaCalId+"_button");break;case "TextBoxAndHyperLink":
javaCal.buttonElement=document.getElementById(javaCalId+"_hyperLink");break;case "TextBoxAndImage":
javaCal.buttonElement=document.getElementById(javaCalId+"_image");break;case "TextBox":
javaCal.buttonElement=document.getElementById(javaCalId+"_textBox");break;case "LabelAndButton":
javaCal.buttonElement=document.getElementById(javaCalId+"_button");javaCal.labelElement=document.getElementById(javaCalId+"_label");break;case "LabelAndHyperLink":
javaCal.buttonElement=document.getElementById(javaCalId+"_hyperLink");javaCal.labelElement=document.getElementById(javaCalId+"_label");break;case "LabelAndImage":
javaCal.buttonElement=document.getElementById(javaCalId+"_image");javaCal.labelElement=document.getElementById(javaCalId+"_label");break;case "Label":
javaCal.buttonElement=document.getElementById(javaCalId+"_label");javaCal.labelElement=document.getElementById(javaCalId+"_label");break;case "Button":
javaCal.buttonElement=document.getElementById(javaCalId+"_button");break;case "HyperLink":
javaCal.buttonElement=document.getElementById(javaCalId+"_hyperLink");break;case "Image":
javaCal.buttonElement=document.getElementById(javaCalId+"_image");break;}
return javaCal;};JavaCalendar.prototype.getControlId=function(){return this.popUp.id;};JavaCalendar.prototype.getMaximumDate=function(javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;return javaCaltu.params.maximumDate;};JavaCalendar.prototype.getMinimumDate=function(javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;return javaCal.params.minimumDate;};JavaCalendar.prototype.setSelectedDate=function(date,javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;javaCaltu.selectedYear=date.getFullYear();javaCaltu.selectedMonth=date.getMonth();javaCaltu.selectedDay=date.getDate();var formattedDate=javaCaltu.formatDate(date);if(formattedDate==null)
formattedDate="";if(javaCaltu.params.displayType=="Button")
javaCaltu.buttonElement.value=formattedDate;else if(javaCaltu.params.displayType=="HyperLink")
javaCaltu.buttonElement.innerHTML=formattedDate;else if(javaCaltu.labelElement)
javaCaltu.labelElement.innerHTML=formattedDate;javaCaltu.valueElement.value=formattedDate;};JavaCalendar.prototype.getSelectedDate=function(javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;return javaCaltu.parseDate(javaCaltu.valueElement.value)};JavaCalendar.prototype.getSelectedDateFormatted=function(javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;return(javaCaltu.valueElement.value !="")?javaCaltu.valueElement.value:null;};JavaCalendar.prototype.getEnabled=function(javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;return javaCaltu.params.enabled;};JavaCalendar.prototype.setEnabled=function(eVal,javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;javaCaltu.valueElement.disabled=!eVal;if(javaCaltu.buttonElement)
javaCaltu.buttonElement.disabled=!eVal;javaCaltu.params.enabled=eVal;};JavaCalendar.prototype.clear=function(javaCalId){var javaCaltu=(javaCalId)?JavaCalendarLoadControl(javaCalId):this;var prevFormattedDate=javaCaltu.valueElement.value;if(prevFormattedDate !=javaCaltu.params.nullDateText){if(!javaCaltu.wireUpBeforeSelectionChanged(null)){return;}
javaCaltu.valueElement.value=javaCaltu.params.nullDateText;javaCaltu.clearDate=false;if(javaCaltu.params.displayType=="Button")
javaCaltu.buttonElement.value=javaCaltu.params.buttonText;else if(javaCaltu.params.displayType=="HyperLink")
javaCaltu.buttonElement.innerHTML=javaCaltu.params.buttonText;else if(javaCaltu.labelElement)
javaCaltu.labelElement.innerHTML=javaCaltu.params.buttonText;if(!javaCaltu.wireUpAfterSelectionChanged()){return;}
if(javaCaltu.params.autoPostBack){eval(javaCaltu.params.postBackFunction);}}
if(javaCaltu.params.displayType=="TextBox"||javaCaltu.params.displayType.indexOf("TextBox")!=-1&&javaCaltu.params.openCalendarOnTextBoxFocus){javaCaltu.cancelFocus=true;}};Date.prototype.addYears=function(number){return new Date(this.getFullYear()+parseInt(number),this.getMonth(),this.getDate());};Date.prototype.addMonths=function(number){return new Date(this.getFullYear(),this.getMonth()+parseInt(number),this.getDate());};Date.prototype.addDays=function(number){return(new Date(this.getTime()+(number*24*60*60*1000)));};Date.prototype.addHours=function(number){return(new Date(this.getTime()+(number*60*60*1000)));};Date.prototype.addMinutes=function(number){return(new Date(this.getTime()+(number*60*1000)));};Date.prototype.addSeconds=function(number){return(new Date(this.getTime()+(number*1000)));};var javaCalendarCulture_en_US={monthNames:new Array("January","February","March","April","May","June","July","August","September","October","November","December"),monthNamesAbbr:new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),dayNames:new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"),dayNamesAbbr:new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"),firstDayOfWeek:0};var todaysdate=new Date();var futuredate=new Date()
futuredate=todaysdate.addYears(3)
pastdate=todaysdate.addYears(-1)
var txtStartDateParams={onClientDayRender:"",onClientBeforeCalendarOpen:"",onClientBeforeCalendarClose:"",onClientAfterCalendarOpen:"",onClientBeforeSelectionChanged:"",onClientAfterSelectionChanged:"updateEndDate",onClientBeforeVisibleMonthChanged:"",onClientAfterVisibleMonthChanged:"",enabled:true,autoPostBack:false,selectableWeekDays:true,selectableWeekendDays:true,selectablePrevMonthDays:true,selectableNextMonthDays:true,maximumDate:futuredate,minimumDate:pastdate,twoDigitYearBreak:50,openCalendarOnTextBoxFocus:true,monthSelectorEnabled:true,yearSelectorEnabled:true,dayStatusBarText:"{0}",nullDateText:"",xOffset:0,yOffset:-1,nextMonthImageUrl:"https://reservations.1stchoice.com/images/next.gif",prevMonthImageUrl:"https://reservations.1stchoice.com/images/prev.gif",nextPrevMonthImageWidth:"10px",nextPrevMonthImageHeight:"18px",nextMonthText:"&gt;",prevMonthText:"&lt;",showWeekNumbers:false,showDaysInNextMonth:true,showDaysInPrevMonth:true,showTodayButton:true,todayButtonText:"Today",showNoneButton:true,noneButtonText:"None",footNoteText:"",forceSixRows:true,firstDayOfWeek:7,dateFormat:"ShortDate",dayNameFormat:"FirstLetter",displayType:"TextBoxAndImage",buttonText:"Arrival Date",nextPrevFormat:"Image",showDayHeader:true,showNextPrevMonth:true,showTitle:true,upYearSelectorImageUrl:"https://reservations.1stchoice.com/images/arrow_up.gif",downYearSelectorImageUrl:"https://reservations.1stchoice.com/images/arrow_down.gif",upDownYearSelectorImageWidth:9,upDownYearSelectorImageHeight:5,upYearSelectorText:"+",downYearSelectorText:"-",upDownYearSelectorFormat:"Image",monthSelectorXOffset:-11,monthSelectorYOffset:2,yearSelectorXOffset:-11,yearSelectorYOffset:2,visibleDate:null,popUpStyle:"",popUpStyleCssClass:"javaCalPopUp",calendarStyle:"",calendarStyleCssClass:"javaCalCalendar",noneButtonStyle:"",noneButtonStyleCssClass:"javaCalClearButton",todayButtonStyle:"",todayButtonStyleCssClass:"javaCalTodayButton",titleStyle:"",titleStyleCssClass:"javaCalTitle",nextPrevStyle:"",nextPrevStyleCssClass:"javaCalNextPrev",dayHeaderStyle:"",dayHeaderStyleCssClass:"javaCalDayHeader",dayStyle:"",dayStyleCssClass:"javaCalDay",otherMonthDayStyle:"",otherMonthDayStyleCssClass:"javaCalOtherMonthDay javaCalDay",weekendDayStyle:"",weekendDayStyleCssClass:"javaCalWeekendDay javaCalDay",selectedDayStyle:"",selectedDayStyleCssClass:"javaCalSelectedDay javaCalDay",todayDayStyle:"",todayDayStyleCssClass:"javaCalTodayDay javaCalDay",footerStyle:"",footerStyleCssClass:"javaCalFooter",footNoteStyle:"",footNoteStyleCssClass:"javaCalFootNote",weekNumberStyle:"",weekNumberStyleCssClass:"javaCalWeekNumber",otherMonthDayWeekendDayStyle:"",otherMonthDayWeekendDayStyleCssClass:"javaCalOtherMonthDay javaCalDay javaCalWeekendDay javaCalDay javaCalDay",selectedDayTodayDayStyle:"",selectedDayTodayDayStyleCssClass:"javaCalTodayDay javaCalDay javaCalSelectedDay javaCalDay javaCalDay",selectedDayWeekendDayStyle:"",selectedDayWeekendDayStyleCssClass:"javaCalSelectedDay javaCalDay javaCalWeekendDay javaCalDay javaCalDay",todayDayWeekendDayStyle:"",todayDayWeekendDayStyleCssClass:"javaCalTodayDay javaCalDay javaCalWeekendDay javaCalDay javaCalDay",postBackFunction:"__doPostBack('txtStartDate','')",dateFormat:"M/d/yyyy",culture:"javaCalendarCulture_en_US",specialDates:""};var txtEndDateParams={onClientDayRender:"",onClientBeforeCalendarOpen:"",onClientBeforeCalendarClose:"",onClientAfterCalendarOpen:"",onClientBeforeSelectionChanged:"",onClientAfterSelectionChanged:"",onClientBeforeVisibleMonthChanged:"",onClientAfterVisibleMonthChanged:"",enabled:true,autoPostBack:false,selectableWeekDays:true,selectableWeekendDays:true,selectablePrevMonthDays:true,selectableNextMonthDays:true,maximumDate:futuredate,minimumDate:pastdate,twoDigitYearBreak:50,openCalendarOnTextBoxFocus:true,monthSelectorEnabled:true,yearSelectorEnabled:true,dayStatusBarText:"{0}",nullDateText:"",xOffset:0,yOffset:-1,nextMonthImageUrl:"https://reservations.1stchoice.com/images/next.gif",prevMonthImageUrl:"https://reservations.1stchoice.com/images/prev.gif",nextPrevMonthImageWidth:"10px",nextPrevMonthImageHeight:"18px",nextMonthText:"&gt;",prevMonthText:"&lt;",showWeekNumbers:false,showDaysInNextMonth:true,showDaysInPrevMonth:true,showTodayButton:true,todayButtonText:"Today",showNoneButton:true,noneButtonText:"None",footNoteText:"",forceSixRows:true,firstDayOfWeek:7,dateFormat:"ShortDate",dayNameFormat:"FirstLetter",displayType:"TextBoxAndImage",buttonText:"Departure Date",nextPrevFormat:"Image",showDayHeader:true,showNextPrevMonth:true,showTitle:true,upYearSelectorImageUrl:"https://reservations.1stchoice.com/images/arrow_up.gif",downYearSelectorImageUrl:"https://reservations.1stchoice.com/images/arrow_down.gif",upDownYearSelectorImageWidth:9,upDownYearSelectorImageHeight:5,upYearSelectorText:"+",downYearSelectorText:"-",upDownYearSelectorFormat:"Image",monthSelectorXOffset:-11,monthSelectorYOffset:2,yearSelectorXOffset:-11,yearSelectorYOffset:2,visibleDate:null,popUpStyle:"",popUpStyleCssClass:"javaCalPopUp",calendarStyle:"",calendarStyleCssClass:"javaCalCalendar",noneButtonStyle:"",noneButtonStyleCssClass:"javaCalClearButton",todayButtonStyle:"",todayButtonStyleCssClass:"javaCalTodayButton",titleStyle:"",titleStyleCssClass:"javaCalTitle",nextPrevStyle:"",nextPrevStyleCssClass:"javaCalNextPrev",dayHeaderStyle:"",dayHeaderStyleCssClass:"javaCalDayHeader",dayStyle:"",dayStyleCssClass:"javaCalDay",otherMonthDayStyle:"",otherMonthDayStyleCssClass:"javaCalOtherMonthDay javaCalDay",weekendDayStyle:"",weekendDayStyleCssClass:"javaCalWeekendDay javaCalDay",selectedDayStyle:"",selectedDayStyleCssClass:"javaCalSelectedDay javaCalDay",todayDayStyle:"",todayDayStyleCssClass:"javaCalTodayDay javaCalDay",footerStyle:"",footerStyleCssClass:"javaCalFooter",footNoteStyle:"",footNoteStyleCssClass:"javaCalFootNote",weekNumberStyle:"",weekNumberStyleCssClass:"javaCalWeekNumber",otherMonthDayWeekendDayStyle:"",otherMonthDayWeekendDayStyleCssClass:"javaCalOtherMonthDay javaCalDay javaCalWeekendDay javaCalDay javaCalDay",selectedDayTodayDayStyle:"",selectedDayTodayDayStyleCssClass:"javaCalTodayDay javaCalDay javaCalSelectedDay javaCalDay javaCalDay",selectedDayWeekendDayStyle:"",selectedDayWeekendDayStyleCssClass:"javaCalSelectedDay javaCalDay javaCalWeekendDay javaCalDay javaCalDay",todayDayWeekendDayStyle:"",todayDayWeekendDayStyleCssClass:"javaCalTodayDay javaCalDay javaCalWeekendDay javaCalDay javaCalDay",postBackFunction:"__doPostBack('txtEndDate','')",dateFormat:"M/d/yyyy",culture:"javaCalendarCulture_en_US",specialDates:""};function wp_HttpRequest(mcfg){var self=this;var obj=null;var data=null;var cfg={mode:(mcfg.mode=="dom")?"dom":"text",autoload:(mcfg.autoload==false)?false:true,url:mcfg.url?mcfg.url:"",parameters:mcfg.parameters?mcfg.parameters:"",method:(mcfg.method=="post")?"post":"get",form:mcfg.form?mcfg.form:"",cache:(mcfg.cache==false)?false:true,onload:mcfg.onload,onerror:mcfg.onerror,spanid:mcfg.spanid};try{var debug=new wp_Log();}catch(e){var debug=new Object();debug.log=function(){};};this._function="wp_HttpRequest";this.debug=debug;init();function init(){if(cfg["autoload"]&&cfg["url"]){createConnection();load();}}
function createConnection(){if(cfg["mode"]=="dom"){if(document.implementation&&document.implementation.createDocument){obj=document.implementation.createDocument("","",null);obj.onload=onload();}else if(window.ActiveXObject){obj=new ActiveXObject("Microsoft.XMLDOM");}else{obj=null;}}else{if(window.XMLHttpRequest&&!(window.ActiveXObject)){obj=new XMLHttpRequest();}else if(window.ActiveXObject){var ver=new Array("Msxml6","Msxml5","Msxml3","Msxml2","Msxml4","Microsoft");var i=0;do{try{obj=new ActiveXObject(ver[i++]+".XMLHTTP");}catch(e){obj=null;}}while(!obj&&i<ver.length);}}
if(!obj&&cfg["onerror"]){cfg["onerror"]();}
if(obj){obj.onreadystatechange=onstatechange;}}
this.cancel=function(){if(obj)
obj.abort();}
function load(location,parameters){location=location?location:cfg.url;if(!location){return false;}
if(location.indexOf("?")>-1){parameters=location.split("?")[1];location=location.split("?")[0];}else if(!parameters){parameters=cfg.parameters;}
if(!cfg.cache){if(parameters.length){parameters+="&";}
parameters+="__wp_nocache=";parameters+=Math.random();}
debug.log(self,parameters);if(cfg.mode=="dom"){obj.load(url);}else{createConnection();location=location+((parameters.length)?("?"+parameters):"");obj.open("GET",location,true);obj.send(null);}}
this.load=load;this.submit=function(form,field,action){form=form?form:cfg.form;var parameters=null;var data="";var wpform=null;debug.log(self,"trying to create wp_Form with: "+form);try{wpform=new wp_Form({id:form});}catch(err){debug.log(self,"FATAL: wp_Form missing...");}
if(!wpform||!form||(field&&!document[form][field])){if(cfg.onerror){cfg.onerror();}
return;}
action=action?action:cfg.action;action=action?action:document.getElementById(form).action;action=action?action:"/";if(field){parameters=wpform.collect(field);}else{parameters=wpform.collect();}
for(param in parameters){if(typeof parameters[param]!="function"){if(data){data+="&";}
if(typeof parameters[param]=="string"){data+=(param+"="+escape(parameters[param]));}else{for(var count=0;count<parameters[param].length;count++){if(data&&count){data+="&";}
data+=(param+"="+escape(parameters[param][count]));}}}}
if(!cfg.cache){if(data.length){data+="&";}
data+="__wp_nocache=";data+=Math.random();}
debug.log(self,"data: "+data);debug.log(self,"Posting "+data.length+" bytes of data to: "+action);createConnection();obj.open("POST",action,true);obj.setRequestHeader("Content-type","application/x-www-form-urlencoded");obj.setRequestHeader("Content-length",data.length);obj.setRequestHeader("Connection","close");obj.send(data);};function onstatechange(){if(cfg["onstatechange"]){cfg["onstatechange"](obj.readyState);}
if(obj.readyState==4){onload();}}
function onload(){var doc=null;if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(obj.responseText);}else{var dp=new DOMParser();doc=dp.parseFromString(obj.responseText,"text/xml");}
this.dom=doc.documentElement;this.text=obj.responseText;this.id=cfg["spanid"]
debug.log(self,"Recieving "+this.text.length+" bytes of data");if(cfg["onload"]){cfg["onload"](this);}}}
function getServerName(){var str=window.location.protocol+'//'+window.location.hostname;return str;}
var finishTime;var startTime;function showData(obj){finishTime=new Date();Stoptimer();var strHtml;var strXML=obj.text.toString();if(strXML.indexOf('Sorry')!=-1){strHtml=strXML;}else{var iDifT=((finishTime.getTime()-startTime.getTime())*.001);iDifT=iDifT.toFixed(2);strHtml=strXML;}
document.getElementById('loadingData').innerHTML='';document.getElementById('propertylist').innerHTML=strHtml;if(document.getElementById('searchtime')){var oField=document.getElementById('searchtime');oField.innerText=iDifT;}}
function abort(obj){document.getElementById('loadingData').innerHTML='';document.getElementById('propertylist').innerHTML="Sorry, Could not finish your query, please try again";obj=null;}
var get=new wp_HttpRequest({autoload:false,cache:false,onload:showData,onerror:abort});var oInterval="";function fnStopInterval(){if(oInterval!=""){window.clearInterval(oInterval);oInterval="";}}
function CompareChange(){document.getElementById('loadingData').innerHTML="";fnStopInterval();oInterval=window.setInterval("fnRecycle()",2000);}
function fnRecycle(){fnStopInterval();CompareChange_start();}
var timerID=0;var tStart=null;var showTime;function UpdateTimer(){if(timerID){clearTimeout(timerID);clockID=0;}
if(!tStart)
tStart=new Date();var tDate=new Date();var tDiff=tDate.getTime()-tStart.getTime();tDate.setTime(tDiff);document.getElementById('theTime').innerHTML=(tDate.getMinutes()+":"+tDate.getSeconds());timerID=setTimeout("UpdateTimer()",1000);}
function Starttimer(){showTime='';tStart=new Date();document.getElementById('theTime').innerHTML='';timerID=setTimeout("UpdateTimer()",1000);}
function Stoptimer(){if(timerID){clearTimeout(timerID);timerID=0;}
tStart=null;}
function CompareChange_start(orderby){startTime=new Date();if(orderby>0){document.getElementById('loadingData').innerHTML="<div id='loadingText'><img src='http://templatedocs.livereznetwork.com/template-images/loading.gif' align=absmiddle> Sorting Available Properties</div>";}else{document.getElementById('loadingData').innerHTML="<div id='loadingText'><img src='http://templatedocs.livereznetwork.com/template-images/loading.gif' align=absmiddle> Loading Available Properties <span id=theTime></span></div>";
//Starttimer();
}
var formObj=document.FormX
var strURL=setstrURL;var url=getServerName()+strURL;var selectedBeds=0;if(document.getElementById("AmenBedrooms")){selectedBeds=formObj.AmenBedrooms.options[formObj.AmenBedrooms.options.selectedIndex].value;}
url+="&beds="+selectedBeds
var selectedsleeps=0;if(document.getElementById("MaxPersons")){selectedsleeps=formObj.MaxPersons.options[formObj.MaxPersons.options.selectedIndex].value;}
url+="&sleeps="+selectedsleeps
url+="&arrivaldate="+selectedArrivalDate
url+="&departuredate="+selectedDepartureDate
var selectedcategoryid=0;if(document.getElementById("categoryid")){selectedcategoryid=formObj.categoryid.options[formObj.categoryid.options.selectedIndex].value;}
url+="&categoryid="+selectedcategoryid
var selectedLocationID=0;if(document.getElementById("LocationDataID")){selectedLocationID=formObj.LocationDataID.options[formObj.LocationDataID.options.selectedIndex].value;}
url+="&locationid="+selectedLocationID
url+="&comparesearch="+setcomparesearch
var selectedStyle=0;if(document.getElementById("Style")){selectedStyle=formObj.Style.options[formObj.Style.options.selectedIndex].value;}
url+="&style="+selectedStyle;url+="&communityid="+setCommunityid;url+="&admincustdataid="+setcustomerid;url+="&dynsiteid="+setwebsiteid;url+="&searchtype="+setsearchtype;var advs="";if(document.getElementById("advs")!=null){var checkBoxArr=getSelectedCheckboxValue(formObj.advs);if(checkBoxArr.length !=0){for(var i=0;i<checkBoxArr.length;i++){if(i>0){advs+=","}
advs+=checkBoxArr[i];}}}
url+="&advs="+advs;var setpagedataid=0;if(document.getElementById("searchpagedataid")!=null){setpagedataid=document.FormX.pagedataid.options[document.FormX.pagedataid.options.selectedIndex].value;}
url+="&pagedataid="+setpagedataid;if(orderby>0){url+="&O="+orderby;}
get.load(url);}
spinningimage=newImage("http://templatedocs.livereznetwork.com/template-images/loading.gif");function getSelectedCheckbox(buttonGroup){var retArr=new Array();var lastElement=0;if(buttonGroup[0]){for(var i=0;i<buttonGroup.length;i++){if(buttonGroup[i].checked){retArr.length=lastElement;retArr[lastElement]=i;lastElement++;}}}else{if(buttonGroup.checked){retArr.length=lastElement;retArr[lastElement]=0;}}
return retArr;}
function getSelectedCheckboxValue(buttonGroup){var retArr=new Array();var selectedItems=getSelectedCheckbox(buttonGroup);if(selectedItems.length !=0){retArr.length=selectedItems.length;for(var i=0;i<selectedItems.length;i++){if(buttonGroup[selectedItems[i]]){retArr[i]=buttonGroup[selectedItems[i]].value;}else{retArr[i]=buttonGroup.value;}}}
return retArr;}
function viewproperty(strPageDataID,strUnitID){var formObj=document.viewproperty;formObj.PageDataID.value=strPageDataID;formObj.WebReferencePageDataID.value=strPageDataID;formObj.InventoryUnitDataID.value=strUnitID;formObj.submit();}
if(browser.isIE){var arVersion=navigator.appVersion.split("MSIE")
var version=parseFloat(arVersion[1])
if(version<7&&document.body.filters){for(var i=0;i<document.images.length;i++){var img=document.images[i]
var imgName=img.src.toUpperCase()
if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){var imgID=(img.id)?"id='"+img.id+"' ":""
var imgClass=(img.className)?"class='"+img.className+"' ":""
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' "
var imgStyle="display:inline-block;"+img.style.cssText
if(img.align=="left")imgStyle="float:left;"+imgStyle
if(img.align=="right")imgStyle="float:right;"+imgStyle
if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle
var strNewHTML="<span "+imgID+imgClass+imgTitle+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+img.src+"\', sizingMethod='scale');\"></span>"
img.outerHTML=strNewHTML
i=i-1}}}}
function goProperty(box){var val=box.options[box.selectedIndex].value;if(val !=""){window.parent.location.href=val;}}
function sendtofriend(PageDataID){window.parent.location.href='vacation-rental-home-stf.asp?PageDataID='+PageDataID;}
function propertycontact(PageDataID,AD,DD){window.parent.location.href='vacation-rental-home-contact.asp?PageDataID='+PageDataID+'&ad='+AD+'&dd='+DD;}
var timeout=150;var closetimer=0;var ddmenuitem=0;function mopen(id){mcancelclosetime();if(ddmenuitem)ddmenuitem.style.visibility='hidden';ddmenuitem=document.getElementById(id);ddmenuitem.style.visibility='visible';}
function mclose(){if(ddmenuitem)ddmenuitem.style.visibility='hidden';}
function mclosetime(){closetimer=window.setTimeout(mclose,timeout);}
function mcancelclosetime(){if(closetimer){window.clearTimeout(closetimer);closetimer=null;}}
document.onclick=mclose;navTimer=null;currentNav=0;o_navigator=navigator.userAgent
var isIE5=(o_navigator.indexOf("MSIE 5")>-1)?1:0;var isMac=(o_navigator.indexOf("Mac")>-1)?1:0;var isIE50=(o_navigator.indexOf("MSIE 5.0")>-1)?1:0;var isIE52=(o_navigator.indexOf("MSIE 5.2")>-1)?1:0;var isNN6=(o_navigator.indexOf("Netscape6")>-1)?1:0;var isDOM=(document.getElementById)?1:0;function mainNavOver(o_div){if(isDOM&&!isNN6&&!isIE52&&!isIE50){if(currentNav)currentNav.className="";clearTimeout(navTimer);o_div.className="navOver";}}
function mainNavOut(o_div){if(isDOM&&!isNN6&&!isIE52&&!isIE50){currentNav=o_div;navTimer=setTimeout('currentNav.className=""',1);}}
function checkforCookies(){var acceptsCookies=false;if(document.cookie==''){document.cookie='acceptsCookies=yes';if(document.cookie.indexOf('acceptsCookies=yes')!=-1){acceptsCookies=true;}}else{acceptsCookies=true;}
return acceptsCookies}
function FixCookieDate(date){var base=new Date(0);var skew=base.getTime();if(skew>0)
date.setTime(date.getTime()-skew);}
function setCookie(name,value,hours,path,domain,secure){var acceptsCookies=checkforCookies();if(acceptsCookies){if(hours){if((typeof(hours)=='string')&&Date.parse(hours)){var numHours=hours;}else if(typeof(hours)=='number'){if(navigator.appVersion.indexOf("Mac")!=-1){var expdate=new Date();FixCookieDate(expdate);var numHours=expdate.getTime()+hours*3600000;}else{var numHours=(new Date((new Date()).getTime()+hours*3600000)).toGMTString();}}}
var theCookie=name+'='+escape(value)+((numHours)?(';expires='+numHours):'')+((path)?';path='+path:'')+((domain)?';domain='+domain:'')+((secure&&(secure==true))?'; secure':'');document.cookie=theCookie;}}
function readCookie(name){if(document.cookie==''){return false;}else{var firstChar,lastChar;var theBigCookie=document.cookie;firstChar=theBigCookie.indexOf(name);var NN2Hack=firstChar+name.length;if((firstChar !=-1)&&(theBigCookie.charAt(NN2Hack)=='=')){firstChar+=name.length+1;lastChar=theBigCookie.indexOf(';',firstChar);if(lastChar==-1)lastChar=theBigCookie.length;return unescape(theBigCookie.substring(firstChar,lastChar));}else{return false;}}}
function RemoveCookie(name,path,domain){var theValue=readCookie(name);if(theValue){document.cookie=name+'='+theValue+'; expires=Fri, 13-Apr-1970 00:00:00 GMT'+((path)?';path='+path:'')+((domain)?';domain='+domain:'');}}
function RemoveCookie_all(name){var theValue=readCookie(name);if(theValue){document.cookie='expires=Fri, 13-Apr-1970 00:00:00 GMT';}}
function idxshw(show){switch(show){case "1":
if(document.getElementById("r1")!=null){document.getElementById("s-Availabilty").style.display="";if(document.getElementById("s-search-compare")!=null){document.getElementById("s-search-compare").style.display="none";}
if(document.getElementById("s-calendar-searh")!=null){document.getElementById("s-calendar-searh").style.display="none";}
document.getElementById("r1").checked=true;setCookie("indexSearch",show,8760,'/',"","");}else{RemoveCookie("indexSearch",'/',"");}
break;case "2":
if(document.getElementById("s-search-compare")!=null){document.getElementById("s-search-compare").style.display="";if(document.getElementById("s-Availabilty")!=null){document.getElementById("s-Availabilty").style.display="none";}
if(document.getElementById("s-calendar-searh")!=null){document.getElementById("s-calendar-searh").style.display="none";}
document.getElementById("r2").checked=true;setCookie("indexSearch",show,8760,'/',"","");}else{RemoveCookie("indexSearch",'/',"");}
break;case "3":
if(document.getElementById("s-calendar-searh")!=null){document.getElementById("s-calendar-searh").style.display="";if(document.getElementById("s-Availabilty")!=null){document.getElementById("s-Availabilty").style.display="none";}
if(document.getElementById("s-search-compare")!=null){document.getElementById("s-search-compare").style.display="none";}
document.getElementById("r3").checked=true;setCookie("indexSearch",show,8760,'/',"","");}else{RemoveCookie("indexSearch",'/',"");}
break;default:
if(document.getElementById("r1")!=null){document.getElementById("r1").checked=true;}else{RemoveCookie("indexSearch",'/',"");}}}
function setIndexSearch(){if(readCookie("indexSearch")!=false){var out=readCookie("indexSearch");idxshw(out);}}
