Login   Register  
PHP Classes
elePHPant
Icontem

File: js/choosedate.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nadir Latif  >  Error Management  >  js/choosedate.js  >  Download  
File: js/choosedate.js
Role: License text
Content type: text/plain
Description: calendar file
Class: Error Management
Report and manage system error occurences
Author: By
Last change:
Date: 7 years ago
Size: 27,043 bytes
 

Contents

Class file image Download
/*
	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(aN){this.Version="1.42basic";this.bD=0;this.bE=0;this.bF=0;this.by=new f(aN);this.bC=new Date();this.bA=this.bC.getFullYear();this.dc=glbCalendars.length;this.aO=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.aryDaysShort=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun");this.FullMonthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];this.FullDayNames=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];this.aC="Please select a future date";glbCalendars[glbCalendars.length]=this;this.bP="caldiv_"+this.dc;this.cw=false;this.Div=null;this.aG=null;this.cu=false;this.isOpen=false;this.cy=0;this.cz=0;this.rect={x:0,y:0,dx:0,dy:0};this.cL={x:0,y:0,dx:0,dy:0};this.ea={x:0,y:0,dx:0,dy:0};this.dG="";this.bV=false;this.dh=true;var cv=(navigator.userAgent.toLowerCase().indexOf("db")!=-1);this.aR=cv?"title":"alt";this.aQ=Array(3);this.dH="";this.cr=null;this.eb=null;this.cM=null;this.bc=this.by.Item("FIELD")?eval(this.by.Item("FIELD")):null;this.be=this.by.Item("FORMAT")?this.by.Item("FORMAT"):"0";this.aZ=this.by.Item("DELIMITER")?this.by.Item("DELIMITER"):"/";this.bg=false;switch(this.be){case "1":this.bk="D"+this.aZ+"M"+this.aZ+"YYYY";break;case "2":this.bk="YYYY"+this.aZ+"M"+this.aZ+"D";break;default:this.bk="M"+this.aZ+"D"+this.aZ+"YYYY";}this.bw=true;this.bn=false;this.aX=true;this.aY=2000;this.bd=0;this.bi=null;this.bj=null;this.bl=1;this.bv=1;this.bb=false;this.aW=true;this.bm=0;this.ba="basic";this.bs=0;this.bf=null;this.bq="Click here to visually select a date with DateClick...";this.bp=0;this.bo=0;this.bt=0;this.bu=0;if(this.by.Item("ZEROS"))this.dG+="ZEROS\n";if(this.by.Item("MOUSEOVER"))this.dG+="MOUSEOVER\n";if(this.by.Item("SHOWDAYS"))this.dG+="SHOWDAYS\n";if(this.by.Item("DELAY"))this.dG+="DELAY\n";if(this.by.Item("BEGINONMONDAY"))this.dG+="BEGINONMONDAY\n";if(this.by.Item("ICONLEFT"))this.dG+="ICONLEFT\n";if(this.by.Item("ICONTOP"))this.dG+="ICONTOP\n";if(this.by.Item("DIR"))this.dG+="DIR\n";if(this.by.Item("MONTH"))this.dG+="MONTH\n";if(this.by.Item("SHADOW"))this.dG+="SHADOW\n";if(this.by.Item("CLOSE"))this.dG+="CLOSE\n";if(this.by.Item("YEAR"))this.dG+="YEAR\n";if(this.by.Item("MOVEMODE"))this.dG+="MOVEMODE\n";if(this.by.Item("INVALID"))this.dG+="INVALID\n";if(this.by.Item("FUNCTION"))this.dG+="FUNCTION\n";if(this.by.Item("TOOLTIP"))this.dG+="TOOLTIP\n";if(this.by.Item("STATIC"))this.dG+="STATIC\n";if(this.by.Item("POSITION"))this.dG+="POSITION\n";var dm=new RegExp("^D","i");switch(this.be){case "1":this.dh=false;break;case "2":this.dh=false;break;default:if(dm.test(this.bk))this.dh=false;}this.dX=this.bq;var dN;if(this.ba){if(this.ba.indexOf("/")>=0){dN=this.ba.split("/");this.aV=dN[dN.length-1];}else{this.aV=this.ba?this.ba:"basic";}}else{this.aV=this.ba?this.ba:"basic";}this.au=au;this.R=R;this.U=U;this.T=T;this.aw=aw;this.av=av;this.nextMonth=nextMonth;this.prevMonth=prevMonth;this.nextYear=nextYear;this.prevYear=prevYear;this.ac=ac;this.ab=ab;this.Y=Y;this.V=V;this.ax=ax;this.B=B;this.C=C;this.F=F;this.writeCalendar=writeCalendar;this.ai=ai;this.aj=aj;this.ak=ak;this.M=M;this.Q=Q;this.J=J;this.N=N;this.L=L;this.ar=ar;this.aq=aq;this.at=at;this.A=A;this.al=al;this.ao=ao;this.ap=ap;this.as=as;this.setDefDate=setDefDate;this.an=an;this.I=I;this.K=K;this.ad=ad;this.X=X;this.z=z;aF=this;function r(){};function an(co){if(aF.bc)aF.bc.value=I(co);};function writeCalendar(){var dC,dI;dC=document.all?"onClick":"onMouseDown";var ci=(document.all&&!document.getElementById)?"width:20;":"";var dE=aF.bn?"onMouseOver":dC;var dA;dA=aF.bb?"filter: progid:DXImageTransform.Microsoft.DropShadow(color=#777788,direction=135,strength=2);":"";var bh=aF.bj?"top:"+aF.bj+"px;":"";bh+=aF.bi?"left:"+aF.bi+"px;":"";bh+=bh.length>0?"position: absolute;":"";aF.F();if(aF.bp<1){document.write("<img src='"+aF.ba+"/calendar.gif' id='img_"+aF.bP+"' border='0' align='top' style='"+bh+"' "+dE+"='glbCalendars["+aF.dc+"].setDefDate();glbCalendars["+aF.dc+"].au(event);if (window.event)window.event.cancelBubble=true;' title='"+aF.dX+"' />");dI="display:none;";}else{dI="display:inline;";}document.write("<div id='"+aF.bP+"' ");document.write("onMouseOut='glbCalendars["+aF.dc+"].ar();' ");document.write("style='position:absolute;"+dA+ci+""+dI+"' class='"+aF.aV+"-cl-body'> ");document.write(aF.J());document.write("</div>");if(aF.bv){document.write("<div id='"+aF.bP+"_year' ");document.write("onMouseOut='glbCalendars["+aF.dc+"].ar();' ");document.write("onMouseOver='glbCalendars["+aF.dc+"].ac(this);' ");document.write("style='position:absolute;display:none;background-color:white;'> ");document.write(aF.Q());document.write("</div>");}if(aF.bl){document.write("<div id='"+aF.bP+"_month' ");document.write("onMouseOut='glbCalendars["+aF.dc+"].aq();' ");document.write("onMouseOver='glbCalendars["+aF.dc+"].ac(this);' ");document.write("style='position:absolute;display:none;background-color:white;'> ");document.write(aF.M());document.write("</div>");}document.write("<IFRAME src=\"javascript:false;\" style='DISPLAY: none; LEFT: 0px; POSITION: absolute; TOP: 0px;COLOR: #FFFFFF;BACKGROUND-COLOR: #FFFFFF;' frameBorder='0' scrolling='no' id='"+aF.bP+"_ghost'></IFRAME>\n");document.write("<IFRAME src=\"javascript:false;\" style='DISPLAY: none; LEFT: 0px; POSITION: absolute; TOP: 0px;COLOR: #FFFFFF;BACKGROUND-COLOR: #FFFFFF;' frameBorder='0' scrolling='no' id='"+aF.bP+"_ghost_mo'></IFRAME>\n");document.write("<IFRAME src=\"javascript:false;\" style='DISPLAY: none; LEFT: 0px; POSITION: absolute; TOP: 0px;COLOR: #FFFFFF;BACKGROUND-COLOR: #FFFFFF;' frameBorder='0' scrolling='no' id='"+aF.bP+"_ghost_year'></IFRAME>\n");if(this.dG){if(confirm("The following options are not available in DateClick Standard Edition:\n"+this.dG+"\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 m(){};function au(bS){var aS,shim,cP,cn;var co;bS=H(bS);cP=aF.N(bS);cn=aF.L();W();if(cf)aF.bg=true;if(document.getElementById){aS=document.getElementById(aF.bP);if(aF.bg)shim=document.getElementById(aF.bP+"_ghost");}else if(document.all){aS=document.all[aF.bP];if(aF.bg)shim=document.all[aF.bP+"_ghost"];}else aS=document.layers[aF.bP];aF.Div=aS;aF.aG=shim;if(aF.isOpen){if(aF.bg){aF.ao(shim,aS);shim.style.display="block";}return false;}aF.V();clearInterval(aF.cr);for(var i=0;i<glbCalendars.length;i++){if(glbCalendars[i]==aF)glbCalendars[i].cw=true;else glbCalendars[i].cw=false;if(!glbCalendars[i].cw){glbCalendars[i].R();}}if(aS){aS.style.zIndex=++cg;aS.style.display="block";if(!aF.cy){if(aF.bo==1){aF.al(aS,aF.z({x:aF.bt,y:aF.bu},cn));}else if(aF.bo==2){aF.al(aS,{x:aF.bt,y:aF.bu});}else{aF.al(aS,aF.z({x:aF.bt,y:aF.bu},cP));}}aF.isOpen=true;aF.rect=O(aS);if(aF.bg){shim.style.display="block";aF.ao(shim,aS);}if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}}return false;};function av(bS){var aS,bQ,du,shim,cP=aF.N(bS);if(aF.cu)return false;clearInterval(aF.cr);if(document.getElementById){aS=document.getElementById(aF.bP);bQ=document.getElementById(aF.bP+"_month");if(aF.bg)shim=document.getElementById(aF.bP+"_ghost_mo");}else if(document.all){aS=document.all[aF.bP];bQ=document.all[aF.bP+"_month"];if(aF.bg)shim=document.all[aF.bP+"_ghost_mo"];}else{aS=document.layers[aF.bP];bQ=document.layers[aF.bP+"_month"];}aF.U();if(aS){bQ.style.display="block";bQ.style.zIndex=++cg;aF.ap(aS,bQ);aF.cL=O(bQ);if(aF.bg){aF.ao(shim,bQ);shim.style.display="block";}}};function aw(bS){var aS,bR,du,cP=aF.N(bS);if(aF.cu)return false;clearInterval(aF.cr);if(document.getElementById){aS=document.getElementById(aF.bP);bR=document.getElementById(aF.bP+"_year");if(aF.bg)shim=document.getElementById(aF.bP+"_ghost_year");}else if(document.all){aS=document.all[aF.bP];bR=document.all[aF.bP+"_year"];if(aF.bg)shim=document.all[aF.bP+"_ghost_year"];}else{aS=document.layers[aF.bP];bR=document.layers[aF.bP+"_year"];}aF.T();if(aS){bR.style.display="block";aF.as(aS,bR);bR.style.zIndex=++cg;aF.ea=O(bR);if(aF.bg){aF.ao(shim,bR);shim.style.display="block";}}};function R(){var aS,shim;if(!aF.isOpen)return false;if(document.getElementById){aS=document.getElementById(aF.bP).style;if(aF.bg)shim=document.getElementById(aF.bP+"_ghost").style;}else if(document.all){aS=document.all[aF.bP].style;if(aF.bg)shim=document.all[aF.bP+"_ghost"].style;}else{aS=document.layers[aF.bP];}if(aS){aS.display="none";if(aF.bg)shim.display="none";}if(aF.bv)aF.U();if(aF.bl)aF.T();aF.isOpen=false;clearInterval(aF.cr);};function T(){var bQ,shim;if(document.getElementById){bQ=document.getElementById(aF.bP+"_month");if(bQ)bQ=bQ.style;if(aF.bg)shim=document.getElementById(aF.bP+"_ghost_mo").style;}else if(document.all){bQ=document.all[aF.bP+"_month"];if(bQ)bQ=bQ.style;if(aF.bg)shim=document.all[aF.bP+"_ghost_mo"].style;}else{bQ=document.layers[aF.bP+"_month"];}if(bQ){bQ.display="none";aF.cL={x:0,y:0,dx:0,dy:0};if(aF.bg)shim.display="none";}};function U(){var bR,shim;if(document.getElementById){bR=document.getElementById(aF.bP+"_year");if(bR)bR=bR.style;if(aF.bg)shim=document.getElementById(aF.bP+"_ghost_year").style;}else if(document.all){bR=document.all[aF.bP+"_year"];if(bR)bR=bR.style;if(aF.bg)shim=document.all[aF.bP+"_ghost_year"].style;}else{bR=document.layers[aF.bP+"_year"];}if(bR){bR.display="none";aF.ea={x:0,y:0,dx:0,dy:0};if(aF.bg)shim.display="none";}};function n(){};function ac(aI){clearInterval(aF.cr);if(aI.className==aF.aV+"-cl-on-month")aI.className=aF.aV+"-cl-on-month-lit";else if(aI.className==aF.aV+"-cl-off-month")aI.className=aF.aV+"-cl-off-month-lit";else if(aI.className==aF.aV+"-cl-year")aI.className=aF.aV+"-cl-year-lit";};function ab(aI){if(aI.className==aF.aV+"-cl-on-month-lit")aI.className=aF.aV+"-cl-on-month";else if(aI.className==aF.aV+"-cl-off-month-lit")aI.className=aF.aV+"-cl-off-month";else if(aI.className==aF.aV+"-cl-year-lit")aI.className=aF.aV+"-cl-year";};function nextMonth(){aF.bC.setMonth(++aF.bE);F();Y(aF.bP,J());};function nextYear(){aF.bA+=10;Y(aF.bP+"_year",Q());};function prevMonth(){aF.bC.setMonth(--aF.bE);F();Y(aF.bP,J());};function prevYear(){aF.bA-=10;Y(aF.bP+"_year",Q());};function ai(td){var dw=td.getAttribute(aF.aR);if(!X(dw)){alert(aF.aC);return;}aF.dH=dw;if(aF.bc){if(aF.bc)aF.bc.value=aF.dH;}if(aF.bf){eval(aF.bf+"(new Date(aF.K(aF.dH,aF.bk)))");}if(aF.aW)aF.R();if(aF.bp>0){Y(aF.bP,J());}};function ak(cs,cW){aF.bC.setFullYear(cs);F();Y(aF.bP,J());aF.cw=true;aF.U();if(window.event)event.cancelBubble=true;else cW.stopPropagation();};function aj(cq,cW){aF.bC.setMonth(cq);F();Y(aF.bP,J());aF.cw=true;aF.T();if(window.event)event.cancelBubble=true;else cW.stopPropagation();};function o(){};function I(co){aD=['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'];var ca=aF.bk;var cC='DMYHdhmst'.split('');var dL=new Array();var bz=0;var dn;var dp=/\[(\d+)\]/;;var dO=new Date(co);var day=dO.getDay();var date=dO.getDate();var month=dO.getMonth();var year=dO.getFullYear().toString();var ck=dO.getHours();var cF=dO.getMinutes();var dz=dO.getSeconds();var bZ=new Object();bZ['D']=date;bZ['d']=date+aD[date-1];bZ['DD']=(date<10)?'0'+date:date;bZ['DDD']=aF.FullDayNames[day].substring(0,3);bZ['DDDD']=aF.FullDayNames[day];bZ['M']=month+1;bZ['MM']=(month+1<10)?'0'+(month+1):month+1;bZ['MMM']=aF.FullMonthNames[month].substring(0,3);bZ['MMMM']=aF.FullMonthNames[month];bZ['Y']=(year.charAt(2)=='0')?year.charAt(3):year.substring(2,4);bZ['YY']=year.substring(2,4);bZ['YYYY']=year;for(var i=0;i<cC.length;i++){dn=new RegExp('('+cC[i]+'+)');while(dn.test(ca)){dL[bz]=RegExp.$1;ca=ca.replace(RegExp.$1,'['+bz+']');bz++;}}while(dp.test(ca)){ca=ca.replace(dp,bZ[dL[RegExp.$1]]);}return ca;};function ad(dW){var dg=(arguments.length==2)?arguments[1]:false;cb=new Array('YYYY/M/D','y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');cK=new Array('M/D/YYYY','MM/DD/YYYY','MM/DD/YY','M/D/YY','M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');bL=new Array('D/M/YYYY','DD/MM/YYYY','DD/MM/YY','D/M/YY','d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');var bx=new Array('cb',dg?'bL':'cK',dg?'cK':'bL');var d=null;for(var i=0;i<bx.length;i++){var l=window[bx[i]];for(var j=0;j<l.length;j++){d=K(dW,l[j]);if(d!=0){return new Date(d);}}}return null;};function g(x){return(x<0||x>9?"":"0")+x};function K(dW,bY){dW=dW+"";bY=bY+"";var cm=0;var cl=0;var c="";var dT="";var dU="";var x,y;var cT=new Date();var year=cT.getYear();var month=cT.getMonth()+1;var date=1;var hh=cT.getHours();var mm=cT.getMinutes();var ss=cT.getSeconds();var aH="";while(cl<bY.length){c=bY.charAt(cl);dT="";while((bY.charAt(cl)==c)&&(cl<bY.length)){dT+=bY.charAt(cl++);}if(dT=="YYYY"||dT=="YY"||dT=="Y"){if(dT=="YYYY"){x=4;y=4;}if(dT=="YY"){x=2;y=2;}if(dT=="Y"){x=2;y=4;}year=v(dW,cm,x,y);if(year==null){return 0;}cm+=year.length;if(year.length==2){if(year>70){year=1900+(year-0);}else{year=2000+(year-0);}}}else if(dT=="MMM"||dT=="NNN"){month=0;for(var i=0;i<aF.FullMonthNames.length;i++){var cN=aF.FullMonthNames[i];if(dW.substring(cm,cm+cN.length).toLowerCase()==cN.toLowerCase()){if(dT=="MMM"||(dT=="NNN"&&i>11)){month=i+1;if(month>12){month-=12;}cm+=cN.length;break;}}}if((month<1)||(month>12)){return 0;}}else if(dT=="DDDD"||dT=="DDD"){for(var i=0;i<aF.FullDayNames.length;i++){var bN=aF.FullDayNames[i];if(dW.substring(cm,cm+bN.length).toLowerCase()==bN.toLowerCase()){cm+=bN.length;break;}}}else if(dT=="MM"||dT=="M"){month=v(dW,cm,dT.length,2);if(month==null||(month<1)||(month>12)){return 0;}cm+=month.length;}else if(dT=="dd"||dT=="d"||dT=="D"||dT=="DD"){date=v(dW,cm,dT.length,2);if(date==null||(date<1)||(date>31)){return 0;}cm+=date.length;}else if(dT=="hh"||dT=="h"){hh=v(dW,cm,dT.length,2);if(hh==null||(hh<1)||(hh>12)){return 0;}cm+=hh.length;}else if(dT=="HH"||dT=="H"){hh=v(dW,cm,dT.length,2);if(hh==null||(hh<0)||(hh>23)){return 0;}cm+=hh.length;}else if(dT=="KK"||dT=="K"){hh=v(dW,cm,dT.length,2);if(hh==null||(hh<0)||(hh>11)){return 0;}cm+=hh.length;}else if(dT=="kk"||dT=="k"){hh=v(dW,cm,dT.length,2);if(hh==null||(hh<1)||(hh>24)){return 0;}cm+=hh.length;hh--;}else if(dT=="mm"||dT=="m"){mm=v(dW,cm,dT.length,2);if(mm==null||(mm<0)||(mm>59)){return 0;}cm+=mm.length;}else if(dT=="ss"||dT=="s"){ss=v(dW,cm,dT.length,2);if(ss==null||(ss<0)||(ss>59)){return 0;}cm+=ss.length;}else if(dT=="a"){if(dW.substring(cm,cm+2).toLowerCase()=="am"){aH="AM";}else if(dW.substring(cm,cm+2).toLowerCase()=="pm"){aH="PM";}else{return 0;}cm+=2;}else{if(dW.substring(cm,cm+dT.length)!=dT){return 0;}else{cm+=dT.length;}}}if(cm!=dW.length){return 0;}if(month==2){if(((year%4==0)&&(year%100!=0))||(year%400==0)){if(date>29){return 0;}}else{if(date>28){return 0;}}}if((month==4)||(month==6)||(month==9)||(month==11)){if(date>30){return 0;}}if(hh<12&&aH=="PM"){hh=hh-0+12;}else if(hh>11&&aH=="AM"){hh-=12;}var cS=new Date(year,month-1,date,hh,mm,ss);return cS.getTime();};function w(dW){var bO="1234567890";for(var i=0;i<dW.length;i++){if(bO.indexOf(dW.charAt(i))==-1){return false;}}return true;};function v(dB,i,cE,cD){for(var x=cD;x>=cE;x--){var dT=dB.substring(i,i+x);if(dT.length<cE){return null;}if(w(dT)){return dT;}}return null;};function V(){aF.Div.onmousedown=aF.ax;if(isNaN(parseInt(aF.Div.style.left)))aF.Div.style.left="0px";if(isNaN(parseInt(aF.Div.style.top)))aF.Div.style.top="0px";aF.Div.da=new Function();aF.Div.cZ=new Function();aF.Div.cY=new Function();};function ax(e){e=H(e);var y=parseInt(aF.Div.style.top);var x=parseInt(aF.Div.style.left);aF.T();aF.U();aF.Div.da(x,y);aF.cu=true;if(aF.bm){aF.cy=e.clientX;aF.cz=e.clientY;aF.bV=false;}document.onmousemove=aF.B;document.onmouseup=aF.C;return false;};function B(e){e=H(e);var bU=e.clientY;var bT=e.clientX;var y=parseInt(aF.Div.style.top);var x=parseInt(aF.Div.style.left);var cU,cV;cU=x+(bT-aF.cy);cV=y+(bU-aF.cz);if(aF.bm>0){if(!aF.bV){aF.Div.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=60);";if(aF.Div.style.cursor)aF.Div.style.cursor="move";aF.bV=true;}aF.Div.style["left"]=cU+"px";aF.Div.style["top"]=cV+"px";aF.cy=bT;aF.cz=bU;if(aF.aG)aF.aG.style.display="none";}aF.Div.cY(cU,cV);return false;};function C(){document.onmousemove=null;document.onmouseup=null;aF.Div.cZ(parseInt(aF.Div.style["left"]),parseInt(aF.Div.style["top"]));if(aF.bm){aF.Div.style.filter="";if(aF.Div.style.cursor)aF.Div.style.cursor="arrow";aF.rect=O(aF.Div);if(aF.aG){aF.ao(aF.aG,aF.Div);aF.aG.style.display="block";}if(aF.bm>1){aF.cy=0;aF.cz=0;}}aF.cu=false;};function F(){var bW,bX=0;var cx,cA;var bB=aF.bC;var i,j=1;aF.bD=bB.getDate();aF.bE=bB.getMonth();aF.bF=bB.getFullYear();bW=new Date(aF.bF,aF.bE,1);bX-=bW.getDay()>0?bW.getDay():bW.getDay()+7;for(i=0;i<43;i++){aF.aO[i]=new Date(bW.getFullYear(),bW.getMonth(),++bX);}};function M(){var innerHTML="";innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";innerHTML+="<tr>";for(var i=0;i<12;i++){if(i%6==0)innerHTML+="</tr><tr>";innerHTML+="<td class='"+aF.aV+"-cl-year' onMouseOver='glbCalendars["+aF.dc+"].ac(this);' onMouseOut='glbCalendars["+aF.dc+"].ab(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+aF.dc+"].aj("+i+",event);'>";innerHTML+=aF.aryMonths[i];innerHTML+="</td>";}innerHTML+="</tr>";innerHTML+="</table>";return innerHTML;};function Q(){var innerHTML="";innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";innerHTML+="<tr>";innerHTML+="<td class='"+aF.aV+"-cl-year' onMouseOver='glbCalendars["+aF.dc+"].ac(this);' onMouseOut='glbCalendars["+aF.dc+"].ab(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+aF.dc+"].nextYear();' align='center' valign='center'>";innerHTML+="<img src='"+aF.ba+"/up.gif' border='0' />";innerHTML+="</td>";innerHTML+="</tr>";for(var i=parseInt(aF.bA);i>parseInt(aF.bA)-10;i--){innerHTML+="<tr>";innerHTML+="<td class='"+aF.aV+"-cl-year' onMouseOver='glbCalendars["+aF.dc+"].ac(this);' onMouseOut='glbCalendars["+aF.dc+"].ab(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+aF.dc+"].ak("+i+",event);'>";innerHTML+=i;innerHTML+="</td>";innerHTML+="</tr>";}innerHTML+="<tr>";innerHTML+="<td class='"+aF.aV+"-cl-year' onMouseOver='glbCalendars["+aF.dc+"].ac(this);' onMouseOut='glbCalendars["+aF.dc+"].ab(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+aF.dc+"].prevYear();' align='center' valign='center'>";innerHTML+="<img src='"+aF.ba+"/down.gif' border='0' />";innerHTML+="</td>";innerHTML+="</tr>";innerHTML+="</table>";return innerHTML;};function J(){var innerHTML="";var dN,dR,dQ="none",dS="none";var cR;innerHTML+="<table cellspacing=0 cellpadding=0 border=0 id='aS' class='"+aF.aV+"-cl-innertable'>";innerHTML+="<tr class='"+aF.ba+"-header-row'>";innerHTML+="<td align='left' class='"+aF.aV+"-cl-header' onMouseOver='glbCalendars["+aF.dc+"].ac(this);'>";innerHTML+="<img src='"+aF.ba+"/prev.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+aF.dc+"].prevMonth();return false;' style='cursor:hand;cursor:pointer;' />";innerHTML+="</td>";innerHTML+="<td align='center' class='"+aF.aV+"-cl-header' onMouseOver='glbCalendars["+aF.dc+"].ac(this);'>";if(aF.bl==2)dQ="onMouseOver";else if(aF.bl==1)dQ="onClick";innerHTML+="<span class='"+aF.aV+"-cl-header' "+dQ+"='return glbCalendars["+aF.dc+"].av(event);' "+(dQ=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";innerHTML+=aF.aryMonths[aF.bE];innerHTML+="</span>&nbsp;";if(aF.bv==2)dS="onMouseOver";else if(aF.bv==1)dS="onClick";innerHTML+="<span class='"+aF.aV+"-cl-header' "+dS+"='return glbCalendars["+aF.dc+"].aw(event);' "+(dS=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";innerHTML+=aF.bF;innerHTML+="</span>";innerHTML+="</td>";innerHTML+="<td align='right' class='"+aF.aV+"-cl-header' onMouseOver='glbCalendars["+aF.dc+"].ac(this);'>";innerHTML+="<img src='"+aF.ba+"/next.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+aF.dc+"].nextMonth();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 class='"+aF.aV+"-cl-innertable'>";if(aF.aX){innerHTML+="<tr class='"+aF.aV+"-cl-days'>";for(var x=0;x<7;x++){innerHTML+="<td class='"+aF.aV+"-cl-day' onMouseOver='glbCalendars["+aF.dc+"].ac(this);' onMouseOut='glbCalendars["+aF.dc+"].ab(this);'>";innerHTML+=aF.aryDays[aF.bd+x];innerHTML+="</td>";}innerHTML+="</tr>";}var dP;for(var i=1;i<42;){innerHTML+="<tr>";for(var j=0;j<7;++j,i++){dP=aF.bc?aF.bc.value:null;cR=aF.I(aF.aO[i-1+aF.bd]);dR=aF.I(aF.aO[i-1+aF.bd]);dN=aF.aO[i-1+aF.bd].getMonth()==aF.bE?"cl-on-month":"cl-off-month";if(!aF.X(dR)){dN=" "+aF.aV+"-old";}else if(dP==dR){dN=" "+aF.aV+"-tgt";}else if(aF.I(new Date().toGMTString())==dR){dN=" "+aF.aV+"-today";}innerHTML+="<td class='"+aF.aV+"-"+dN+"' onMouseOver='glbCalendars["+aF.dc+"].ac(this);' onMouseOut='glbCalendars["+aF.dc+"].ab(this);' title='"+cR+"' style='cursor: hand; cursor: pointer;' "+aF.aR+"='"+dR+"' onClick='glbCalendars["+aF.dc+"].ai(this);'>";innerHTML+=aF.aO[i-1+aF.bd].getDate();innerHTML+="</td>";}innerHTML+="</tr>";}innerHTML+="</table>";innerHTML+="</td>";innerHTML+="</tr>";innerHTML+="</table>";return(innerHTML);};function Y(cB,dV){if(document.getElementById){document.getElementById(cB).innerHTML=dV;}else if(document.all){document.all[cB].innerHTML=dV;}else if(document.layers){with(document.layers[cB].document){open();write(dV);close();}}return null;};function N(e){var de=0;var df=0;if(!e)e=window.event;if(e){if(e.pageX||e.pageY){de=e.pageX+"px";df=e.pageY+"px";}else if(e.clientX||e.clientY){de=e.clientX+document.body.scrollLeft+"px";df=e.clientY+document.body.scrollTop+"px";}}var dq={x:de,y:df};return dq;};function z(aA,aE){var dq,dr,ds;dr=parseInt(aA.x)+parseInt(aE.x);ds=parseInt(aA.y)+parseInt(aE.y);dq={x:dr,y:ds};return dq;};function L(){var de=0;var df=0;var dv;dv=G(document.getElementById("img_"+aF.bP));var dq={x:dv[0],y:dv[1]};return dq;};function ar(){if(aF.cr){clearInterval(aF.cr);aF.cr=null;}aF.cr=setInterval("glbCalendars["+aF.dc+"].R()",aF.aY);};function aq(){if(aF.cM){clearInterval(aF.cM);aF.cM=null;}aF.cM=setInterval("glbCalendars["+aF.dc+"].T()",4000);aF.ar();};function at(){if(aF.eb){clearInterval(aF.eb);aF.eb=null;}aF.eb=setInterval("glbCalendars["+aF.dc+"].U()",4000);aF.ar();};function A(ct){var dq;if(ct<=9){dq=aF.bw?"0"+ct:ct;}else dq=ct;return dq;};function al(aS,cQ){var bI=O(aS);var dY=P();if(bI["dx"]+cQ["x"]>dY["x"])aS.style.left=cQ["x"]-bI["dx"]+"px";else aS.style.left=cQ["x"];if(bI["dy"]+cQ["y"]>dY["y"])aS.style.top=cQ["y"]-bI["dy"]+"px";else{aS.style.top=cQ["y"];}if(aS.style.top<=0)aS.style.top=1;if(aS.style.left<=0)aS.style.left=1;};function ao(cc,aS){var bI=O(aS);if(bI.x>0){cc.style.left=bI.x;cc.style.top=bI.y;cc.style.width=bI.dx;cc.style.height=bI.dy;cc.style.zIndex=0;cc.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';}};function ap(aS,mo){var aU=O(aS);var bI=O(mo);var dY=P();var aT=aU["dx"]/2;var cG=bI["dx"]/2;var cH=aU["x"]-(cG-aT);var cI=aU["dy"]+aU["y"];mo.style.left=cH+"px";if(cI+bI["dy"]>dY["y"])mo.style.top=cI-bI["dy"];else mo.style.top=cI+"px";};function as(aS,yr){var aU=O(aS);var ec=O(yr);var dY=P();if(ec["dx"]+aU["x"]+aU["dx"]>dY["x"])yr.style.left=dY["x"]-ec["dx"];else yr.style.left=aU["x"]+aU["dx"]+"px";if(ec["dy"]+aU["y"]>dY["y"])yr.style.top=aU["y"];else yr.style.top=aU["y"]+"px";};function setDefDate(){var dP;if(aF.bc){dP=aF.bc.value;if(aF.bc.value!=""){co=aF.ad(dP.replace(/\./g,"-"),!this.dh);if(co==null)co=new Date(aF.K(dP,aF.bk));}else co=new Date();}else co=new Date();if(isNaN(co))aF.bC=new Date();else aF.bC=co;aF.F();Y(aF.bP,J());};function X(dD){var bJ=aF.I(new Date());if(aF.bs==1&&aF.K(dD,aF.bk)<aF.K(bJ,aF.bk)){return false;}else if(aF.bs==2&&aF.K(dD,aF.bk)<=aF.K(bJ,aF.bk)){return false;}return true;};var aF;};function t(){};function f(aN){this.dk=new Array();this.dj=new Array();this.k=k;this.Item=Item;k(aN,this);function k(aM,aJ){var i,aP;var dF,dJ;if(aM)aP=aM.split(";");else return;var dF,dK,cp;for(i=0;i<aP.length;i++){cp=aP[i].indexOf(":");if(cp>0){dF=aP[i].substring(0,cp).toUpperCase();dJ=aP[i].substring(cp+1,aP[i].length);if(dJ.toLowerCase()=="true")dJ=true;else if(dJ.toLowerCase()=="false")dJ=false;aJ.dj[i]=dF;aJ.dk[i]=dJ;}}};function Item(aK){var i;for(i=0;i<this.dj.length;i++){if(this.dj[i]==aK){return this.dk[i];}}return null;}};function docClick(bS){var aB=false;var cO={x:0,y:0};if(window.event){cO.x=event.clientX+document.body.scrollLeft;cO.y=event.clientY+document.body.scrollTop;}else if(bS){cO.x=bS.pageX;cO.y=bS.pageY;}for(var i=0;i<glbCalendars.length;i++){if(!ag(cO,glbCalendars[i].rect)&&!ag(cO,glbCalendars[i].cL)&&!ag(cO,glbCalendars[i].ea)){glbCalendars[i].R();}else aB=true;glbCalendars[i].cw=false;}};function ag(di,rect){if((di.x>rect.x&&di.x<rect.x+rect.dx)&&(di.y>rect.y&&di.y<rect.y+rect.dy))return true;return false;};function O(aL){var dM={x:0,y:0,dx:0,dy:0};if(aL!=null){dM.dy=aL.offsetHeight;dM.dx=aL.offsetWidth;while(aL){dM.x+=aL.offsetLeft;dM.y+=aL.offsetTop;aL=aL.offsetParent;}return(dM);}};function P(){var dM={x:0,y:0};if(document.body.clientWidth){dM.x+=document.body.clientWidth;dM.y+=document.body.clientHeight;}else if(window.innerWidth){dM.x+=window.innerWidth;dM.y+=window.innerHeight;}return(dM);};var cd="";if(typeof(document.media)=='string'&&document.getElementById&&document.all)cd="ie6";else if(document.getElementById&&document.all)cd="ie5";else if(document.getElementById&&!document.all)cd="ns6";else if(document.all)cd="ie4";else if(document.layers)cd="ns4";else cd="other";var cg=9999;switch(cd){case "ie5":case "ie6":if(document.attachEvent)document.attachEvent('onclick',docClick);break;case "ns6":break;case "ns4":break;}function H(e){if(typeof e=='undefined')e=window.event;if(e){if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;}return e;};function W(){if(cd=="ie6"&&!window.db){if(!document.getElementsByTagName("select"))cf=false;else cf=true;}else cf=false;};function ah(vl){var S=vl,D;S=S.replace(/(\d+).(\d+).(\d+)/,'$3/$2/$1');S=S.replace(/^(\d\d\/)/,'20$1');D=new Date(S);return D;};function G(cX){var bG=bH=0;if(cX.offsetParent){bG=cX.offsetLeft;bH=cX.offsetTop;while(cX=cX.offsetParent){bG+=cX.offsetLeft;bH+=cX.offsetTop}}return[bG,bH];};var glbCalendars=Array();var cf=Array();