dCl=new Array();dCmS=false;dCx=0;dCy=0;function dynCalendar(_1,_2){this.today=new Date();this.date=this.today.getDate();this.month=this.today.getMonth();this.year=this.today.getFullYear();this.objName=_1;this.callbackFunc=_2;this.imagesPath=arguments[2]?arguments[2]:"/graphics/dynCalendar/";this.layerID=arguments[3]?arguments[3]:"dClayer_"+dCl.length;this.offsetX=5;this.offsetY=5;this.useMonthCombo=true;this.useYearCombo=true;this.yearComboRange=5;this.currentMonth=this.month;this.currentYear=this.year;this.show=dCshow;this.writeHTML=dCwriteHTML;this.setOffset=dCsetOffset;this.setOffsetX=dCsetOffsetX;this.setOffsetY=dCsetOffsetY;this.setImagesPath=dCsetImagesPath;this.setMonthCombo=dCsetMonthCombo;this.setYearCombo=dCsetYearCombo;this.setCurrentMonth=dCsetCurrentMonth;this.setCurrentYear=dCsetCurrentYear;this.setYearComboRange=dCsetYearComboRange;this._getLayer=dCgetLayer;this._hideLayer=dChideLayer;this._showLayer=dCshowLayer;this._setLayerPosition=dCsetLayerPosition;this._setHTML=dCsetHTML;this._getDaysInMonth=dCgetDaysInMonth;this._mouseover=dCmouseover;dCl[dCl.length]=this;this.writeHTML();}function dCshow(){var _3,year,monthnames,numdays,thisMonth,firstOfMonth;var _4,row,i,cssClass,linkHTML,previousMonth,previousYear;var _5,nextYear,prevImgHTML,prevLinkHTML,nextImgHTML,nextLinkHTML;var _6,monthCombo,yearComboOptions,yearCombo,html;this.currentMonth=_3=arguments[0]!=null?arguments[0]:this.currentMonth;this.currentYear=year=arguments[1]!=null?arguments[1]:this.currentYear;monthnames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");numdays=this._getDaysInMonth(_3,year);thisMonth=new Date(year,_3,1);firstOfMonth=thisMonth.getDay();_4=new Array(new Array());for(i=0;i<firstOfMonth;i++){_4[0][_4[0].length]="<td>&nbsp;</td>";}row=0;i=1;while(i<=numdays){if(_4[row].length==7){_4[++row]=new Array();}cssClass=(i==this.date&&_3==this.month&&year==this.year)?"dCtoday":"dCday";_4[row][_4[row].length]="<td align=\"center\" class=\""+cssClass+"\" onClick=\"javascript: "+this.callbackFunc+"("+i+", "+(Number(_3)+1)+", "+year+"); "+this.objName+"._hideLayer()\">"+(i++)+"</td>";}for(i=0;i<_4.length;i++){_4[i]=_4[i].join("\n")+"\n";}previousYear=thisMonth.getFullYear();previousMonth=thisMonth.getMonth()-1;if(previousMonth<0){previousMonth=11;previousYear--;}nextYear=thisMonth.getFullYear();_5=thisMonth.getMonth()+1;if(_5>11){_5=0;nextYear++;}prevImgHTML="<img src=\""+this.imagesPath+"/prev.gif\" alt=\"<<\" border=\"0\" />";prevLinkHTML="<a href=\"javascript: "+this.objName+".show("+previousMonth+", "+previousYear+")\">"+prevImgHTML+"</a>";nextImgHTML="<img src=\""+this.imagesPath+"/next.gif\" alt=\"<<\" border=\"0\" />";nextLinkHTML="<a href=\"javascript: "+this.objName+".show("+_5+", "+nextYear+")\">"+nextImgHTML+"</a>";if(this.useMonthCombo){_6="";for(i=0;i<12;i++){selected=(i==thisMonth.getMonth()?"selected=\"selected\"":"");_6+="<option value=\""+i+"\" "+selected+">"+monthnames[i]+"</option>";}monthCombo="<select name=\"months\" onchange=\""+this.objName+".show(this.options[this.selectedIndex].value, "+this.objName+".currentYear)\">"+_6+"</select>";}else{monthCombo=monthnames[thisMonth.getMonth()];}if(this.useYearCombo){yearComboOptions="";for(i=thisMonth.getFullYear()-this.yearComboRange;i<=(thisMonth.getFullYear()+this.yearComboRange);i++){selected=(i==thisMonth.getFullYear()?"selected=\"selected\"":"");yearComboOptions+="<option value=\""+i+"\" "+selected+">"+i+"</option>";}yearCombo="<select style=\"border: 1px groove\" name=\"years\" onchange=\""+this.objName+".show("+this.objName+".currentMonth, this.options[this.selectedIndex].value)\">"+yearComboOptions+"</select>";}else{yearCombo=thisMonth.getFullYear();}html="<table border=\"0\" bgcolor=\"#eeeeee\" class=\"dcTable\">";html+="<tr><td class=\"dCheader\">"+prevLinkHTML+"</td><td colspan=\"5\" align=\"center\" class=\"dCheader\">"+monthCombo+" "+yearCombo+"</td><td align=\"right\" class=\"dCheader\">"+nextLinkHTML+"</td></tr>";html+="<tr>";html+="<td class=\"dCdayname\">Sun</td>";html+="<td class=\"dCdayname\">Mon</td>";html+="<td class=\"dCdayname\">Tue</td>";html+="<td class=\"dCdayname\">Wed</td>";html+="<td class=\"dCdayname\">Thu</td>";html+="<td class=\"dCdayname\">Fri</td>";html+="<td class=\"dCdayname\">Sat</td></tr>";html+="<tr>"+_4.join("</tr>\n<tr>")+"</tr>";html+="</table>";this._setHTML(html);if(!arguments[0]&&!arguments[1]){this._showLayer();this._setLayerPosition();}}function dCwriteHTML(){if(is_ie5up||is_nav6up||is_gecko){document.write("<a href=\"javascript: "+this.objName+".show()\" class=\"dcA\"><img src=\""+this.imagesPath+"dynCalendar.gif\"/></a>");document.write("<div class=\"dynCalendar\" id=\""+this.layerID+"\" onmouseover=\""+this.objName+"._mouseover(true)\" onmouseout=\""+this.objName+"._mouseover(false)\"></div>");}}function dCsetOffset(_7,_8){this.setOffsetX(_7);this.setOffsetY(_8);}function dCsetOffsetX(_9){this.offsetX=_9;}function dCsetOffsetY(_10){this.offsetY=_10;}function dCsetImagesPath(_11){this.imagesPath=_11;}function dCsetMonthCombo(_12){this.useMonthCombo=_12;}function dCsetYearCombo(_13){this.useYearCombo=_13;}function dCsetCurrentMonth(_14){this.currentMonth=_14;}function dCsetCurrentYear(_15){this.currentYear=_15;}function dCsetYearComboRange(_16){this.yearComboRange=_16;}function dCgetLayer(){var _17=this.layerID;if(document.getElementById(_17)){return document.getElementById(_17);}else{if(document.all(_17)){return document.all(_17);}}}function dChideLayer(){this._getLayer().style.visibility="hidden";}function dCshowLayer(){this._getLayer().style.visibility="visible";}function dCsetLayerPosition(){this._getLayer().style.top=(dCy+this.offsetY)+"px";this._getLayer().style.left=(dCx+this.offsetX)+"px";}function dCsetHTML(_18){this._getLayer().innerHTML=_18;}function dCgetDaysInMonth(_19,_20){monthdays=[31,28,31,30,31,30,31,31,30,31,30,31];if(_19!=1){return monthdays[_19];}else{return ((_20%4==0&&_20%100!=0)||_20%400==0?29:28);}}function dCmouseover(_21){dCmS=_21;return true;}dColdOnmousemove=document.onmousemove?document.onmousemove:new Function;document.onmousemove=function(){if(is_ie5up||is_nav6up||is_gecko){if(arguments[0]){dCx=arguments[0].pageX;dCy=arguments[0].pageY;}else{var _22=event.srcElement;var tag=_22.tagName;try{var id=_22.id;}catch(e){var id="";}while(tag.toLowerCase()!="body"&&tag.toLowerCase()!="html"){if(id=="topnav"){return;}_22=_22.parentNode;tag=_22.tagName;try{id=_22.id;}catch(e){id="";}}dCx=event.clientX+document.body.scrollLeft;dCy=event.clientY+document.body.scrollTop;arguments[0]=null;}dColdOnmousemove();}};dColdOnclick=document.onclick?document.onclick:new Function;dColdOnKeyUp=document.onkeyup?document.onkeyup:new Function;document.onclick=function(){if(is_ie5up||is_nav6up||is_gecko){if(!dCmS){for(i=0;i<dCl.length;++i){dCl[i]._hideLayer();}}dColdOnclick(arguments[0]?arguments[0]:null);}};document.onkeyup=function(_25){if(document.all){nAsc=window.event.keyCode;}else{nAsc=_25.which;}if(is_ie5up||is_nav6up||is_gecko){if(nAsc==27){for(i=0;i<dCl.length;++i){dCl[i]._hideLayer();}}dColdOnKeyUp(arguments[0]?arguments[0]:null);}};