/*
	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(Jr){
		 this.Version="1.4";
		 this.Ck=0;
		 this.Ca=0;
		 this.CT=0;
		 this.dD=new QH(Jr);
		 this.vu=new Date();
		 this.uj=this.vu.getFullYear();
		 this.Po=glbCalendars.length;
		 this.FE=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.FullMonthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];
		 this.FullDayNames=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
		 this.Yb="Please select a future date";
		 glbCalendars[glbCalendars.length]=this;
		 this.Dr="caldiv_"+this.Po;
		 this.TR=false;
		 this.WU=null;
		 this.sF=null;
		 this.Kf=false;
		 this.isOpen=false;
		 this.mv=0;
		 this.aN=0;
		 this.jC={x:0,y:0,Ut:0,aR:0};
		 this.PN={x:0,y:0,Ut:0,aR:0};
		 this.mO={x:0,y:0,Ut:0,aR:0};
		 this.KN="";
		 this.nU=false;
		 var tT=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
		 this.ad=tT?"title":"alt"; 
		 this.UY=Array(3);
		 this.FY=""; 
		 this.eJ=null;
		 this.gw=null;
		 this.UU=null; 
		 this.iL=this.dD.Item("FIELD")?eval(this.dD.Item("FIELD")):null;
		 this.aM=this.dD.Item("FORMAT")?this.dD.Item("FORMAT"):"0";
		 this.Yv=this.dD.Item("DELIMITER")?this.dD.Item("DELIMITER"):"/";
		 this.uX=false; 
		 switch(this.aM){
			 case "1": this.gB="D"+this.Yv+"M"+this.Yv+"YYYY";
			 	break;
			 case "2": this.gB="YYYY"+this.Yv+"M"+this.Yv+"D";
			 	break;
			 default:this.gB="M"+this.Yv+"D"+this.Yv+"YYYY";
		 }  
		 this.tl=this.dD.Item("ZEROS")==false?this.dD.Item("ZEROS"):true;
		 this.LF=this.dD.Item("MOUSEOVER")==true?this.dD.Item("MOUSEOVER"):false;
		 this.sj=this.dD.Item("SHOWDAYS")==false?this.dD.Item("SHOWDAYS"):true;
		 this.KI=this.dD.Item("DELAY")?this.dD.Item("DELAY"):2000;
		 this.Mx=this.dD.Item("BEGINONMONDAY")?1:0;
		 this.Zf=this.dD.Item("ICONLEFT")?this.dD.Item("ICONLEFT"):null;
		 this.AH=this.dD.Item("ICONTOP")?this.dD.Item("ICONTOP"):null;
		 this.cg=this.dD.Item("DIR")?this.dD.Item("DIR"):"basic";
		 this.VK=this.dD.Item("MONTH")?this.dD.Item("MONTH"):1;
		 this.hO=this.dD.Item("YEAR")?this.dD.Item("YEAR"):1;
		 this.Cw=this.dD.Item("SHADOW")==true?true:false;
		 this.xl=this.dD.Item("CLOSE")==false?false:true;
		 this.kG=this.dD.Item("MOVEMODE")?this.dD.Item("MOVEMODE"):0;
		 this.Zt=this.dD.Item("INVALID")?this.dD.Item("INVALID"):0;
		 this.cp=this.dD.Item("FUNCTION")?this.dD.Item("FUNCTION"):null;
		 this.IA=this.dD.Item("TOOLTIP")?this.dD.Item("TOOLTIP"):"Click here to visually select a date with DateClick...";
		 this.jY=this.dD.Item("STATIC")?this.dD.Item("STATIC"):0;
		 if(this.dD.Item("MASK")) 
		 	this.gB=this.dD.Item("MASK"); 
		 this.varTitle=this.IA; 
		 var Rt;
		 if(this.cg){
			 if(this.cg.indexOf("/")>=0){
				 Rt=this.cg.split("/");
				 this.Ro=Rt[Rt.length-1];
			 }else{
				 this.Ro=this.cg?this.cg:"basic";
			 }
		 }else{
			 this.Ro=this.cg?this.cg:"basic";
		 }
		 this.F=F;
		 this.g=g;
		 this.q=q;
		 this.B=B;
		 this.w=w;
		 this.Y=Y;
		 this.k=k;
		 this.h=h;
		 this.C=C;
		 this.T=T;
		 this.M=M;
		 this.Q=Q;
		 this.b=b;
		 this.O=O;
		 this.J=J;
		 this.A=A;
		 this.V=V;
		 this.U=U;
		 this.writeCalendar=writeCalendar;
		 this.L=L;
		 this.l=l;
		 this.t=t;
		 this.I=I;
		 this.N=N;
		 this.p=p;
		 this.o=o;
		 this.d=d;
		 this.Z=Z;
		 this.u=u;
		 this.f=f;
		 this.n=n;
		 this.v=v;
		 this.X=X;
		 this.r=r;
		 this.H=H;
		 this.G=G;
		 this.R=R;
		 Lx=this;
		 
		 function m(){}
		 function G(iN){
			 if(Lx.iL) Lx.iL.value=R(iN);
		 }
		 
		 function writeCalendar(){  
		 	var dj,VA; 
			dj=document.all?"onClick":"onMouseDown";
			var LN=(document.all&&!document.getElementById)?"width:20;":"";
			var ui=Lx.LF?"onMouseOver":dj;
			var Rp;
			Rp=Lx.Cw?"filter: progid:DXImageTransform.Microsoft.DropShadow(color=#777788,direction=135,strength=2);":"";
			var pX=Lx.AH?"top:"+Lx.AH+";":"";
			pX+=Lx.Zf?"left:"+Lx.Zf+";":"";
			pX+=pX.length>0?"position: absolute;":"";
			Lx.U(); 
			if(Lx.jY<1){
				document.write("<img src='"+Lx.cg+"/calendar.gif' border='0' align='top' style='"+pX+"' "+ui+"='glbCalendars["+Lx.Po+"].H();glbCalendars["+Lx.Po+"].F(event);if (window.event)window.event.cancelBubble=true;' title='"+Lx.varTitle+"'>");
				VA="display:none;";
			}else VA="display:inline;";  
			document.write("<div id='"+Lx.Dr+"' ");
			document.write("onMouseOut='glbCalendars["+Lx.Po+"].d();' ");
			document.write("style='"+Rp+LN+"position:absolute;"+VA+"' class='"+Lx.Ro+"-cl-body'> "); 
			document.write(Lx.p()); 
			document.write("</div>"); 
			if(Lx.hO){
				document.write("<div id='"+Lx.Dr+"_year' ");
				document.write("onMouseOut='glbCalendars["+Lx.Po+"].d();' ");
				document.write("onMouseOver='glbCalendars["+Lx.Po+"].M(this);' ");
				document.write("style='position:absolute;display:none;background-color:white;'> "); 
				document.write(Lx.N()); 
				document.write("</div>");
			} 
			if(Lx.VK){
				document.write("<div id='"+Lx.Dr+"_month' ");
				document.write("onMouseOut='glbCalendars["+Lx.Po+"].Z();' ");
				document.write("onMouseOver='glbCalendars["+Lx.Po+"].M(this);' ");
				document.write("style='position:absolute;display:none;background-color:white;'> "); 
				document.write(Lx.I()); 
				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='"+Lx.Dr+"_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='"+Lx.Dr+"_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='"+Lx.Dr+"_ghost_year'></IFRAME>\n");  
			
			if(this.KN){
				if(confirm("The following options are not available in DateClick Standard Edition:\n"+ this.KN+"\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 P(){}
		function F(wU){
			var mE,Kb,rT;
			var iN;
			wU=WK(wU);
			rT=Lx.o(wU);
			uD();
			
			if(ol) Lx.uX=true;
			if(document.getElementById){
				mE=document.getElementById(Lx.Dr);
				if(Lx.uX) Kb=document.getElementById(Lx.Dr+"_ghost");
			}else if(document.all){
				mE=document.all[Lx.Dr];
			
				if(Lx.uX) Kb=document.all[Lx.Dr+"_ghost"];
			}else mE=document.layers[Lx.Dr];
			
			Lx.WU=mE;Lx.sF=Kb;
			if(Lx.isOpen){
				if(Lx.uX){
					Lx.v(Kb,mE);
					Kb.style.display="block";
				}
				return false;
			}
			Lx.O();
			clearInterval(Lx.eJ); 
			for(var GM=0;GM<glbCalendars.length;GM++){
				if(glbCalendars[GM]==Lx) 
					glbCalendars[GM].TR=true;
				else 
					glbCalendars[GM].TR=false;
				
				if(!glbCalendars[GM].TR){
					glbCalendars[GM].g();
				}
			}
			
			if(mE){
				mE.style.zIndex=++Rq; 
				mE.style.display="block";
				
				if(!Lx.mv){
					Lx.n(mE,rT);				
				}
				
				Lx.isOpen=true;
				Lx.jC=oH(mE);
				if(Lx.uX){
					Kb.style.display="block";
					Lx.v(Kb,mE);
				}
				
				if(window.event){
					window.event.cancelBubble=true;
					window.event.returnValue=false;
				}
			}
			
			return false;
		}
		
		function Y(wU){
			var mE,eD,Cn,Kb,rT=Lx.o(wU);
			if(Lx.Kf) return false;
			clearInterval(Lx.eJ);
			if(document.getElementById){
				mE=document.getElementById(Lx.Dr);
				eD=document.getElementById(Lx.Dr+"_month");
				
				if(Lx.uX) Kb=document.getElementById(Lx.Dr+"_ghost_mo");
			
			}else if(document.all){
				mE=document.all[Lx.Dr];
				eD=document.all[Lx.Dr+"_month"];
				
				if(Lx.uX) Kb=document.all[Lx.Dr+"_ghost_mo"];
			}else{
				mE=document.layers[Lx.Dr];
				eD=document.layers[Lx.Dr+"_month"];
			}
			
			Lx.q();
			
			if(mE){
				eD.style.display="block";
				eD.style.zIndex=++Rq;
				Lx.X(mE,eD );
				Lx.PN=oH(eD);
				if(Lx.uX){
					Lx.v(Kb,eD );
					Kb.style.display="block";
				}
			}
		}
		
		function w(wU){
			var mE,wp,Cn,rT=Lx.o(wU);
			
			if(Lx.Kf) return false;
			
			clearInterval(Lx.eJ);
			if(document.getElementById){
				mE=document.getElementById(Lx.Dr);
				wp=document.getElementById(Lx.Dr+"_year");
				
				if(Lx.uX) Kb=document.getElementById(Lx.Dr+"_ghost_year");
			}else if(document.all){
				mE=document.all[Lx.Dr];
				wp=document.all[Lx.Dr+"_year"];
				
				if(Lx.uX) Kb=document.all[Lx.Dr+"_ghost_year"];
			}else{
				mE=document.layers[Lx.Dr];
				wp=document.layers[Lx.Dr+"_year"];
			}
			
			Lx.B();
			
			if(mE){
				wp.style.display="block";
				Lx.r(mE,wp );
				wp.style.zIndex=++Rq;
				Lx.mO=oH(wp);
				
				if(Lx.uX){
					Lx.v(Kb,wp );
					Kb.style.display="block";
				}
			}
		}
		
		function g(){
			var mE,Kb;
			
			if(!Lx.isOpen) return false;
			
			if(document.getElementById){
				mE=document.getElementById(Lx.Dr).style;
				
				if(Lx.uX) Kb=document.getElementById(Lx.Dr+"_ghost").style;
			}else if(document.all){
				mE=document.all[Lx.Dr].style;
				if(Lx.uX) Kb=document.all[Lx.Dr+"_ghost"].style;
			}else{
				mE=document.layers[Lx.Dr];
			}
			
			if(mE){
				mE.display="none";
				
				if(Lx.uX) Kb.display="none";
			}
			
			if(Lx.hO) Lx.q();
			
			if(Lx.VK) Lx.B();
			
			Lx.isOpen=false;
			clearInterval(Lx.eJ);
		}
		
		function B(){
			var eD,Kb;
			if(document.getElementById){
				eD=document.getElementById(Lx.Dr+"_month");
				
				if(eD) eD=eD.style;
				if(Lx.uX) Kb=document.getElementById(Lx.Dr+"_ghost_mo").style;
			}else if(document.all){
				eD=document.all[Lx.Dr+"_month"];
				
				if(eD) eD=eD.style;
				if(Lx.uX) Kb=document.all[Lx.Dr+"_ghost_mo"].style;
			}else{
				eD=document.layers[Lx.Dr+"_month"];
			}
			
			if(eD){
				eD.display="none";
				Lx.PN={x:0,y:0,Ut:0,aR:0};
				
				if(Lx.uX) Kb.display="none";
			}
		}
		
		function q(){
			var wp,Kb;
			if(document.getElementById){
				wp=document.getElementById(Lx.Dr+"_year");
				
				if(wp) wp=wp.style;
				if(Lx.uX) Kb=document.getElementById(Lx.Dr+"_ghost_year").style;
			}else if(document.all){
				wp=document.all[Lx.Dr+"_year"];
				
				if(wp) wp=wp.style;
				if(Lx.uX) Kb=document.all[Lx.Dr+"_ghost_year"].style;
			}else{
				wp=document.layers[Lx.Dr+"_year"];
			}
			
			if(wp){
				wp.display="none";
				Lx.mO={x:0,y:0,Ut:0,aR:0};
				
				if(Lx.uX) Kb.display="none";
			}
		}
		
		function s(){}
		
		function M(XY){
			clearInterval(Lx.eJ);
			
			if(XY.className==Lx.Ro+"-cl-on-month") 
				XY.className=Lx.Ro+"-cl-on-month-lit";
			else 
				if(XY.className==Lx.Ro+"-cl-off-month") 
					XY.className=Lx.Ro+"-cl-off-month-lit";
				else 
					if(XY.className==Lx.Ro+"-cl-year") 
						XY.className=Lx.Ro+"-cl-year-lit";
		}
		
		function Q(XY){
			if(XY.className==Lx.Ro+"-cl-on-month-lit") 
				XY.className=Lx.Ro+"-cl-on-month";
			else 
				if(XY.className==Lx.Ro+"-cl-off-month-lit") 
					XY.className=Lx.Ro+"-cl-off-month";
				else 
					if(XY.className==Lx.Ro+"-cl-year-lit") 
						XY.className=Lx.Ro+"-cl-year";
		}
		
		function k(){
			Lx.vu.setMonth(++Lx.Ca);
			U();
			b(Lx.Dr,p());
		}
		
		function C(){
			Lx.uj+=10;
			b(Lx.Dr+"_year",N());
		}
		
		function h(){
			Lx.vu.setMonth(--Lx.Ca);
			U();
			b(Lx.Dr,p());
		}
		
		function T(){
			Lx.uj-=10;
			b(Lx.Dr+"_year",N());
		}
		
		function L(JV){
			var rtnDt=new Date(JV.getAttribute(Lx.ad));
			
			if(Lx.Zt==1&&Date.parse(rtnDt.toLocaleString())<Date.parse(Lx.R(Date()))){
				alert(Lx.Yb);
			}else if(Lx.Zt==2&&Date.parse(rtnDt.toLocaleString())<=Date.parse(Lx.R(Date()))){
				alert(Lx.Yb);
			} 
			
			Lx.FY=Lx.R(rtnDt);
			if(Lx.iL){
				if(Lx.iL) Lx.iL.value=Lx.R(rtnDt);
			}
			
			if(Lx.cp){
				eval(Lx.cp+"(Lx.R(rtnDt))");
			}
			
			if(Lx.xl) Lx.g();
		}
		
		function t(Nt,OD){
			Lx.vu.setFullYear(Nt);
			U();
			b(Lx.Dr,p());
			Lx.TR=true;
			Lx.q(); 
			
			if(window.event) 
				event.cancelBubble=true;
			else 
				OD.stopPropagation();
		}
		
		function l(LR,OD){
			Lx.vu.setMonth(LR);
			U();
			b(Lx.Dr,p());
			Lx.TR=true;
			Lx.B(); 
			
			if(window.event) 
				event.cancelBubble=true;
			else 
				OD.stopPropagation();
		}
		
		function a(){}
		
		function R(iN){
			qu=[ '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 KS=Lx.gB;
			var KO='DMYHdhmst'.split('' );
			var wC=new Array();
			var UE=0;
			var CG;
			var OX=/\[(\d+)\]/; 
			var Cv=new Date(iN);
			var rg=Cv.getDay();
			var date=Cv.getDate();
			var vU=Cv.getMonth();
			var NY=Cv.getFullYear().toString();
			var KB=Cv.getHours();
			var cA=Cv.getMinutes();
			var mV=Cv.getSeconds();
			var WL=new Object();
			WL[ 'D' ]=date;WL[ 'd' ]=date+qu[ date-1 ];
			WL[ 'DD' ]=(date<10 )?'0'+date:date;
			WL[ 'DDD' ]=Lx.FullDayNames[ rg ].substring(0,3 );
			WL[ 'DDDD' ]=Lx.FullDayNames[ rg ];
			WL[ 'M' ]=vU+1;WL[ 'MM' ]=(vU+1<10 )?'0'+(vU+1 ):vU+1;
			WL[ 'MMM' ]=Lx.FullMonthNames[ vU ].substring(0,3 );
			WL[ 'MMMM' ]=Lx.FullMonthNames[ vU ];
			WL[ 'Y' ]=(NY.charAt(2 )=='0' )?NY.charAt(3 ):NY.substring(2,4 );
			WL[ 'YY' ]=NY.substring(2,4 );
			WL[ 'YYYY' ]=NY; 
			
			for(var GM=0;GM<KO.length;GM++){
				CG=new RegExp('('+KO[ GM ]+'+)' );
				
				while(CG.test(KS ) ){
					wC[ UE ]=RegExp.$1;
					KS=KS.replace(RegExp.$1,'['+UE+']' );
					UE++;
				}
			}
			
			while(OX.test(KS ) ){
				KS=KS.replace(OX,WL[ wC[ RegExp.$1 ] ] );
			}
			return KS;
		}
		
		function O(){
			Lx.WU.onmousedown=Lx.J;
			
			if(isNaN(parseInt(Lx.WU.style.left))) Lx.WU.style.left="0px";
			if(isNaN(parseInt(Lx.WU.style.top))) Lx.WU.style.top="0px";
			
			Lx.WU.hS=new Function();
			Lx.WU.pk=new Function();
			Lx.WU.QL=new Function();
		}
		
		function J(uu){
			uu=WK(uu);
			var y=parseInt(Lx.WU.style.top);
			var x=parseInt(Lx.WU.style.left);
			Lx.B();
			Lx.q();
			Lx.WU.hS(x,y);
			Lx.Kf=true;
			
			if(Lx.kG){
				Lx.mv=uu.clientX;
				Lx.aN=uu.clientY;
				Lx.nU=false;
			}
			
			document.onmousemove=Lx.A;
			document.onmouseup=Lx.V;
			return false;
		}
		
		function A(uu){
			uu=WK(uu);
			var OJ=uu.clientY;
			var io=uu.clientX;
			var y=parseInt(Lx.WU.style.top);
			var x=parseInt(Lx.WU.style.left);
			var UV,CK;UV=x+(io-Lx.mv);
			CK=y+(OJ-Lx.aN);
			
			if(Lx.kG>0){
				if(!Lx.nU){
					Lx.WU.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
					
					if(Lx.WU.style.cursor) Lx.WU.style.cursor="move";
					Lx.nU=true;
				}
				
				Lx.WU.style["left"]=UV+"px";
				Lx.WU.style["top"]=CK+"px";
				Lx.mv=io;Lx.aN=OJ;
				
				if(Lx.sF) Lx.sF.style.display="none";
			}
			
			Lx.WU.QL(UV,CK);
			return false;
		}
		
		function V(){
			document.onmousemove=null;
			document.onmouseup=null;
			Lx.WU.pk(parseInt(Lx.WU.style["left"]),parseInt(Lx.WU.style["top"]));
			
			if(Lx.kG){
				Lx.WU.style.filter="";
				
				if(Lx.WU.style.cursor) Lx.WU.style.cursor="arrow";
				
				Lx.jC=oH(Lx.WU);
			
				if(Lx.sF){
					Lx.v(Lx.sF,Lx.WU);
					Lx.sF.style.display="block";
				}
			
				if(Lx.kG>1){
					Lx.mv=0;Lx.aN=0;
				}
			}
		
			Lx.Kf=false;
		}
	
		function U(){
			var NT,Jt=0;
			var Vu,GF;
			var qU=Lx.vu;
			var GM,pu=1;
			Lx.Ck=qU.getDate();
			Lx.Ca=qU.getMonth();
			Lx.CT=qU.getFullYear();
			NT=new Date(Lx.CT,Lx.Ca,1);  
			Jt-=NT.getDay()>0?NT.getDay():NT.getDay()+7;
			
			for(GM=0;GM<43;GM++){
				Lx.FE[GM]=new Date(NT.getFullYear(),NT.getMonth(),++Jt);
			}
		}
		
		function I(){
			var innerHTML="";
			innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";
			innerHTML+="<tr>";
			
			for(var GM=0;GM<12;GM++){ 
				if(GM % 6==0) innerHTML+="</tr><tr>";
				innerHTML+="<td class='"+Lx.Ro+"-cl-year' onMouseOver='glbCalendars["+Lx.Po+"].M(this);' onMouseOut='glbCalendars["+Lx.Po+"].Q(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+Lx.Po+"].l("+GM+",event);'>";
				innerHTML+=Lx.aryMonths[GM];
				innerHTML+="</td>";
			}
			
			innerHTML+="</tr>";
			innerHTML+="</table>";
			return innerHTML;
		}
		
		function N(){
			var innerHTML="";
			innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";
			innerHTML+="<tr>";
			innerHTML+="<td class='"+Lx.Ro+"-cl-year' onMouseOver='glbCalendars["+Lx.Po+"].M(this);' onMouseOut='glbCalendars["+Lx.Po+"].Q(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+Lx.Po+"].C();' align='center' valign='center'>";
			innerHTML+="<img src='"+Lx.cg+"/up.gif' border='0'>";
			innerHTML+="</td>";
			innerHTML+="</tr>";
			
			for(var GM=parseInt(Lx.uj);GM>parseInt(Lx.uj)-10;GM--){
				innerHTML+="<tr>";
				innerHTML+="<td class='"+Lx.Ro+"-cl-year' onMouseOver='glbCalendars["+Lx.Po+"].M(this);' onMouseOut='glbCalendars["+Lx.Po+"].Q(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+Lx.Po+"].t("+GM+",event);'>";
				innerHTML+=GM;
				innerHTML+="</td>";
				innerHTML+="</tr>";
			}
			
			innerHTML+="<tr>";
			innerHTML+="<td class='"+Lx.Ro+"-cl-year' onMouseOver='glbCalendars["+Lx.Po+"].M(this);' onMouseOut='glbCalendars["+Lx.Po+"].Q(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+Lx.Po+"].T();' align='center' valign='center'>";
			innerHTML+="<img src='"+Lx.cg+"/down.gif' border='0'>";
			innerHTML+="</td>";
			innerHTML+="</tr>";
			innerHTML+="</table>";
			return innerHTML;
		}
		
		function p(){
			var innerHTML="";
			var Rt,Jh,jg="none",bB="none";
			var TP; 
			innerHTML+="<table cellspacing=0 cellpadding=0 border=0 id='cal'>"; 
			innerHTML+="<tr class='"+Lx.cg+"-header-row'>"; 
			innerHTML+="<td align='left' class='"+Lx.Ro+"-cl-header' onMouseOver='glbCalendars["+Lx.Po+"].M(this);'>"; 
			innerHTML+="<img src='"+Lx.cg+"/prev.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+Lx.Po+"].h();return false;' style='cursor:hand;cursor:pointer;'>"; 
			innerHTML+="</td>";
			innerHTML+="<td align='center' class='"+Lx.Ro+"-cl-header' onMouseOver='glbCalendars["+Lx.Po+"].M(this);'>"; 
			
			if(Lx.VK==2) 
				jg="onMouseOver";
			else if(Lx.VK==1) 
				jg="onClick"; 
			
			innerHTML+="<span class='"+Lx.Ro+"-cl-header' "+jg+"='return glbCalendars["+Lx.Po+"].Y(event);' "+(jg=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";
			innerHTML+=Lx.aryMonths[Lx.Ca]; 
			innerHTML+="</span>&nbsp;"; 
			
			if(Lx.hO==2) 
				bB="onMouseOver";
			else if(Lx.hO==1) 
				bB="onClick"; 
			
			innerHTML+="<span class='"+Lx.Ro+"-cl-header' "+bB+"='return glbCalendars["+Lx.Po+"].w(event);' "+(bB=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";
			innerHTML+=Lx.CT;
			innerHTML+="</span>"; 
			innerHTML+="</td>"; 
			innerHTML+="<td align='right' class='"+Lx.Ro+"-cl-header' onMouseOver='glbCalendars["+Lx.Po+"].M(this);'>";
			innerHTML+="<img src='"+Lx.cg+"/next.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+Lx.Po+"].k();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(Lx.sj){
				innerHTML+="<tr class='"+Lx.Ro+"-cl-days'>";
				for(var x=0;x<7;x++){
					innerHTML+="<td class='"+Lx.Ro+"-cl-day' onMouseOver='glbCalendars["+Lx.Po+"].M(this);' onMouseOut='glbCalendars["+Lx.Po+"].Q(this);'>";
					innerHTML+=Lx.aryDays[Lx.Mx+x];
					innerHTML+="</td>";
				}
				
				innerHTML+="</tr>";
			} 
			
			var sh;
			for(var GM=1;GM<42;){ 
				innerHTML+="<tr>"; 
				for(var pu=0;pu<7;++pu,GM++){
					sh=Lx.iL?Lx.iL.value:null;
					TP=R(Lx.FE[GM-1+Lx.Mx]);
					Jh=Lx.FE[GM-1+Lx.Mx].toGMTString(); 
					Rt=Lx.FE[GM-1+Lx.Mx].getMonth()==Lx.Ca?"cl-on-month":"cl-off-month";
					
					if(Lx.Zt==1&&Date.parse(Lx.FE[GM-1+Lx.Mx])<Date.parse(Lx.R(Date()))){
						Rt=" "+Lx.Ro+"-old";
					}else if(Lx.Zt==2&&Date.parse(Lx.FE[GM-1+Lx.Mx])<=Date.parse(Lx.R(Date()))){
						Rt=" "+Lx.Ro+"-old";
					}else if(new Date(Lx.aM=="1"?mG(sh):sh).toGMTString()==Jh){
						Rt=" "+Lx.Ro+"-tgt";
					}  
					
					innerHTML+="<td class='"+Lx.Ro+"-"+Rt+"' onMouseOver='glbCalendars["+Lx.Po+"].M(this);' onMouseOut='glbCalendars["+Lx.Po+"].Q(this);' title='"+TP+"' style='cursor: hand; cursor: pointer;' "+Lx.ad+"='"+Jh+"' onClick='glbCalendars["+Lx.Po+"].L(this);'>"; 
					innerHTML+=Lx.FE[GM-1+Lx.Mx].getDate(); 
					innerHTML+="</td>";
				} 
				
				innerHTML+="</tr>";
			}  
			
			innerHTML+="</table>"; 
			innerHTML+="</td>"; 
			innerHTML+="</tr>"; 
			innerHTML+="</table>";
			
			return(innerHTML);
		}
		
		function b(wt,WN){
			if(document.getElementById){
				document.getElementById(wt ).innerHTML=WN;
			}else if(document.all){
				document.all[wt].innerHTML=WN;
			}else if(document.layers){
				with(document.layers[wt].document){
					open();
					write(WN );
					close();
				}
			}
			
			return null;
		}
		
		function o(uu){
			var DS=0;
			var gh=0;
			
			if(!uu) uu=window.event;
			
			if(uu){
				if(uu.pageX||uu.pageY){
					DS=uu.pageX;gh=uu.pageY;
				}else if(uu.clientX||uu.clientY){
					DS=uu.clientX+document.body.scrollLeft;gh=uu.clientY+document.body.scrollTop;
				}
			}
			
			var mC={x:DS,y:gh};
			return mC;
		}
		
		function d(){
			if(Lx.eJ){
				clearInterval(Lx.eJ);
				Lx.eJ=null;
			}
			
			Lx.eJ=setInterval("glbCalendars["+Lx.Po+"].g()",Lx.KI );
		
		}
		
		function Z(){
			if(Lx.UU){
				clearInterval(Lx.UU);
				Lx.UU=null;
			}
			
			Lx.UU=setInterval("glbCalendars["+Lx.Po+"].B()",4000 );
			Lx.d();
		}
		
		function u(){
			if(Lx.gw){
				clearInterval(Lx.gw);
				Lx.gw=null;
			}
			
			Lx.gw=setInterval("glbCalendars["+Lx.Po+"].q()",4000 );
			Lx.d();
		}
		
		function f(bb){
			var mC;
			if(bb<=9){
				mC=Lx.tl?"0"+bb:bb;
			}else mC=bb;
			
			return mC;
		}
		
		function n(mE,li){
			var dG=oH(mE );
			var nu=gZ();
			
			if(dG["Ut"]+li["x"]>nu["x"]){
				mE.style.left=li["x"]-dG["Ut"];
			}else mE.style.left=li["x"];
			
			if(dG["aR"]+li["y"]>nu["y"]) 
				mE.style.top=li["y"]-dG["aR"];
			else 
				mE.style.top=li["y"];
			
			if(mE.style.top<=0) mE.style.top=1;
			if(mE.style.left<=0) mE.style.left=1;
		}
		
		function v(bI,mE){
			var dG=oH(mE );
			
			if(dG.x>0){
				bI.style.left=dG.x;
				bI.style.top=dG.y;
				bI.style.width=dG.Ut;
				bI.style.height=dG.aR;
				bI.style.zIndex=0;
				bI.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
			}
		}
		
		function X(mE,JG){
			var dM=oH(mE );
			var dG=oH(JG );
			var nu=gZ();
			var sG=dM["Ut"] / 2;
			var da=dG["Ut"] / 2;
			var ca=dM["x"]-(da-sG);
			var OV=dM["aR"]+dM["y"];
			JG.style.left=ca;
			
			if(OV+dG["aR"]>nu["y"]) 
				JG.style.top=OV-dG["aR"];
			else 
				JG.style.top=OV;
		}
		
		function r(mE,nm){
			var dM=oH(mE );
			var Kd=oH(nm );
			var nu=gZ();
			
			if(Kd["Ut"]+dM["x"]+dM["Ut"]>nu["x"]) 
				nm.style.left=nu["x"]-Kd["Ut"];
			else 
				nm.style.left=dM["x"]+dM["Ut"];
				
			if(Kd["aR"]+dM["y"]>nu["y"]) 
				nm.style.top=dM["y"];
			else 
				nm.style.top=dM["y"];
		}
		
		function H(){
			var sh;
			
			if(Lx.iL){
				sh=Lx.iL.value;
				iN=new Date(Lx.aM=="1"?mG(sh):sh);
			}else iN=new Date();
			
			if(isNaN(iN)) 
				Lx.vu=new Date();
			else 
				Lx.vu=iN;U();
			
			b(Lx.Dr,p());
		}
		
		var Lx;
	}

	function c(){}     
	
	function QH(Jr){
		this.eM=new Array();
		this.im=new Array();
		this.K=K;
		this.Item=Item;
		K(Jr,this );
		
		function K(Ed,JT){
			var GM,UZ;
			var fs,Pa;
			
			if(Ed) 
				UZ=Ed.split(";");
			else 
				return;
				
			var fs,kF,XS;
			
			for(GM=0;GM<UZ.length;GM++){
				XS=UZ[GM].indexOf(":");
				
				if(XS>0){
					fs=UZ[GM].substring(0,XS).toUpperCase();
					Pa=UZ[GM].substring(XS+1,UZ[GM].length);
					
					if(Pa.toLowerCase()=="true") 
						Pa=true;
					else if(Pa.toLowerCase()=="false") 
						Pa=false;
						
					JT.im[GM]=fs;
					JT.eM[GM]=Pa;
				}
			}
		}
		
		function Item(jf){
			var GM;
			
			for(GM=0;GM<this.im.length;GM++){
				if(this.im[GM]==jf){
					return this.eM[GM];
				}
			}
			
			return null;
		}
	}
	
	function NB(wU){
		var sU=false;
		var bu={x:0,y:0};
		
		if(window.event){
			bu.x=event.clientX+document.body.scrollLeft;
			bu.y=event.clientY+document.body.scrollTop;
		}else if(wU){
			bu.x=wU.pageX;
			bu.y=wU.pageY;
		}
		
		for(var GM=0;GM<glbCalendars.length;GM++){
			if(!NL(bu,glbCalendars[GM].jC)&&!NL(bu,glbCalendars[GM].PN)&&!NL(bu,glbCalendars[GM].mO)){
				glbCalendars[GM].g();
			}else sU=true;
			
			glbCalendars[GM].TR=false;
		}
	}
	
	function NL(PF,jC){
		if((PF.x>jC.x&&PF.x<jC.x+jC.Ut)&&(PF.y>jC.y&&PF.y<jC.y+jC.aR)) return true;
		
		return false;
	}
	
	function oH(Ea){
		var Iw={x:0,y:0,Ut:0,aR:0};
		if(Ea!=null){
			Iw.aR=Ea.offsetHeight;
			Iw.Ut=Ea.offsetWidth;
			
			while(Ea){
				Iw.x+=Ea.offsetLeft;
				Iw.y+=Ea.offsetTop;
				Ea=Ea.offsetParent;
			}
			
			return(Iw);
		}
	}
	
	function gZ(){
		var Iw={x:0,y:0};
		
		if(document.body.clientWidth){
			Iw.x+=document.body.clientWidth;
			Iw.y+=document.body.clientHeight;
		}else if(window.innerWidth){
			Iw.x+=window.innerWidth;
			Iw.y+=window.innerHeight;
		}
		
		return(Iw);
	} 
	
	var PL="";
	
	if(typeof(document.media)=='string'&&document.getElementById&&document.all) 
		PL="ie6";
	else if(document.getElementById&&document.all) 
		PL="ie5";
	else if(document.getElementById&&!document.all) 
		PL="ns6";
	else if(document.all) 
		PL="ie4";
	else if(document.layers) 
		PL="ns4";
	else 
		PL="other";
		
	var Rq=9999;
	
	switch(PL){
		case "ie5":
		case "ie6":
			if(document.attachEvent) 
				document.attachEvent('onclick',NB );
			break;
		case "ns6": 
			break;
		case "ns4":
			break;
	}
	
	function WK(uu){
		if(typeof uu=='undefined') uu=window.event;
		
		if(uu){
			if(typeof uu.layerX=='undefined') uu.layerX=uu.offsetX;
			if(typeof uu.layerY=='undefined') uu.layerY=uu.offsetY;
		}
		
		return uu;
	}
	
	function uD(){
		if(PL=="ie6"&&!window.opera){
			if(!document.getElementsByTagName("select")) 
				ol=false;
			else 
				ol=true;
		}else ol=false;
	}
	
	function mG(Mu){
		var S=Mu,D;
		S=S.replace(/(\d+).(\d+).(\d+)/,'$3/$2/$1');
		S=S.replace(/^(\d\d\/)/,'20$1');
		D=new Date(S);
		return D;
	}      
	
	var glbCalendars=Array();
	var ol=Array();
