var dateFormat="mm/dd/yyyy";if(!objPHPDate){var objPHPDate={aDay:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],aShortDay:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],aLetterDay:["S","M","T","W","T","F","S"],aMonth:["January","February","March","April","May","June","July","August","September","October","November","December"],aShortMonth:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],aSuffix:["th","st","nd","rd","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","st","nd","rd","th","th","th","th","th","th","th","st"],sTimezoneOffset:"",GetTimezoneOffset:function(){var C=new Date();C.setHours(12);C.setMinutes(0);C.setSeconds(0);C.setMilliseconds(0);var B=new Date();B.setMilliseconds(C.getUTCMilliseconds());B.setSeconds(C.getUTCSeconds());B.setMinutes(C.getUTCMinutes());B.setHours(C.getUTCHours());B.setDate(C.getUTCDate());B.setMonth(C.getUTCMonth());B.setFullYear(C.getUTCFullYear());this.sTimezoneOffset=((C.getTime()-B.getTime())/(1000*3600));var A=(this.sTimezoneOffset<0);this.sTimezoneOffset=A?(this.sTimezoneOffset+"").substring(1):this.sTimezoneOffset+"";this.sTimezoneOffset=this.sTimezoneOffset.replace(/\.5/,(parseInt("$1",10)*60)+"");this.sTimezoneOffset+=(this.sTimezoneOffset.substring(this.sTimezoneOffset.length-3)!=":30")?":00":"";this.sTimezoneOffset=(this.sTimezoneOffset.substr(0,this.sTimezoneOffset.indexOf(":")).length==1)?"0"+this.sTimezoneOffset:this.sTimezoneOffset;this.sTimezoneOffset=A?"-"+this.sTimezoneOffset:"+"+this.sTimezoneOffset;delete C;delete B;return true},PHPDate:function(){var E=(arguments.length>0)?arguments[0]:"";var F=this.getFullYear();var A=F+"";var D=this.getMonth();var H=(D+1)+"";var K=(H.length==1)?"0"+H:H;var B=this.getDate();var G=B+"";var J=(G.length==1)?"0"+G:G;var C=this.getDay();var I=C+"";E=E.replace(/([cDdFjLlMmNnrSUwYy])/g,"y5-cal-regexp:$1");E=E.replace(/y5-cal-regexp:c/g,A+"-"+K+"-"+J+"T00:00:00"+objPHPDate.sTimezoneOffset);E=E.replace(/y5-cal-regexp:D/g,objPHPDate.aShortDay[C]);E=E.replace(/y5-cal-regexp:d/g,J);E=E.replace(/y5-cal-regexp:F/g,objPHPDate.aMonth[D]);E=E.replace(/y5-cal-regexp:j/g,B);E=E.replace(/y5-cal-regexp:L/g,objPHPDate.aLetterDay[C]);E=E.replace(/y5-cal-regexp:l/g,objPHPDate.aDay[C]);E=E.replace(/y5-cal-regexp:M/g,objPHPDate.aShortMonth[D]);E=E.replace(/y5-cal-regexp:m/g,K);E=E.replace(/y5-cal-regexp:N/g,(C==0)?7:C);E=E.replace(/y5-cal-regexp:n/g,H);E=E.replace(/y5-cal-regexp:r/g,objPHPDate.aShortDay[C]+", "+J+" "+objPHPDate.aShortMonth[D]+" "+A+" 00:00:00 "+objPHPDate.sTimezoneOffset.replace(/:/,""));E=E.replace(/y5-cal-regexp:S/g,objPHPDate.aSuffix[B]);E=E.replace(/y5-cal-regexp:U/g,parseInt((this.getTime()/1000),10));E=E.replace(/y5-cal-regexp:w/g,C);E=E.replace(/y5-cal-regexp:Y/g,A);E=E.replace(/y5-cal-regexp:y/g,A.substring(2));return E}};objPHPDate.GetTimezoneOffset();Date.prototype.getPHPDate=objPHPDate.PHPDate}function DateChooser(){var nWeekStartDay=0;var nXOffset=0;var nYOffset=0;var nTimeout=0;var objAllowedDays={"0":true,"1":true,"2":true,"3":true,"4":true,"5":true,"6":true};var fnUpdate=null;var sDefaultIcon=false;var objUpdateFields=false;var objEarliestDate=null;var objLatestDate=null;var onClearDates=false;if(!arguments||!document.getElementById||!document.getElementsByTagName){return null}var ndBodyElement=document.getElementsByTagName("body").length?document.getElementsByTagName("body")[0]:document;var objTimeout=null;var ndFrame=null;
/*@cc_on@*/
/*@if(@_jscript_version < 6)
		if (document.getElementById('iframehack'))
		{
			ndFrame = document.getElementById('iframehack');
		}
		else
		{
			ndFrame = xb.createElement('iframe');
			ndFrame.id = 'iframehack';
			ndFrame.src = 'javascript:null;';
			ndFrame.scrolling = 'no';
			ndFrame.frameBorder = 0;
			ndFrame.style.border = '0';
			ndFrame.style.padding = 0;
			ndFrame.style.display = 'none';
			ndFrame.style.position = 'absolute';
			ndFrame.style.zIndex = '5000';

			ndBodyElement.appendChild(ndFrame);
		}
	/*@end@*/
var nDateChooserID=0;while(document.getElementById("calendar"+nDateChooserID)){++nDateChooserID}var sDateChooserID="calendar"+nDateChooserID;var objSelectedDate=null;var objStartDate=new Date();objStartDate.setHours(12);objStartDate.setMinutes(0);objStartDate.setSeconds(0);objStartDate.setMilliseconds(0);var objMonthYear=new Date(objStartDate);objMonthYear.setDate(1);var ndDateChooser=xb.createElement("div");ndDateChooser.id=sDateChooserID;ndDateChooser.className="calendar";ndDateChooser.style.visibility="hidden";ndDateChooser.style.position="absolute";ndDateChooser.style.top="0";ndDateChooser.style.left="0";ndBodyElement.appendChild(ndDateChooser);var AddClickEvents=function(){var aToolLinks=ndDateChooser.getElementsByTagName("div")[0].getElementsByTagName("a");for(var nNavLink=0;aToolLinks[nNavLink];++nNavLink){events.add(aToolLinks[nNavLink],"click",function(e){if(ndFrame){ndFrame.style.display="none"}ndDateChooser.style.visibility="hidden";if(objTimeout){clearTimeout(objTimeout)}ClearDates();return false})}var aNavLinks=ndDateChooser.getElementsByTagName("thead")[0].getElementsByTagName("a");for(var nNavLink=0;aNavLinks[nNavLink];++nNavLink){events.add(aNavLinks[nNavLink],"click",function(e){e=e||events.fix(event);var ndClicked=e.target||e.srcElement;if(ndClicked.nodeName=="#text"){ndClicked=ndClicked.parentNode}var sClass=ndClicked.className;if(sClass=="previousyear"){objMonthYear.setFullYear(objMonthYear.getFullYear()-1);if(objEarliestDate&&objEarliestDate.getTime()>objMonthYear.getTime()){objMonthYear.setMonth(objEarliestDate.getMonth());objMonthYear.setFullYear(objEarliestDate.getFullYear())}}else{if(sClass=="previousmonth"){objMonthYear.setMonth(objMonthYear.getMonth()-1);if(objEarliestDate&&objEarliestDate.getTime()>objMonthYear.getTime()){objMonthYear.setMonth(objEarliestDate.getMonth());objMonthYear.setFullYear(objEarliestDate.getFullYear())}}else{if(sClass=="currentdate"){objMonthYear.setMonth(objStartDate.getMonth());objMonthYear.setFullYear(objStartDate.getFullYear())}else{if(sClass=="nextmonth"){objMonthYear.setMonth(objMonthYear.getMonth()+1);if(objLatestDate&&objLatestDate.getTime()<objMonthYear.getTime()){objMonthYear.setMonth(objLatestDate.getMonth());objMonthYear.setFullYear(objLatestDate.getFullYear())}}else{if(sClass=="nextyear"){objMonthYear.setFullYear(objMonthYear.getFullYear()+1);if(objLatestDate&&objLatestDate.getTime()<objMonthYear.getTime()){objMonthYear.setMonth(objLatestDate.getMonth());objMonthYear.setFullYear(objLatestDate.getFullYear())}}}}}}RefreshDisplay();return false})}var aDateLinks=ndDateChooser.getElementsByTagName("tbody")[0].getElementsByTagName("a");for(var nDateLink=0;aDateLinks[nDateLink];++nDateLink){events.add(aDateLinks[nDateLink],"click",function(e){e=e||events.fix(event);var ndClicked=e.target||e.srcElement;if(ndClicked.nodeName=="#text"){ndClicked=ndClicked.parentNode}for(var nLink=0;aDateLinks[nLink];++nLink){if(aDateLinks[nLink].className=="selecteddate"){aDateLinks[nLink].removeAttribute("class")}}var objTempDate=new Date(objMonthYear);objTempDate.setDate(parseInt(ndClicked.childNodes[0].nodeValue,10));var nTime=objTempDate.getTime();var sWeekday=objTempDate.getPHPDate("w");delete objTempDate;if(objEarliestDate&&objEarliestDate.getTime()>nTime){return false}if(objLatestDate&&objLatestDate.getTime()<nTime){return false}if(!objAllowedDays[sWeekday]){return false}objMonthYear.setTime(nTime);objMonthYear.setDate(1);if(!objSelectedDate){objSelectedDate=new Date(nTime)}objSelectedDate.setTime(nTime);ndClicked.className="selecteddate";if(ndFrame){ndFrame.style.display="none"}ndDateChooser.style.visibility="hidden";if(objTimeout){clearTimeout(objTimeout)}UpdateFields();if(fnUpdate){fnUpdate(objSelectedDate)}return false})}return true};var UpdateFields=function(){if(typeof objUpdateFields.length!="undefined"){for(var sField=0;sField<objUpdateFields.length;sField++){var ndField=objUpdateFields[sField];ndField.value=(objSelectedDate)?objSelectedDate.getPHPDate(objUpdateFields[sField].getAttribute("dateFormat")):dateFormat}}else{if(typeof objUpdateFields=="object"){objUpdateFields.value=(objSelectedDate)?objSelectedDate.getPHPDate(objUpdateFields.getAttribute("dateFormat")):dateFormat}}return true};var ClearDates=function(cancelBubble){var cancelBubble=(typeof cancelBubble!="undefined")?true:false;origSD=objSelectedDate;objSelectedDate=null;UpdateFields();if(cancelBubble){return true}if(onClearDates){onClearDates(origSD)}return true};var RefreshDisplay=function(){var ndTable,ndTHead,ndTR,ndTH,ndA,ndTBody,ndTD,nTime,sWeekday;var sClass="";var objTempDate=new Date(objMonthYear);var objToday=new Date();objToday.setHours(12);objToday.setMinutes(0);objToday.setSeconds(0);objToday.setMilliseconds(0);ndTable=xb.createElement("table");ndTable.setAttribute("summary","DateChooser");ndTHead=xb.createElement("thead");ndTable.appendChild(ndTHead);ndTR=xb.createElement("tr");ndTHead.appendChild(ndTR);ndTH=xb.createElement("th");ndTR.appendChild(ndTH);ndA=xb.createElement("a");ndA.className="previousyear";ndA.setAttribute("href","#");ndA.setAttribute("title","Previous Year");ndTH.appendChild(ndA);ndA.appendChild(document.createTextNode(String.fromCharCode(171)));ndTH=xb.createElement("th");ndTR.appendChild(ndTH);ndA=xb.createElement("a");ndA.className="previousmonth";ndA.setAttribute("href","#");ndA.setAttribute("title","Previous Month");ndTH.appendChild(ndA);ndA.appendChild(document.createTextNode(String.fromCharCode(60)));ndTH=xb.createElement("th");ndTH.setAttribute("colspan","3");
/*@cc_on@*/
/*@if(@_jscript)
			ndTH.colSpan = '3';
		/*@end@*/
ndTR.appendChild(ndTH);ndA=xb.createElement("a");ndA.className="currentdate";ndA.setAttribute("href","#");ndA.setAttribute("title","Current Date");ndTH.appendChild(ndA);ndA.appendChild(document.createTextNode(objMonthYear.getPHPDate("M Y")));ndTH=xb.createElement("th");ndTR.appendChild(ndTH);ndA=xb.createElement("a");ndA.className="nextmonth";ndA.setAttribute("href","#");ndA.setAttribute("title","Next Month");ndTH.appendChild(ndA);ndA.appendChild(document.createTextNode(String.fromCharCode(62)));ndTH=xb.createElement("th");ndTR.appendChild(ndTH);ndA=xb.createElement("a");ndA.className="nextyear";ndA.setAttribute("href","#");ndA.setAttribute("title","Next Year");ndTH.appendChild(ndA);ndA.appendChild(document.createTextNode(String.fromCharCode(187)));ndTR=xb.createElement("tr");ndTHead.appendChild(ndTR);for(var nDay=0;objPHPDate.aLetterDay[nDay];++nDay){ndTD=xb.createElement("td");ndTR.appendChild(ndTD);ndTD.appendChild(document.createTextNode(objPHPDate.aLetterDay[(nWeekStartDay+nDay)%objPHPDate.aLetterDay.length]))}ndTBody=xb.createElement("tbody");ndTable.appendChild(ndTBody);while(objTempDate.getMonth()==objMonthYear.getMonth()){ndTR=xb.createElement("tr");ndTBody.appendChild(ndTR);for(nDay=0;nDay<7;++nDay){var nWeek=(nWeekStartDay+nDay)%objPHPDate.aLetterDay.length;if((objTempDate.getUTCDay()==nWeek)&&(objTempDate.getMonth()==objMonthYear.getMonth())){nTime=objTempDate.getTime();sWeekday=objTempDate.getPHPDate("w");sClass=(objSelectedDate&&(objTempDate.getTime()==objSelectedDate.getTime()))?"selectedday":"";sClass+=(objTempDate.getTime()==objToday.getTime())?" today":"";sClass=((sClass.length>0)&&(sClass[1]==" "))?sClass.substr(1,sClass.length-1):sClass;ndTD=xb.createElement("td");if((objEarliestDate&&objEarliestDate.getTime()>nTime)||(objLatestDate&&objLatestDate.getTime()<nTime)||!objAllowedDays[sWeekday]){ndTD.className="invalidday"}ndTR.appendChild(ndTD);ndA=xb.createElement("a");if(sClass.length>0){ndA.className=sClass}ndA.setAttribute("href","#");ndTD.appendChild(ndA);ndA.appendChild(document.createTextNode(objTempDate.getDate()));objTempDate.setDate(objTempDate.getDate()+1)}else{ndTD=xb.createElement("td");ndTR.appendChild(ndTD)}}}while(ndDateChooser.hasChildNodes()){ndDateChooser.removeChild(ndDateChooser.firstChild)}ndDateChooser.appendChild(ndTable);if(ndFrame){ndFrame.style.display="block";ndFrame.style.top=ndDateChooser.style.top;ndFrame.style.left=ndDateChooser.style.left;ndFrame.style.width=(ndTable.clientWidth+2)+"px";ndFrame.style.height=(ndTable.clientHeight+4)+"px"}var resetDatesDiv=document.createElement("div");resetDatesDiv.style.textAlign="center";var ndBtmLink=document.createElement("a");ndBtmLink.appendChild(document.createTextNode("clear dates"));ndBtmLink.href="#";resetDatesDiv.appendChild(ndBtmLink);ndDateChooser.appendChild(resetDatesDiv);AddClickEvents();delete objTempDate;delete objToday;return true};var DisplayDateChooser=function(x,y,ndNode){var sPositionX=(typeof x!="undefined")?x:"auto";var sPositionY=(typeof y!="undefined")?y:"auto";var ndNode=(typeof ndNode!="undefined")?ndNode:false;var ndStyle=ndDateChooser.style;ndStyle.top=sPositionY+"";ndStyle.left=sPositionX+"";if(ndNode){var sbw=document.getElementById("stickbar_wrap");if(typeof sbw!="undefined"&&sbw!=null){if(GetPositionType(sbw)=="fixed"){ndDateChooser.style.position="fixed"}else{ndDateChooser.style.position="absolute"}}else{if(GetPositionType(ndNode.offsetParent)=="fixed"){ndDateChooser.style.position="fixed"}else{ndDateChooser.style.position="absolute"}}}ndDateChooser.style.visibility="visible";if(objTimeout){clearTimeout(objTimeout)}if(objSelectedDate){objMonthYear.setTime(objSelectedDate.getTime())}else{objMonthYear.setTime(objStartDate.getTime())}objMonthYear.setHours(12);objMonthYear.setMinutes(0);objMonthYear.setSeconds(0);objMonthYear.setMilliseconds(0);objMonthYear.setDate(1);return RefreshDisplay()};var GetPositionType=function(el){if(typeof document.defaultView!="undefined"&&typeof document.defaultView.getComputedStyle!="undefined"){return document.defaultView.getComputedStyle(el,"").getPropertyValue("position")}else{return el.currentStyle.position}};var GetPosition=function(ndNode){var nTop=0,nLeft=0;if(ndNode.offsetParent){nTop=ndNode.offsetTop;nLeft=ndNode.offsetLeft;while(ndNode.offsetParent){ndNode=ndNode.offsetParent;nTop+=ndNode.offsetTop;nLeft+=ndNode.offsetLeft}}return({top:nTop,left:nLeft})};this.displayPosition=function(){var sPositionX=(arguments.length>0)?arguments[0]:"auto";var sPositionY=(arguments.length>1)?arguments[1]:"auto";return DisplayDateChooser(sPositionX,sPositionY)};this.display=function(e){e=e||events.fix(event);var ndClicked=e.target||e.srcElement;if(ndClicked.nodeName=="#text"){ndClicked=ndClicked.parentNode}var objPosition=GetPosition(ndClicked);DisplayDateChooser(objPosition.left+nXOffset+"px",objPosition.top+nYOffset+"px",ndClicked);return false};this.setXOffset=function(){nXOffset=((arguments.length>0)&&(typeof(arguments[0])=="number"))?parseInt(arguments[0],10):nXOffset;return true};this.setYOffset=function(){nYOffset=((arguments.length>0)&&(typeof(arguments[0])=="number"))?parseInt(arguments[0],10):nYOffset;return true};this.setCloseTime=function(){nTimeout=((arguments.length>0)&&(typeof(arguments[0])=="number")&&(arguments[0]>=0))?arguments[0]:nTimeout;return true};this.setUpdateFunction=function(){if((arguments.length>0)&&(typeof(arguments[0])=="function")){fnUpdate=arguments[0]}return true};this.setOnClearDates=function(){if((arguments.length>0)&&(typeof(arguments[0])=="function")){onClearDates=arguments[0]}return true};this.setUpdateField=function(){objUpdateFields={};if((typeof(arguments[0])=="string")&&(typeof(arguments[1])=="string")&&document.getElementById(arguments[0])){objUpdateFields[arguments[0]]=arguments[1]}else{if((typeof arguments[0]=="object"&&typeof arguments[0].length=="number")&&(typeof(arguments[1])=="object"&&typeof arguments[1].length=="number")){objUpdateFields=[];for(var i=0;i<arguments[0].length;i++){arguments[0][i].setAttribute("dateFormat",arguments[1][i]);objUpdateFields.push(arguments[0][i])}}else{if((typeof(arguments[0])=="object")&&(typeof(arguments[1])=="string")){arguments[0].setAttribute("dateFormat",arguments[1]);objUpdateFields=arguments[0]}else{if(typeof(arguments[0])=="object"){objUpdateFields=arguments[0]}}}}return true};this.setLink=function(){var sLinkText=((arguments.length>0)&&(typeof(arguments[0])=="string"))?arguments[0]:"Choose a date";var ndNode=((arguments.length>1)&&(typeof(arguments[1])=="string"))?document.getElementById(arguments[1]):null;var bPlaceRight=((arguments.length<=2)||arguments[2]);var sTitleText=((arguments.length>3)&&(typeof(arguments[3])=="string"))?arguments[3]:"Click to choose a date";if(!ndNode){return false}var ndAnchor=xb.createElement("a");ndAnchor.className="calendarlink";ndAnchor.href="#";if(sTitleText.length>0){ndAnchor.setAttribute("title",sTitleText)}ndAnchor.appendChild(document.createTextNode(sLinkText));if(bPlaceRight){if(ndNode.nextSibling){ndNode.parentNode.insertBefore(ndAnchor,ndNode.nextSibling)}else{ndNode.parentNode.appendChild(ndAnchor)}}else{ndNode.parentNode.insertBefore(ndAnchor,ndNode)}events.add(ndAnchor,"click",this.display);return true};this.setIcon=function(){var sIconFile=((arguments.length>0)&&(typeof(arguments[0])=="string"))?arguments[0]:sDefaultIcon;var ndNode=((arguments.length>1)&&(typeof(arguments[1])=="string"))?document.getElementById(arguments[1]):null;var bPlaceRight=((arguments.length<=2)||arguments[2]);var sTitleText=((arguments.length>3)&&(typeof(arguments[3])=="string"))?arguments[3]:"Click to choose a date";if(!ndNode||!sIconFile){return false}var ndIcon=xb.createElement("img");ndIcon.className="calendaricon";ndIcon.src=sIconFile;ndIcon.setAttribute("alt","DateChooser Icon "+(nDateChooserID+1));if(sTitleText.length>0){ndIcon.setAttribute("title",sTitleText)}if(bPlaceRight){if(ndNode.nextSibling){ndNode.parentNode.insertBefore(ndIcon,ndNode.nextSibling)}else{ndNode.parentNode.appendChild(ndIcon)}}else{ndNode.parentNode.insertBefore(ndIcon,ndNode)}events.add(ndIcon,"click",this.display);return true};this.setStartDate=function(){if(!arguments.length||!(typeof(arguments[0])=="object")||!arguments[0].getTime){return false}objStartDate.setTime(arguments[0].getTime());objStartDate.setHours(12);objStartDate.setMinutes(0);objStartDate.setSeconds(0);objStartDate.setMilliseconds(0);if(objEarliestDate&&objEarliestDate.getTime()>objStartDate.getTime()){objStartDate.setTime(objEarliestDate.getTime())}else{if(objLatestDate&&objLatestDate.getTime()<objStartDate.getTime()){objStartDate.setTime(objLatestDate.getTime())}}objMonthYear.setMonth(objStartDate.getMonth());objMonthYear.setFullYear(objStartDate.getFullYear());if(!objSelectedDate){objSelectedDate=new Date(objStartDate)}objSelectedDate.setTime(objStartDate);return true};this.setEarliestDate=function(){if(!arguments.length||(typeof(arguments[0])!="object")||!arguments[0].getTime){return false}objEarliestDate=new Date();objEarliestDate.setTime(arguments[0].getTime());objEarliestDate.setHours(12);objEarliestDate.setMinutes(0);objEarliestDate.setSeconds(0);objEarliestDate.setMilliseconds(0);if(objEarliestDate.getTime()>objStartDate.getTime()){objStartDate.setTime(objEarliestDate.getTime());objMonthYear.setMonth(objEarliestDate.getMonth());objMonthYear.setFullYear(objEarliestDate.getFullYear())}if(objSelectedDate&&(objEarliestDate.getTime()>objSelectedDate.getTime())){objSelectedDate.setTime(objEarliestDate.getTime());objMonthYear.setMonth(objEarliestDate.getMonth());objMonthYear.setFullYear(objEarliestDate.getFullYear())}return true};this.setLatestDate=function(){if(!arguments.length||!(typeof(arguments[0])=="object")||!arguments[0].getTime){return false}objLatestDate=new Date();objLatestDate.setTime(arguments[0].getTime());objLatestDate.setHours(12);objLatestDate.setMinutes(0);objLatestDate.setSeconds(0);objLatestDate.setMilliseconds(0);if(objLatestDate.getTime()<objStartDate.getTime()){objStartDate.setTime(objLatestDate.getTime());objMonthYear.setMonth(objLatestDate.getMonth());objMonthYear.setFullYear(objLatestDate.getFullYear())}if(objSelectedDate&&(objLatestDate.getTime()<objSelectedDate.getTime())){objSelectedDate.setTime(objLatestDate.getTime());objMonthYear.setMonth(objLatestDate.getMonth());objMonthYear.setFullYear(objLatestDate.getFullYear())}return true};this.setAllowedDays=function(){if(!arguments.length||!(typeof(arguments[0])=="object")){return false}var nCount;for(nCount=0;nCount<7;++nCount){objAllowedDays[nCount+""]=false}for(nCount=0;arguments[0][nCount]!==undefined;++nCount){objAllowedDays[arguments[0][nCount]+""]=true}return true};this.setWeekStartDay=function(){if(!arguments.length||!(typeof(arguments[0])=="number")){return false}var nNewStartDay=parseInt(arguments[0],10);if((nNewStartDay<0)||(nNewStartDay>6)){return false}nWeekStartDay=nNewStartDay;return true};this.getSelectedDate=function(){return objSelectedDate};this.setSelectedDate=function(objDate){if(!objSelectedDate){objSelectedDate=new Date(objDate)}objSelectedDate.setTime(objDate.getTime());objSelectedDate.setHours(12);objSelectedDate.setMinutes(0);objSelectedDate.setSeconds(0);objSelectedDate.setMilliseconds(0);UpdateFields();return true};this.clearDates=function(cancelBubble){return ClearDates(cancelBubble)};this.updateFields=function(){return UpdateFields()};var clickWindow=function(e){e=e||events.fix(event);var ndTarget=e.target||e.srcElement;if(ndTarget.nodeName=="#text"){ndTarget=ndTarget.parentNode}while(ndTarget&&(ndTarget!=document)){if(ndTarget.className=="calendar"){return true}ndTarget=ndTarget.parentNode}for(var nCount=0;nCount<=nDateChooserID;++nCount){if(ndFrame){ndFrame.style.display="none"}document.getElementById("calendar"+nCount).style.visibility="hidden"}return true};var mouseoverDateChooser=function(){if(objTimeout){clearTimeout(objTimeout)}return true};var mouseoutDateChooser=function(){if(nTimeout>0){objTimeout=setTimeout('document.getElementById("'+sDateChooserID+'").style.visibility = "hidden"; if (document.getElementById("iframehack")) document.getElementById("iframehack").style.display = "none";',nTimeout)}return true};events.add(ndDateChooser,"mouseover",mouseoverDateChooser);events.add(ndDateChooser,"mouseout",mouseoutDateChooser);events.add(document,"mousedown",clickWindow);events.add(window,"scroll",function(){for(var nCount=0;nCount<=nDateChooserID;++nCount){if(ndFrame){ndFrame.style.display="none"}document.getElementById("calendar"+nCount).style.visibility="hidden";if(typeof objUpdateFields.length!="undefined"){for(i=0;i<objUpdateFields.length;i++){if(typeof objUpdateFields[i].blur!="undefined"){objUpdateFields[i].blur()}}}else{if(typeof objUpdateFields=="object"){objUpdateFields.blur()}}}});return true}if(!Array.prototype.push){Array.prototype.push=function(){for(var A=0;arguments[A]!==undefined;A++){this[this.length]=arguments[A]}return this.length}}if(!xb){var xb={createElement:function(A){if(document.createElementNS){return document.createElementNS("http://www.w3.org/1999/xhtml",A)}if(document.createElement){return document.createElement(A)}return null},getElementsByAttribute:function(B,E,C){var H=[];if(!B.all&&!B.getElementsByTagName){return H}var D=RegExp("(^|\\s)"+C+"(\\s|$)");var G,F=B.all||B.getElementsByTagName("*");for(var A=0;F[A];++A){if(!F[A].getAttribute){continue}G=(E=="class")?F[A].className:F[A].getAttribute(E);if((typeof(G)!="string")||(G.length==0)){continue}if(D.test(G)){H.push(F[A])}}return H},getOption:function(A,E){var D=A.getAttribute(E);if(D){return D}var B=(arguments.length==3)?arguments[2]:false;var C=A.className.match(RegExp("(?:^|\\s)"+E+"=(?:\\'|\\\")([^\\'\\\"]+)(?:\\'|\\\"|$)"));return C?C[1]:B}}}if(!events){var events={nEventID:1,add:function(C,D,A){if(!A.$$nEventID){A.$$nEventID=this.nEventID++}if(C.objEvents===undefined){C.objEvents={}}var B=C.objEvents[D];if(!B){B=C.objEvents[D]={};if(C["on"+D]){B[0]=C["on"+D]}}B[A.$$nEventID]=A;C["on"+D]=this.handle;return true},handle:function(D){D=D||events.fix(event);var C=true;if(typeof this.objEvents!="undefined"){var B=this.objEvents[D.type]}else{return false}for(var A in B){this.$$handle=B[A];if(this.$$handle(D)===false){C=false}}return C},fix:function(A){A.preventDefault=this.fix.preventDefault;A.stopPropagation=this.fix.stopPropagation;return A}};events.fix.preventDefault=function(){this.returnValue=false;return true};events.fix.stopPropagation=function(){this.cancelBubble=true;return true}}events.add(window,"load",function(){var ndDateChooser,ndElement,sLastID,sLinkID,objUpdateField,objDate,aPatternNodes;var sDateFormat,sIcon,sText,sXOffset,sYOffset,sCloseTime,sOnUpdate,sStartDate,sEarliestDate,sLatestDate,sAllowedDays,sWeekStartDay,sLinkPosition;var nFieldID=0;objDate=new Date();objDate.setHours(12);objDate.setMinutes(0);objDate.setMilliseconds(0);var aElements=xb.getElementsByAttribute(document,"class","datechooser");for(var nIndex=0;aElements[nIndex];++nIndex){ndDateChooser=aElements[nIndex];if(!ndDateChooser.id){ndDateChooser.id="dc-id-"+(++nFieldID)}sLastID=ndDateChooser.id;sDateFormat=xb.getOption(ndDateChooser,"dc-dateformat");sIcon=xb.getOption(ndDateChooser,"dc-iconlink");sText=xb.getOption(ndDateChooser,"dc-textlink");sXOffset=xb.getOption(ndDateChooser,"dc-offset-x");sYOffset=xb.getOption(ndDateChooser,"dc-offset-y");sCloseTime=xb.getOption(ndDateChooser,"dc-closetime");sOnUpdate=xb.getOption(ndDateChooser,"dc-onupdate");sStartDate=xb.getOption(ndDateChooser,"dc-startdate");sEarliestDate=xb.getOption(ndDateChooser,"dc-earliestdate");sLatestDate=xb.getOption(ndDateChooser,"dc-latestdate");sAllowedDays=xb.getOption(ndDateChooser,"dc-alloweddays");sWeekStartDay=xb.getOption(ndDateChooser,"dc-weekstartday");sLinkPosition=xb.getOption(ndDateChooser,"dc-linkposition");if(sLinkPosition){sLinkID=ndDateChooser.id}objUpdateField={};if(sDateFormat){objUpdateField[ndDateChooser.id]=sDateFormat}aPatternNodes=ndDateChooser.all||ndDateChooser.getElementsByTagName("*");for(var nPattern=0;aPatternNodes[nPattern];++nPattern){ndElement=aPatternNodes[nPattern];sDateFormat=xb.getOption(ndElement,"dc-dateformat");if(!sDateFormat){continue}if(!ndElement.id){ndElement.id="dc-id-"+(++nFieldID)}sLastID=ndElement.id;objUpdateField[sLastID]=sDateFormat;if(!sLinkPosition){xb.getOption(ndElement,"dc-linkposition")}if(sLinkPosition){sLinkID=sLastID}}if(!sLinkPosition){sLinkID=sLastID;sLinkPosition="right"}ndDateChooser.DateChooser=new DateChooser();if(sXOffset){ndDateChooser.DateChooser.setXOffset(sXOffset)}if(sYOffset){ndDateChooser.DateChooser.setYOffset(sYOffset)}if(sCloseTime){ndDateChooser.DateChooser.setCloseTime(sCloseTime)}if(sOnUpdate){ndDateChooser.DateChooser.setUpdateFunction(eval(sOnUpdate))}if(sStartDate){objDate=new Date();objDate.setDate(parseInt(sStartDate.substring(2,4),10));objDate.setMonth(parseInt(sStartDate.substring(0,2),10)-1);objDate.setFullYear(parseInt(sStartDate.substring(4),10));ndDateChooser.DateChooser.setStartDate(objDate)}if(sEarliestDate){objDate=new Date();objDate.setDate(parseInt(sEarliestDate.substring(2,4),10));objDate.setMonth(parseInt(sEarliestDate.substring(0,2),10)-1);objDate.setFullYear(parseInt(sEarliestDate.substring(4),10));ndDateChooser.DateChooser.setEarliestDate(objDate)}if(sLatestDate){objDate=new Date();objDate.setDate(parseInt(sLatestDate.substring(2,4),10));objDate.setMonth(parseInt(sLatestDate.substring(0,2),10)-1);objDate.setFullYear(parseInt(sLatestDate.substring(4),10));ndDateChooser.DateChooser.setLatestDate(objDate)}if(sAllowedDays){ndDateChooser.DateChooser.setAllowedDays(sAllowedDays.split(","))}if(sWeekStartDay){ndDateChooser.DateChooser.setWeekStartDay(parseInt(sWeekStartDay,10))}if(sIcon){ndDateChooser.DateChooser.setIcon(sIcon,sLinkID,(sLinkPosition!="left"))}if(sText){ndDateChooser.DateChooser.setLink(sText,sLinkID,(sLinkPosition!="left"))}ndDateChooser.DateChooser.setUpdateField(objUpdateField)}delete objDate;return true});