/*
	DateClick Popup Date Picker Copyright 2005 Primoris Software, all rights reserved.
	http://www.primorissoftware.com
	THIS COPY OF DATECLICK IS NOT LICENSED FOR COMMERCIAL USE.
	Please purchase a Professional or Developer license if using DateClick in a "for profit" environment. Unauthorized use of this software is illegal and violates the terms of the EULA.
*/
function calendar(ne){
this.ix="1.1.000";
this.fr=0;
this.xn=0;
this.eR=0;this.BK=new J(ne);this.xe=new Date();this.ma=this.xe.getFullYear();this.uV=Array(43);
this.aryMonths=Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
this.aryDays=Array("S","M","T","W","T","F","S","S");
this.Zh=glbCalendars.length;glbCalendars[glbCalendars.length]=this;
this.Fg="caldiv_"+this.Zh;
this.cH=false;this.sj=null;this.Wa=false;this.tJ=false;this.XP=0;this.jm=0;
this.CG={L:0,t:0,Lo:0,FT:0};this.mV=""; this.ge=Array(3);this.Tg=""; this.OO=null;this.AB=null;
this.tB=null; this.mt=this.BK.Tj("FIELD")?eval(this.BK.Tj("FIELD")):null;
this.Yh=this.BK.Tj("FORMAT")?this.BK.Tj("FORMAT"):"0";this.WO=this.BK.Tj("DELIMITER")?this.BK.Tj("DELIMITER"):"/";
this.tW=this.BK.Tj("HIDELISTBOXES")==true?true:false; this.HK=HK;function HK(obj){ } this.Ar=true;this.Mg=false;
this.Zv=true;this.pf=2000;this.MY=0;this.tO=null;this.HR=null;this.ZH="basic";this.gt=1;this.Je=1;this.fi=false;
this.sU=true;this.PN=0;if(this.BK.Tj("ZEROS")) this.mV+="ZEROS\n";if(this.BK.Tj("MOUSEOVER")) this.mV+="MOUSEOVER\n";
if(this.BK.Tj("SHOWDAYS")) this.mV+="SHOWDAYS\n";if(this.BK.Tj("DELAY")) this.mV+="DELAY\n";
if(this.BK.Tj("BEGINONMONDAY")) this.mV+="BEGINONMONDAY\n";if(this.BK.Tj("ICONLEFT")) this.mV+="ICONLEFT\n";
if(this.BK.Tj("ICONTOP")) this.mV+="ICONTOP\n";if(this.BK.Tj("DIR")) this.mV+="DIR\n";
if(this.BK.Tj("MONTH")) this.mV+="MONTH\n";if(this.BK.Tj("SHADOW")) this.mV+="SHADOW\n";if(this.BK.Tj("CLOSE")) this.mV+="CLOSE\n";if(this.BK.Tj("YEAR")) this.mV+="YEAR\n";if(this.BK.Tj("MOVEMODE")) this.mV+="MOVEMODE\n";
  this.MP=MP;this.eT=eT;this.rX=rX;this.VY=VY;this.OE=OE;this.ox=ox;this.xg=xg;this.lI=lI;this.fU=fU;this.lw=lw;
  this.Xu=Xu;this.JG=JG;this.Wd=Wd;this.GZ=GZ;this.Ds=Ds;this.Gl=Gl;this.Vu=Vu;this.qh=qh;this.writeCalendar=writeCalendar;this.Uc=Uc;this.cD=cD;this.pI=pI;this.aM=aM;this.rY=rY;this.BV=BV;this.Ln=Ln;this.cF=cF;this.sC=sC;this.CZ=CZ;this.Nk=Nk;this.ul=ul;this.fO=fO;this.bI=bI;B=this;function __PUBLIC__(){}function writeCalendar(){  var A; A=document.all?"onClick":"onMouseDown";var a=(document.all&&!document.getElementById)?"width:20;":"";var R=B.Mg?"onMouseOver":A;var d;d=B.fi?"filter: progid:DXImageTransform.Microsoft.DropShadow(color=#777788,direction=135,strength=2);":"";var N=B.HR?"top:"+B.HR+";":"";N+=B.tO?"left:"+B.tO+";":"";N+=N.length>0?"position: absolute;":"";B.qh(); document.write("<img src='"+B.ZH+"/calendar.gif' border='0' align='top' style='"+N+"' "+R+"='glbCalendars["+B.Zh+"].MP(event);if (window.event)window.event.cancelBubble=true;' title='Select Date'>");  document.write("<div id='"+B.Fg+"' ");document.write("onMouseOut='glbCalendars["+B.Zh+"].cF();' ");document.write("style='"+d+a+"position:absolute;display:none;' class='"+B.ZH+"-cl-body'> "); document.write(B.BV()); document.write("</div>"); if(B.Je){document.write("<div id='"+B.Fg+"_year' ");document.write("onMouseOut='glbCalendars["+B.Zh+"].cF();' ");document.write("onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' ");document.write("style='position:absolute;display:none;background-color:white;'> "); document.write(B.rY()); document.write("</div>");} if(B.gt){document.write("<div id='"+B.Fg+"_month' ");document.write("onMouseOut='glbCalendars["+B.Zh+"].sC();' ");document.write("onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' ");document.write("style='position:absolute;display:none;background-color:white;'> "); document.write(B.aM()); document.write("</div>");}if(this.mV){if(confirm("The following options are not available in DateClick Standard:\n"+ this.mV+"\nTo obtain DateClick Professional or Developer, please "+ "click 'OK' to be redirected straight to our website.")){document.location.href="http://www.primorissoftware.com/purchase.asp";}}}function __DISPLAY__(){}function MP(p){var r,o;p=v(p);o=B.Ln(p);if(B.tJ) return false;if(B.tW){if(!NI.length>0) q();}if(document.getElementById) r=document.getElementById(B.Fg);else if(document.all) r=document.all[B.Fg];else r=document.layers[B.Fg];B.sj=r;B.GZ();clearInterval(B.OO);for(var l=0;l<NI.length;l++){NI[l].style.visibility="hidden";}for(var l=0;l<glbCalendars.length;l++){if(glbCalendars[l]==B) glbCalendars[l].cH=true;else glbCalendars[l].cH=false;if(!glbCalendars[l].cH){glbCalendars[l].eT();}}if(r){if(!B.XP) B.ul(r,o);r.style.zIndex=++JP;B.HK(r );r.style.display="block";B.tJ=true;B.CG=S(r);if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}}return false;}function ox(p){var r,Z,k,o=B.Ln(p);if(B.Wa) return false;clearInterval(B.OO);if(document.getElementById){r=document.getElementById(B.Fg);Z=document.getElementById(B.Fg+"_month");}else if(document.all){r=document.all[B.Fg];Z=document.all[B.Fg+"_month"];}else{r=document.layers[B.Fg];Z=document.layers[B.Fg+"_month"];}B.rX();if(r){Z.style.display="block";B.fO(r,Z );Z.style.zIndex=++JP;}}function OE(p){var r,Q,k,o=B.Ln(p);if(B.Wa) return false;clearInterval(B.OO);if(document.getElementById){r=document.getElementById(B.Fg);Q=document.getElementById(B.Fg+"_year");}else if(document.all){r=document.all[B.Fg];Q=document.all[B.Fg+"_year"];}else{r=document.layers[B.Fg];Q=document.layers[B.Fg+"_year"];}B.VY();if(r){Q.style.display="block";B.bI(r,Q );Q.style.zIndex=++JP;}}function eT(){var r;if(!B.tJ) return false;if(document.getElementById){r=document.getElementById(B.Fg).style;}else if(document.all){r=document.all[B.Fg].style;}else{r=document.layers[B.Fg];}if(r){r.display="none";}if(B.Je) B.rX();if(B.gt) B.VY();B.tJ=false;for(var l=0;l<NI.length;l++){if(NI[l].style) NI[l].style.visibility="visible";}clearInterval(B.OO);}function VY(){var Z;if(document.getElementById){Z=document.getElementById(B.Fg+"_month");if(Z) Z=Z.style;}else if(document.all){Z=document.all[B.Fg+"_month"];if(Z) Z=Z.style;}else{Z=document.layers[B.Fg+"_month"];}if(Z){Z.display="none";}}function rX(){var Q;if(document.getElementById){Q=document.getElementById(B.Fg+"_year");if(Q) Q=Q.style;}else if(document.all){Q=document.all[B.Fg+"_year"];if(Q) Q=Q.style;}else{Q=document.layers[B.Fg+"_year"];}if(Q){Q.display="none";}}function __EVENTS__(){}function Xu(argCell){clearInterval(B.OO);if(argCell.className==B.ZH+"-cl-on-month") argCell.className=B.ZH+"-cl-on-month-lit";else if(argCell.className==B.ZH+"-cl-off-month") argCell.className=B.ZH+"-cl-off-month-lit";else if(argCell.className==B.ZH+"-cl-year") argCell.className=B.ZH+"-cl-year-lit";}function JG(argCell){if(argCell.className==B.ZH+"-cl-on-month-lit") argCell.className=B.ZH+"-cl-on-month";else if(argCell.className==B.ZH+"-cl-off-month-lit") argCell.className=B.ZH+"-cl-off-month";else if(argCell.className==B.ZH+"-cl-year-lit") argCell.className=B.ZH+"-cl-year";}function xg(){B.xe.setMonth(++B.xn);qh();Wd(B.Fg,BV());}function fU(){B.ma+=10;Wd(B.Fg+"_year",rY());}function lI(){B.xe.setMonth(--B.xn);qh();Wd(B.Fg,BV());}function lw(){B.ma-=10;Wd(B.Fg+"_year",rY());}function Uc(td){var O=new Date(td.title);var b;B.ge[0]=O.getFullYear();B.ge[1]=B.Nk(O.getMonth()+1);B.ge[2]=B.Nk(O.getDate());switch(B.Yh){case "1":b=B.ge[2]+B.WO+ B.ge[1]+B.WO+B.ge[0];break;case "2":b=B.ge[0]+B.WO+ B.ge[1]+B.WO+B.ge[2];break;default:b=B.ge[1]+B.WO+ B.ge[2]+B.WO+B.ge[0];break;}if(B.mt) B.mt.value=b;if(B.sU) B.eT();B.Tg=b;}function pI(intYear,ob){B.xe.setFullYear(intYear);qh();Wd(B.Fg,BV());B.cH=true;B.rX(); if(window.event) event.cancelBubble=true;else ob.stopPropagation();}function cD(intMonth,ob){B.xe.setMonth(intMonth);qh();Wd(B.Fg,BV());B.cH=true;B.VY(); if(window.event) event.cancelBubble=true;else ob.stopPropagation();}function __INTERNAL__(){}function GZ(){B.sj.onmousedown=B.Ds;if(isNaN(parseInt(B.sj.style.left))) B.sj.style.left="0px";if(isNaN(parseInt(B.sj.style.top))) B.sj.style.top="0px";B.sj.PG=new Function();B.sj.qV=new Function();B.sj.mP=new Function();}function Ds(E){E=v(E);var t=parseInt(B.sj.style.top);var L=parseInt(B.sj.style.left);B.VY();B.rX();B.sj.PG(L,t);B.Wa=true;if(B.PN){B.sj.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=60);";B.sj.style.cursor="move";B.XP=E.clientX;B.jm=E.clientY;}document.onmousemove=B.Gl;document.onmouseup=B.Vu;return false;}function Gl(E){E=v(E);var s=E.clientY;var G=E.clientX;var t=parseInt(B.sj.style.top);var L=parseInt(B.sj.style.left);var W,X;W=L+(G-B.XP);X=t+(s-B.jm);if(B.PN){B.sj.style["left"]=W+"px";B.sj.style["top"]=X+"px";B.XP=G;B.jm=s;}B.sj.mP(W,X);return false;}function Vu(){document.onmousemove=null;document.onmouseup=null;B.sj.qV(parseInt(B.sj.style["left"]),parseInt(B.sj.style["top"]));if(B.PN){B.sj.style.filter="";B.sj.style.cursor="arrow";B.CG=S(B.sj);if(B.PN>1){B.XP=0;B.jm=0;}}B.Wa=false;}function qh(){var g,F=0;var P,u;var K=B.xe;var l,I=1;B.fr=K.getDate();B.xn=K.getMonth();B.eR=K.getFullYear();g=new Date(B.eR,B.xn,1);  F-=g.getDay()>0?g.getDay():g.getDay()+7;for(l=0;l<43;l++){B.uV[l]=new Date(g.getFullYear(),g.getMonth(),++F);}}function aM(){var innerHTML="";innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";innerHTML+="<tr>";for(var l=0;l<12;l++){ if(l % 6==0) innerHTML+="</tr><tr>";innerHTML+="<td class='"+B.ZH+"-cl-year' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' onMouseOut='glbCalendars["+B.Zh+"].JG(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+B.Zh+"].cD("+l+",event);'>";innerHTML+=B.aryMonths[l];innerHTML+="</td>";}innerHTML+="</tr>";innerHTML+="</table>";return innerHTML;}function rY(){var innerHTML="";innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";innerHTML+="<tr>";innerHTML+="<td class='"+B.ZH+"-cl-year' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' onMouseOut='glbCalendars["+B.Zh+"].JG(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+B.Zh+"].fU();' align='center' valign='center'>";innerHTML+="<img src='"+B.ZH+"/up.gif' border='0'>";innerHTML+="</td>";innerHTML+="</tr>";for(var l=parseInt(B.ma);l>parseInt(B.ma)-10;l--){innerHTML+="<tr>";innerHTML+="<td class='"+B.ZH+"-cl-year' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' onMouseOut='glbCalendars["+B.Zh+"].JG(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+B.Zh+"].pI("+l+",event);'>";innerHTML+=l;innerHTML+="</td>";innerHTML+="</tr>";}innerHTML+="<tr>";innerHTML+="<td class='"+B.ZH+"-cl-year' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' onMouseOut='glbCalendars["+B.Zh+"].JG(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+B.Zh+"].lw();' align='center' valign='center'>";innerHTML+="<img src='"+B.ZH+"/down.gif' border='0'>";innerHTML+="</td>";innerHTML+="</tr>";innerHTML+="</table>";return innerHTML;}function BV(){var innerHTML="";var V,h,Y="none",w="none"; innerHTML+="<table cellspacing=0 cellpadding=0 border=0 id='cal'>"; innerHTML+="<tr>"; innerHTML+="<td align='left' class='"+B.ZH+"-cl-header' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);'>"; innerHTML+="<img src='"+B.ZH+"/prev.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+B.Zh+"].lI();return false;' style='cursor:hand;cursor:pointer;'>"; innerHTML+="</td>";innerHTML+="<td align='center' class='"+B.ZH+"-cl-header' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);'>"; if(B.gt==2) Y="onMouseOver";else if(B.gt==1) Y="onClick"; innerHTML+="<span class='"+B.ZH+"-cl-header' "+Y+"='return glbCalendars["+B.Zh+"].ox(event);' "+(Y=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";innerHTML+=B.aryMonths[B.xn]; innerHTML+="</span>&nbsp;"; if(B.Je==2) w="onMouseOver";else if(B.Je==1) w="onClick"; innerHTML+="<span class='"+B.ZH+"-cl-header' "+w+"='return glbCalendars["+B.Zh+"].OE(event);' "+(w=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";innerHTML+=B.eR;innerHTML+="</span>"; innerHTML+="</td>"; innerHTML+="<td align='right' class='"+B.ZH+"-cl-header' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);'>";innerHTML+="<img src='"+B.ZH+"/next.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+B.Zh+"].xg();return false;' style='cursor:hand;cursor:pointer;'>";innerHTML+="</td>"; innerHTML+="</tr>"; innerHTML+="<tr>"; innerHTML+="<td colspan=4 style='background-color:white;'>"; innerHTML+="<table cellspacing=0 cellpadding=0 border=0>"; if(B.Zv){innerHTML+="<tr class='"+B.ZH+"-cl-days'>";for(var L=0;L<7;L++){innerHTML+="<td class='"+B.ZH+"-cl-day' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' onMouseOut='glbCalendars["+B.Zh+"].JG(this);'>";innerHTML+=B.aryDays[B.MY+L];innerHTML+="</td>";}innerHTML+="</tr>";} for(var l=1;l<42;){ innerHTML+="<tr>"; for(var I=0;I<7;++I,l++){h=B.uV[l-1+B.MY].toGMTString(); V=B.uV[l-1+B.MY].getMonth()==B.xn?"cl-on-month":"cl-off-month";  innerHTML+="<td class='"+B.ZH+"-"+V+"' onMouseOver='glbCalendars["+B.Zh+"].Xu(this);' onMouseOut='glbCalendars["+B.Zh+"].JG(this);' style='cursor: hand; cursor: pointer;' title='"+h+"' onClick='glbCalendars["+B.Zh+"].Uc(this);'>"; innerHTML+=B.uV[l-1+B.MY].getDate();
   innerHTML+="</td>";
  } innerHTML+="</tr>";
  }  
  innerHTML+="</table>";
   innerHTML+="</td>"; 
   innerHTML+="</tr>"; innerHTML+="</table>";
   return(innerHTML);
   }
