function getPosition(b){var a=y=0;if(b.offsetParent){a=b.offsetLeft;y=b.offsetTop;while(b=b.offsetParent){a+=b.offsetLeft;y+=b.offsetTop}}tArray=new Array();tArray.x=a;tArray.y=y;return tArray}function getObj(a){if(document.getElementById){return document.getElementById(a)}else{if(document.all){return document.all[a]}else{if(document.layers){return document.layers[a]}}}}function checkClick(a){a?evt=a:evt=event;CSE=evt.target?evt.target:evt.srcElement;if(getObj("fc")){if(!isChild(CSE,getObj("fc"))){getObj("fc").style.display="none"}}}function isChild(a,b){while(a){if(a==b){return true}a=a.parentNode}return false}function Left(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}function Top(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}document.write('<table id="fc" style="position:absolute;border-collapse:collapse;z-index:100;background:#FFFFFF;border:1px solid #ABABAB;display:none" cellpadding=2>');document.write('<tr><td style="cursor:pointer" onclick="csubm()"><img src="images/arrowleftmonth.gif"></td><td colspan=5 id="mns" align="center" style="color:#000000" style="font:13px Arial"></td><td align="right" style="cursor:pointer" onclick="caddm()"><img src="images/arrowrightmonth.gif"></td></tr>');document.write('<tr><td align=center style="background:#ABABAB;font:12px Arial">S</td><td align=center style="background:#ABABAB;font:12px Arial">M</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">W</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">F</td><td align=center style="background:#ABABAB;font:12px Arial">S</td></tr>');for(var kk=1;kk<=6;kk++){document.write("<tr>");for(var tt=1;tt<=7;tt++){num=7*(kk-1)-(-tt);document.write('<td id="v'+num+'" style="width:18px;height:18px">&nbsp;</td>')}document.write("</tr>")}document.write("</table>");document.all?document.attachEvent("onclick",checkClick):document.addEventListener("click",checkClick,false);var now=new Date;var sccm=now.getMonth();var sccy=now.getFullYear();var ccm=now.getMonth();var ccy=now.getFullYear();var updobj;function lcs(b){updobj=b;pos=getPosition(b);getObj("fc").style.left=pos.x+"px";getObj("fc").style.top=(pos.y+20)+"px";getObj("fc").style.display="";curdt=b.value;curdtarr=curdt.split("-");isdt=true;for(var a=0;a<curdtarr.length;a++){if(isNaN(curdtarr[a])){isdt=false}}if(isdt&(curdtarr.length==3)){ccm=curdtarr[0]-1;ccy=curdtarr[2];prepcalendar(curdtarr[1],curdtarr[0]-1,curdtarr[2])}}function evtTgt(b){var a;if(b.target){a=b.target}else{if(b.srcElement){a=b.srcElement}}if(a.nodeType==3){a=a.parentNode}return a}function EvtObj(a){if(!a){a=window.event}return a}function cs_over(a){evtTgt(EvtObj(a)).style.background="#FFCC66"}function cs_out(a){evtTgt(EvtObj(a)).style.background="#C4D3EA"}function cs_click(a){updobj.value=calvalarr[evtTgt(EvtObj(a)).id.substring(1,evtTgt(EvtObj(a)).id.length)];getObj("fc").style.display="none"}var mn=new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");var mnn=new Array("31","28","31","30","31","30","31","31","30","31","30","31");var mnl=new Array("31","29","31","30","31","30","31","31","30","31","30","31");var calvalarr=new Array(42);function f_cps(a){a.style.background="#C4D3EA";a.style.font="10px Arial";a.style.color="#333333";a.style.textAlign="center";a.style.textDecoration="none";a.style.border="1px solid #6487AE";a.style.cursor="pointer"}function f_cpps(a){a.style.background="#C4D3EA";a.style.font="10px Arial";a.style.color="#ABABAB";a.style.textAlign="center";a.style.textDecoration="line-through";a.style.border="1px solid #6487AE";a.style.cursor="default"}function f_hds(a){a.style.background="#FFF799";a.style.font="bold 10px Arial";a.style.color="#333333";a.style.textAlign="center";a.style.border="1px solid #6487AE";a.style.cursor="pointer"}function prepcalendar(e,a,g){now=new Date();sd=now.getDate();td=new Date();td.setDate(1);td.setFullYear(g);td.setMonth(a);cd=td.getDay();getObj("mns").innerHTML=mn[a]+" "+g;marr=((g%4)==0)?mnl:mnn;for(var f=1;f<=42;f++){f_cps(getObj("v"+parseInt(f)));if((f>=(cd-(-1)))&&(f<=cd-(-marr[a]))){dip=((f-cd<sd)&&(a==sccm)&&(g==sccy));htd=((e!="")&&(f-cd==e));if(dip){f_cpps(getObj("v"+parseInt(f)))}else{if(htd){f_hds(getObj("v"+parseInt(f)))}else{f_cps(getObj("v"+parseInt(f)))}}getObj("v"+parseInt(f)).onmouseover=(dip)?null:cs_over;getObj("v"+parseInt(f)).onmouseout=(dip)?null:cs_out;getObj("v"+parseInt(f)).onclick=(dip)?null:cs_click;getObj("v"+parseInt(f)).innerHTML=f-cd;var c=f-cd;if(c<10){c="0"+c}var b=a-(-1);if(b<10){b="0"+b}calvalarr[f]=""+b+"-"+c+"-"+g}else{getObj("v"+f).innerHTML="&nbsp;";getObj("v"+parseInt(f)).onmouseover=null;getObj("v"+parseInt(f)).onmouseout=null;getObj("v"+parseInt(f)).style.cursor="default"}}}prepcalendar("",ccm,ccy);function caddm(){marr=((ccy%4)==0)?mnl:mnn;ccm+=1;if(ccm>=12){ccm=0;ccy++}cdayf();prepcalendar("",ccm,ccy)}function csubm(){marr=((ccy%4)==0)?mnl:mnn;ccm-=1;if(ccm<0){ccm=11;ccy--}cdayf();prepcalendar("",ccm,ccy)}function cdayf(){if((ccy>sccy)|((ccy==sccy)&&(ccm>=sccm))){return}else{ccy=sccy;ccm=sccm;cfd=scfd}};