function Wd(layerID,txt){
if(document.getElementById){document.getElementById(layerID ).innerHTML=txt;}
else if(document.all){document.all[layerID].innerHTML=txt;}
else if(document.layers){with(document.layers[layerID].document){open();
write(txt );
close();
}
}
return null;
}
function Ln(E){var m=0;var n=0;if(!E) E=window.event;if(E.pageX||E.pageY){m=E.pageX;n=E.pageY;}else if(E.clientX||E.clientY){m=E.clientX+document.body.scrollLeft;n=E.clientY+document.body.scrollTop;}var c={L:m,t:n};return c;}function cF(){if(B.OO){clearInterval(B.OO);B.OO=null;}B.OO=setInterval("glbCalendars["+B.Zh+"].eT()",B.pf );}function sC(){if(B.tB){clearInterval(B.tB);B.tB=null;}B.tB=setInterval("glbCalendars["+B.Zh+"].VY()",4000 );B.cF();}function CZ(){if(B.AB){clearInterval(B.AB);B.AB=null;}B.AB=setInterval("glbCalendars["+B.Zh+"].rX()",4000 );B.cF();}function Nk(int_num){var c;if(int_num<=9){c=B.Ar?"0"+int_num:int_num;}else c=int_num;return c;}function ul(r,mouse_xy){var U=S(r );var ai=H();if(U["Lo"]+mouse_xy["L"]>ai["L"]) r.style.left=mouse_xy["L"]-U["Lo"];else r.style.left=mouse_xy["L"];if(U["FT"]+mouse_xy["t"]>ai["t"]) r.style.top=mouse_xy["t"]-U["FT"];else r.style.top=mouse_xy["t"];}function fO(r,mo){var pH=S(r );var U=S(mo );var ai=H();var Gp=pH["Lo"] / 2;var Tx=U["Lo"] / 2;var oN=pH["L"]-(Tx-Gp);var WQ=pH["FT"]+pH["t"];mo.style.left=oN;if(WQ+U["FT"]>ai["t"]) mo.style.top=WQ-U["FT"];else mo.style.top=WQ;}function bI(r,yr){var pH=S(r );var YB=S(yr );var ai=H();if(YB["Lo"]+pH["L"]+pH["Lo"]>ai["L"]) yr.style.left=ai["L"]-YB["Lo"];else yr.style.left=pH["L"]+pH["Lo"];if(YB["FT"]+pH["t"]>ai["t"]) yr.style.top=pH["t"];else yr.style.top=pH["t"];}var B;}function T(){}        function J(ne){this.BM=new Array();this.at=new Array();this.Dp=Dp;this.Tj=Tj;Dp(ne,this );function Dp(argStr,argConfig){var l,vJ;var cR,fL;if(argStr) vJ=argStr.split(";");else return;var cR,VM,EE;for(l=0;l<vJ.length;l++){EE=vJ[l].indexOf(":");if(EE>0){cR=vJ[l].substring(0,EE).toUpperCase();
  fL=vJ[l].substring(EE+1,vJ[l].length);if(fL.toLowerCase()=="true") fL=true;else if(fL.toLowerCase()=="false") fL=false;argConfig.at[l]=cR;argConfig.BM[l]=fL;}}}function Tj(argKey){var l;for(l=0;l<this.at.length;l++){if(this.at[l]==argKey){return this.BM[l];}}return null;}}function M(p){var Vh={L:0,t:0};if(window.event){Vh.L=event.clientX+document.body.scrollLeft;Vh.t=event.clientY+document.body.scrollTop;}else if(p){Vh.L=p.pageX;Vh.t=p.pageY;}for(var l=0;l<glbCalendars.length;l++){if(!D(Vh,glbCalendars[l].CG)&&!glbCalendars[l].cH){glbCalendars[l].eT();}glbCalendars[l].cH=false;}}function D(Mh,CG){if((Mh.L>CG.L&&Mh.L<CG.L+CG.Lo)&&(Mh.t>CG.t&&Mh.t<CG.t+CG.FT)) return true;return false;}function S(KK){var Qh={L:0,t:0,Lo:0,FT:0};if(KK!=null){Qh.FT=KK.offsetHeight;Qh.Lo=KK.offsetWidth;while(KK){Qh.L+=KK.offsetLeft;Qh.t+=KK.offsetTop;KK=KK.offsetParent;}return(Qh);}}function H(){var Qh={L:0,t:0};Qh.L+=document.body.clientWidth;Qh.t+=document.body.clientHeight;return(Qh);} var uq="";
if(document.getElementById&&document.all) uq="ie5";else if(document.getElementById&&!document.all) uq="ns6";else if(document.all) uq="ie4";else if(document.layers) uq="ns4";else uq="other";var JP=9999;switch(uq){case "ie5":document.attachEvent('onclick',M );break;case "ns6":document.addEventListener('click',M,false );break;case "ns4":break;}function v(E){if(typeof E=='undefined') E=window.event;if(typeof E.layerX=='undefined') E.layerX=E.offsetX;if(typeof E.layerY=='undefined') E.layerY=E.offsetY;return E;}function q(){NI=document.getElementsByTagName("select");}      var glbCalendars=Array();var NI=Array();
