function calendar(bx){
	this.Version="1.41";
	this.ff=0;
	this.av=0;
	this.cx=0;
	this.f=new ec(bx);
	this.ao=new Date();
	this.cg=this.ao.getFullYear();
	this.b=glbCalendars.length;
	this.al=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.bn=['January','February','March','April','May','June','July','August','September','October','November','December'];
	this.cc=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
	this.az="Please select a future date";
	glbCalendars[glbCalendars.length]=this;
	this.e="caldiv_"+this.b;
	this.ae=false;
	this.Div=null;
	this.cw=null;
	this.be=false;
	this.cu=false;
	this.ar=0;
	this.bd=0;
	this.bk={x:0,y:0,ef:0,ee:0};
	this.cb={x:0,y:0,ef:0,ee:0};
	this.cq={x:0,y:0,ef:0,ee:0};
	this.bt="";
	this.ca=false;
	var fx=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
	this.fr=fx?"title":"alt";
	this.fq=Array(3);
	this.ej="";
	this.u=null;
	this.bj=null;
	this.bc=null;
	this.q=this.f.g("FIELD")?eval(this.f.g("FIELD")):null;
	this.bz=this.f.g("FORMAT")?this.f.g("FORMAT"):"0";
	this.au=this.f.g("DELIMITER")?this.f.g("DELIMITER"):"/";
	this.d=false;
	
	switch(this.bz){
		case"1":this.cf="D"+this.au+"M"+this.au+"YYYY";
				break;
		case"2":this.cf="YYYY"+this.au+"M"+this.au+"D";
				break;
		default:this.cf="M"+this.au+"D"+this.au+"YYYY";
	};
	
	this.ew=true;
	this.ev=false;
	this.ez=true;
	this.eu=2000;
	this.p=0;
	this.cn=null;
	this.ct=null;
	this.ad=1;
	this.ah=1;
	this.de=false;
	this.et=true;
	this.ax=0;
	this.s="basic";
	this.bp=0;
	this.cm=null;
	this.es="Click here to visually select a date with the super cool date click...";
	this.eg=0;
	if(this.f.g("ZEROS"))this.bt+="ZEROS\n";
	if(this.f.g("MOUSEOVER"))this.bt+="MOUSEOVER\n";
	if(this.f.g("SHOWDAYS"))this.bt+="SHOWDAYS\n";
	if(this.f.g("DELAY"))this.bt+="DELAY\n";
	if(this.f.g("BEGINONMONDAY"))this.bt+="BEGINONMONDAY\n";
	if(this.f.g("ICONLEFT"))this.bt+="ICONLEFT\n";
	if(this.f.g("ICONTOP"))this.bt+="ICONTOP\n";
	if(this.f.g("DIR"))this.bt+="DIR\n";
	if(this.f.g("MONTH"))this.bt+="MONTH\n";
	if(this.f.g("SHADOW"))this.bt+="SHADOW\n";
	if(this.f.g("CLOSE"))this.bt+="CLOSE\n";
	if(this.f.g("YEAR"))this.bt+="YEAR\n";
	if(this.f.g("MOVEMODE"))this.bt+="MOVEMODE\n";
	if(this.f.g("INVALID"))this.bt+="INVALID\n";
	if(this.f.g("FUNCTION"))this.bt+="FUNCTION\n";
	if(this.f.g("TOOLTIP"))this.bt+="TOOLTIP\n";
	if(this.f.g("STATIC"))this.bt+="STATIC\n";
	this.er=this.es;
	var w;
	if(this.s){
		if(this.s.indexOf("/")>=0){
			w=this.s.split("/");
			this.c=w[w.length-1];
		}else{
			this.c=this.s?this.s:"basic";
		};
	}else{
		this.c=this.s?this.s:"basic";
	};
	this.bw=bw;
	this.aa=aa;
	this.at=at;
	this.am=am;
	this.dl=dl;
	this.db=db;
	this.da=da;
	this.cz=cz;
	this.dj=dj;
	this.di=di;
	this.dk=dk;
	this.dv=dv;
	this.v=v;
	this.co=co;
	this.bv=bv;
	this.dh=dh;
	this.cv=cv;
	this.t=t;
	this.writeCalendar=writeCalendar;
	this.selectDate=selectDate;
	this.cl=cl;
	this.cs=cs;
	this.as=as;
	this.z=z;
	this.j=j;
	this.bg=bg;
	this.br=br;
	this.bu=bu;
	this.ce=ce;
	this.dx=dx;
	this.cd=cd;
	this.r=r;
	this.bl=bl;
	this.bq=bq;
	this.setDefDate=setDefDate;
	this.dn=dn;
	this.ck=ck;
	a=this;
	
	function fl(){};

	function dn(ap){
		if(a.q)a.q.value=ck(ap);
	};

	function writeCalendar(){
		var dr,ak;
		dr=document.all?"onClick":"onMouseDown";
		var ed=(document.all&&!document.getElementById)?"width:20;":"";
		var ep=a.ev?"onMouseOver":dr,bs;
		bs=a.de?"filter: progid:DXImageTransform.Microsoft.DropShadow(color=#777788,direction=135,strength=2);":"";
		var bb=a.ct?"top:"+a.ct+"px;":"";
		bb+=a.cn?"left:"+a.cn+"px;":"";
		bb+=bb.length>0?"position: absolute;":"";
		a.t();
		if(a.eg<1){
			document.write("<img src='"+a.s+"/calendar.gif' border='0' align='top' style='"+bb+"' "+ep+"='glbCalendars["+a.b+"].setDefDate();glbCalendars["+a.b+"].bw(event);if (window.event)window.event.cancelBubble=true;' title='"+a.er+"' />");
			ak="display:none;";
		}else{
			ak="display:inline;";
		};
		document.write("<div id='"+a.e+"' ");
		document.write("onMouseOut='glbCalendars["+a.b+"].br();' ");
		document.write("style='position:absolute;"+bs+ed+""+ak+"' class='"+a.c+"-cl-body'> ");
		document.write(a.j());
		document.write("</div>");
		if(a.ah){
			document.write("<div id='"+a.e+"_year' ");
			document.write("onMouseOut='glbCalendars["+a.b+"].br();' ");
			document.write("onMouseOver='glbCalendars["+a.b+"].dk(this);' ");
			document.write("style='position:absolute;display:none;background-color:white;'> ");
			document.write(a.z());
			document.write("</div>");
		};
		if(a.ad){
			document.write("<div id='"+a.e+"_month' ");
			document.write("onMouseOut='glbCalendars["+a.b+"].bu();' ");
			document.write("onMouseOver='glbCalendars["+a.b+"].dk(this);' ");
			document.write("style='position:absolute;display:none;background-color:white;'> ");
			document.write(a.as());
			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='"+a.e+"_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='"+a.e+"_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='"+a.e+"_ghost_year'></IFRAME>\n");
		if(this.bt){
			if(confirm("The following options are not available in DateClick Standard Edition:\n"+this.bt+"\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 fj(){};
	
	function bw(dm){
		var cal,cw,bi,ap;
		dm=ex(dm);
		bi=a.bg(dm);
		du();
		if(ba)a.d=true;
		if(document.getElementById){
			cal=document.getElementById(a.e);
			if(a.d)cw=document.getElementById(a.e+"_ghost");
			}else if(document.all){
				cal=document.all[a.e];
				if(a.d)cw=document.all[a.e+"_ghost"];
			}else cal=document.layers[a.e];
			a.Div=cal;
			a.cw=cw;
			if(a.cu){
				if(a.d){a.r(cw,cal);
				cw.style.display="block";
			};
			return false;
		};
		a.co();
		clearInterval(a.u);
		for(var i=0;i<glbCalendars.length;i++){
			if(glbCalendars[i]==a)glbCalendars[i].ae=true;
			else glbCalendars[i].ae=false;
			if(!glbCalendars[i].ae){
				glbCalendars[i].aa();
			};
		};
		if(cal){
			cal.style.zIndex=++bo;
			cal.style.display="block";
			if(!a.ar){
				a.cd(cal,bi);
			};
			a.cu=true;
			a.bk=l(cal);
			if(a.d){
				cw.style.display="block";
				a.r(cw,cal);
			};
			if(window.event){
				window.event.cancelBubble=true;
				window.event.returnValue=false;
			};
		};
		return false;
	};
	
	function db(dm){
		var cal,h,rgn,cw,bi=a.bg(dm);
		if(a.be)return false;
		clearInterval(a.u);
		if(document.getElementById){
			cal=document.getElementById(a.e);
			h=document.getElementById(a.e+"_month");
			if(a.d)cw=document.getElementById(a.e+"_ghost_mo");
		}else if(document.all){
			cal=document.all[a.e];
			h=document.all[a.e+"_month"];
			if(a.d)cw=document.all[a.e+"_ghost_mo"];
		}else{
			cal=document.layers[a.e];
			h=document.layers[a.e+"_month"];
		};
		a.at();
		if(cal){
			h.style.display="block";
			h.style.zIndex=++bo;
			a.bl(cal,h);
			a.cb=l(h);
			if(a.d){
				a.r(cw,h);
				cw.style.display="block";
			};
		};
	};
	
	function dl(dm){
		var cal,k,rgn,bi=a.bg(dm);
		if(a.be)return false;
		clearInterval(a.u);
		if(document.getElementById){
			cal=document.getElementById(a.e);
			k=document.getElementById(a.e+"_year");
			if(a.d)cw=document.getElementById(a.e+"_ghost_year");
		}else if(document.all){cal=document.all[a.e];
			k=document.all[a.e+"_year"];
			if(a.d)cw=document.all[a.e+"_ghost_year"];
		}else{cal=document.layers[a.e];
			k=document.layers[a.e+"_year"];
		};
		a.am();
		if(cal){
			k.style.display="block";
			a.bq(cal,k);
			k.style.zIndex=++bo;
			a.cq=l(k);
			if(a.d){
				a.r(cw,k);
				cw.style.display="block";
			};
		};
	};
	
	function aa(){
		var cal,cw;
		if(!a.cu)return false;
		if(document.getElementById){
			cal=document.getElementById(a.e).style;
			if(a.d)cw=document.getElementById(a.e+"_ghost").style;
		}else if(document.all){
			cal=document.all[a.e].style;
			if(a.d)cw=document.all[a.e+"_ghost"].style;
		}else{
			cal=document.layers[a.e];
		};
		if(cal){
			cal.display="none";
			if(a.d)cw.display="none";
		};
		if(a.ah)a.at();
		if(a.ad)a.am();
		a.cu=false;
		clearInterval(a.u);
	};
	
	function am(){
		var h,cw;
		if(document.getElementById){
			h=document.getElementById(a.e+"_month");
			if(h)h=h.style;
			if(a.d)cw=document.getElementById(a.e+"_ghost_mo").style;
		}else if(document.all){
			h=document.all[a.e+"_month"];
			if(h)h=h.style;
			if(a.d)cw=document.all[a.e+"_ghost_mo"].style;
		}else{
			h=document.layers[a.e+"_month"];
		};
		if(h){
			h.display="none";
			a.cb={x:0,y:0,ef:0,ee:0};
			if(a.d)cw.display="none";
		};
	};
	
	function at(){
		var k,cw;
		if(document.getElementById){
			k=document.getElementById(a.e+"_year");
			if(k)k=k.style;
			if(a.d)cw=document.getElementById(a.e+"_ghost_year").style;
		}else if(document.all){
			k=document.all[a.e+"_year"];
			if(k)k=k.style;
			if(a.d)cw=document.all[a.e+"_ghost_year"].style;
		}else{
			k=document.layers[a.e+"_year"];
		};
		if(k){
			k.display="none";
			a.cq={x:0,y:0,ef:0,ee:0};
			if(a.d)cw.display="none";
		};
	};

	function fk(){};

	function dk(m){
		clearInterval(a.u);
		if(m.className==a.c+"-cl-on-month")m.className=a.c+"-cl-on-month-lit";
		else if(m.className==a.c+"-cl-off-month")m.className=a.c+"-cl-off-month-lit";
		else if(m.className==a.c+"-cl-year")m.className=a.c+"-cl-year-lit";
	};
	
	function dv(m){
		if(m.className==a.c+"-cl-on-month-lit")m.className=a.c+"-cl-on-month";
		else if(m.className==a.c+"-cl-off-month-lit")m.className=a.c+"-cl-off-month";
		else if(m.className==a.c+"-cl-year-lit")m.className=a.c+"-cl-year";
	};
	
	function da(){
		a.ao.setMonth(++a.av);
		t();
		v(a.e,j());
	};
	
	function dj(){
		a.cg+=10;
		v(a.e+"_year",z());
	};
	
	function cz(){
		a.ao.setMonth(--a.av);
		t();
		v(a.e,j());
	};
	
	function di(){
		a.cg-=10;
		v(a.e+"_year",z());
	};
	
	function selectDate(td){
		var dg=new Date(td.getAttribute(a.fr));
		if(a.bp==1&&Date.eb(dg.toLocaleString())<Date.eb(a.ck(Date()))){
			alert(a.az);
		}else if(a.bp==2&&Date.eb(dg.toLocaleString())<=Date.eb(a.ck(Date()))){
			alert(a.az);
		};
		a.ej=a.ck(dg);
		if(a.q){
			if(a.q)a.q.value=a.ck(dg);
		};
		if(a.cm){
			eval(a.cm+"(a.ck(dg))");
		};
		if(a.et)a.aa();
	};
	
	function cs(ey,ft){
		a.ao.setFullYear(ey);
		t();
		v(a.e,j());
		a.ae=true;
		a.at();
		if(window.event)event.cancelBubble=true;
		else ft.stopPropagation();
	};
	
	function cl(el,ft){
		a.ao.setMonth(el);
		t();
		v(a.e,j());
		a.ae=true;
		a.am();
		if(window.event)event.cancelBubble=true;
		else ft.stopPropagation();
	};
	
	function fa(){};
	
	function ck(ap){
		eq=['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 ac=a.cf,dw='DMYHdhmst'.split(''),fe=new Array(),ea=0,ei,eh=/\[(\d+)\]/;
		var bf=new Date(ap),day=bf.getDay(),date=bf.getDate(),month=bf.getMonth(),year=bf.getFullYear().toString(),hours=bf.getHours(),minutes=bf.getMinutes(),seconds=bf.getSeconds(),n=new Object();
		n['D']=date;
		n['d']=date+eq[date-1];
		n['DD']=(date<10)?'0'+date:date;
		n['DDD']=a.cc[day].substring(0,3);
		n['DDDD']=a.cc[day];
		n['M']=month+1;
		n['MM']=(month+1<10)?'0'+(month+1):month+1;
		n['MMM']=a.bn[month].substring(0,3);
		n['MMMM']=a.bn[month];
		n['Y']=(year.charAt(2)=='0')?year.charAt(3):year.substring(2,4);
		n['YY']=year.substring(2,4);
		n['YYYY']=year;
		for(var i=0;i<dw.length;i++){
			ei=new RegExp('('+dw[i]+'+)');
			while(ei.test(ac)){
				fe[ea]=RegExp.$1;
				ac=ac.replace(RegExp.$1,'['+ea+']');
				ea++;
			};
		}
		while(eh.test(ac)){
			ac=ac.replace(eh,n[fe[RegExp.$1]]);
		};
		return ac;
	};
	
	function co(){
		a.Div.onmousedown=a.bv;
		if(isNaN(parseInt(a.Div.style.left)))a.Div.style.left="0px";
		if(isNaN(parseInt(a.Div.style.top)))a.Div.style.top="0px";
		a.Div.onDragStart=new Function();
		a.Div.onDragEnd=new Function();
		a.Div.onDrag=new Function();
	};
	
	function bv(cj){
		cj=ex(cj);
		var y=parseInt(a.Div.style.top),x=parseInt(a.Div.style.left);
		a.am();
		a.at();
		a.Div.onDragStart(x,y);
		a.be=true;
		if(a.ax){
			a.ar=cj.clientX;
			a.bd=cj.clientY;
			a.ca=false;
		};
		document.onmousemove=a.dh;
		document.onmouseup=a.cv;
		return false;
	};
	
	function dh(cj){
		cj=ex(cj);
		var fz=cj.clientY,fy=cj.clientX,y=parseInt(a.Div.style.top),x=parseInt(a.Div.style.left),fv,fw;
		fv=x+(fy-a.ar);
		fw=y+(fz-a.bd);
		if(a.ax>0){
			if(!a.ca){
				a.Div.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=60);		";
				if(a.Div.style.cursor)a.Div.style.cursor="move";
				a.ca=true;
			};
			a.Div.style["left"]=fv+"px";
			a.Div.style["top"]=fw+"px";
			a.ar=fy;
			a.bd=fz;
			if(a.cw)a.cw.style.display="none";
		};
		a.Div.onDrag(fv,fw);
		return false;
	};
	
	function cv(){
		document.onmousemove=null;
		document.onmouseup=null;
		a.Div.onDragEnd(parseInt(a.Div.style["left"]),parseInt(a.Div.style["top"]));
		if(a.ax){
			a.Div.style.filter="";
			if(a.Div.style.cursor)a.Div.style.cursor="arrow";
			a.bk=l(a.Div);
			if(a.cw){
				a.r(a.cw,a.Div);
				a.cw.style.display="block";
			};
			if(a.ax>1){
				a.ar=0;
				a.bd=0;
			};
		};
		a.be=false;
	};
	
	function t(){
		var an,by=0,fu,lastOfMonth,fd=a.ao,i,ga=1;
		a.ff=fd.getDate();
		a.av=fd.getMonth();
		a.cx=fd.getFullYear();
		an=new Date(a.cx,a.av,1);
		by-=an.getDay()>0?an.getDay():an.getDay()+7;
		for(i=0;i<43;i++){
			a.al[i]=new Date(an.getFullYear(),an.getMonth(),++by);
		};
	};
	
	function as(){
		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='"+a.c+"-cl-year' onMouseOver='glbCalendars["+a.b+"].dk(this);' onMouseOut='glbCalendars["+a.b+"].dv(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+a.b+"].cl("+i+",event);'>";
			innerHTML+=a.aryMonths[i];
			innerHTML+="</td>";
		};
		innerHTML+="</tr>";
		innerHTML+="</table>";
		return innerHTML;
	};
	
	function z(){
		var innerHTML="";
		innerHTML+="<table cellspacing=0 cellpadding=0 border=0>";
		innerHTML+="<tr>";
		innerHTML+="<td class='"+a.c+"-cl-year' onMouseOver='glbCalendars["+a.b+"].dk(this);' onMouseOut='glbCalendars["+a.b+"].dv(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+a.b+"].dj();' align='center' valign='center'>";
		innerHTML+="<img src='"+a.s+"/up.gif' border='0' />";
		innerHTML+="</td>";
		innerHTML+="</tr>";
		for(var i=parseInt(a.cg);i>parseInt(a.cg)-10;i--){
			innerHTML+="<tr>";
			innerHTML+="<td class='"+a.c+"-cl-year' onMouseOver='glbCalendars["+a.b+"].dk(this);' onMouseOut='glbCalendars["+a.b+"].dv(this);' style='cursor: hand; cursor: pointer;' onClick='glbCalendars["+a.b+"].cs("+i+",event);'>";
			innerHTML+=i;
			innerHTML+="</td>";
			innerHTML+="</tr>";
		};
		innerHTML+="<tr>";
		innerHTML+="<td class='"+a.c+"-cl-year' onMouseOver='glbCalendars["+a.b+"].dk(this);' onMouseOut='glbCalendars["+a.b+"].dv(this);' style='cursor: hand; cursor: pointer;' onMouseDown='glbCalendars["+a.b+"].di();' align='center' valign='center'>";
		innerHTML+="<img src='"+a.s+"/down.gif' border='0' />";
		innerHTML+="</td>";
		innerHTML+="</tr>";
		innerHTML+="</table>";
		return innerHTML;
	};
	
function j(){
	var innerHTML="",w,cp,ag="none",aq="none",dq;
	innerHTML+="<table cellspacing=0 cellpadding=0 border=0 id='cal' class='"+a.c+"-cl-innertable'>";
	innerHTML+="<tr class='"+a.s+"-header-row'>";
	innerHTML+="<td align='left' class='"+a.c+"-cl-header' onMouseOver='glbCalendars["+a.b+"].dk(this);'>";
	innerHTML+="<img src='"+a.s+"/prev.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+a.b+"].cz();return false;' style='cursor:hand;cursor:pointer;' />";
	innerHTML+="</td>";
	innerHTML+="<td align='center' class='"+a.c+"-cl-header' onMouseOver='glbCalendars["+a.b+"].dk(this);'>";
	if(a.ad==2)ag="onMouseOver";
	else if(a.ad==1)ag="onClick";
	innerHTML+="<span class='"+a.c+"-cl-header' "+ag+"='return glbCalendars["+a.b+"].db(event);' "+(ag=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";
	innerHTML+=a.aryMonths[a.av];
	innerHTML+="</span>&nbsp;";
	if(a.ah==2)aq="onMouseOver";
	else if(a.ah==1)aq="onClick";
	innerHTML+="<span class='"+a.c+"-cl-header' "+aq+"='return glbCalendars["+a.b+"].dl(event);' "+(aq=="none"?"style='cursor:default;'":"style='cursor:hand;cursor:pointer;text-decoration:underline;'")+">";
	innerHTML+=a.cx;
	innerHTML+="</span>";
	innerHTML+="</td>";
	innerHTML+="<td align='right' class='"+a.c+"-cl-header' onMouseOver='glbCalendars["+a.b+"].dk(this);'>";
	innerHTML+="<img src='"+a.s+"/next.gif' border='0' onClick='window.event.returnValue=false;return false;' onMouseDown='glbCalendars["+a.b+"].da();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='"+a.c+"-cl-innertable'>";
	if(a.ez){
		innerHTML+="<tr class='"+a.c+"-cl-days'>";
		for(var x=0;x<7;x++){
			innerHTML+="<td class='"+a.c+"-cl-day' onMouseOver='glbCalendars["+a.b+"].dk(this);' onMouseOut='glbCalendars["+a.b+"].dv(this);'>";
			innerHTML+=a.aryDays[a.p+x];
			innerHTML+="</td>";
		};
		innerHTML+="</tr>";
	};
	var aj;
	for(var i=1;i<42;){
		innerHTML+="<tr>";
		for(var ga=0;ga<7;++ga,i++){
			aj=a.q?a.q.value:null;
			dq=ck(a.al[i-1+a.p]);
			cp=a.al[i-1+a.p].toGMTString();
			w=a.al[i-1+a.p].getMonth()==a.av?"cl-on-month":"cl-off-month";
			if(a.bp==1&&Date.eb(a.al[i-1+a.p])<Date.eb(a.ck(Date()))){
				w=" "+a.c+"-old";
			}else if(a.bp==2&&Date.eb(a.al[i-1+a.p])<=Date.eb(a.ck(Date()))){
				w=" "+a.c+"-old";
			}else if(new Date(a.bz=="1"?fg(aj):aj).toGMTString()==cp){
				w=" "+a.c+"-tgt";
			};
			innerHTML+="<td class='"+a.c+"-"+w+"' onMouseOver='glbCalendars["+a.b+"].dk(this);' onMouseOut='glbCalendars["+a.b+"].dv(this);' title='"+dq+"' style='cursor: hand; cursor: pointer;' "+a.fr+"='"+cp+"' onClick='glbCalendars["+a.b+"].selectDate(this);'>";
			innerHTML+=a.al[i-1+a.p].getDate();
			innerHTML+="</td>";
		};
		innerHTML+="</tr>";
	};
	innerHTML+="</table>";
	innerHTML+="</td>";
	innerHTML+="</tr>";
	innerHTML+="</table>";
	return(innerHTML);
	};

	function v(cy,fi){
		if(document.getElementById){
			document.getElementById(cy).innerHTML=fi;
		}else if(document.all){
			document.all[cy].innerHTML=fi;
		}else if(document.layers){
			with(document.layers[cy].document){open();
			write(fi);
			close();
			};
		};
		return null;
	};
	
	function bg(cj){
		var eo=0,en=0;
		if(!cj)cj=window.event;
		if(cj){
			if(cj.pageX||cj.pageY){
				eo=cj.pageX+"px";
			en=cj.pageY+"px";
			}else if(cj.clientX||cj.clientY){
				eo=cj.clientX+document.body.scrollLeft+"px";
			en=cj.clientY+document.body.scrollTop+"px";
			};
		};
		var retVal={x:eo,y:en};
		return retVal;
	};
	
	function br(){
		if(a.u){
			clearInterval(a.u);
			a.u=null;
		};
		a.u=setInterval("glbCalendars["+a.b+"].aa()",a.eu);
	};
	
	function bu(){
		if(a.bc){
			clearInterval(a.bc);
			a.bc=null;
		};
		a.bc=setInterval("glbCalendars["+a.b+"].am()",4000);
		a.br();
	};
	
	function ce(){
		if(a.bj){
			clearInterval(a.bj);
			a.bj=null;
		};
		a.bj=setInterval("glbCalendars["+a.b+"].at()",4000);
		a.br();
	};
	
	function dx(ci){
		var retVal;
		if(ci<=9){
			retVal=a.ew?"0"+ci:ci;
		}else retVal=ci;
		return retVal;
	};

	function cd(cal,aw){
		var bh=l(cal),dc=dt();
		if(bh["ef"]+aw["x"]>dc["x"])cal.style.left=aw["x"]-bh["ef"]+"px";
		else cal.style.left=aw["x"];
		if(bh["ee"]+aw["y"]>dc["y"])cal.style.top=aw["y"]-bh["ee"]+"px";
		else{
			cal.style.top=aw["y"];
		};
		if(cal.style.top<=0)cal.style.top=1;
		if(cal.style.left<=0)cal.style.left=1;
	};
	
	function r(ch,cal){
		var bh=l(cal);
		if(bh.x>0){
			ch.style.left=bh.x;
			ch.style.top=bh.y;
			ch.style.width=bh.ef;
			ch.style.height=bh.ee;
			ch.style.zIndex=0;
			ch.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
		};
	};
	
	function bl(cal,fp){
		var af=l(cal),bh=l(fp),dc=dt(),fc=af["ef"]/2,fn=bh["ef"]/2,fb=af["x"]-(fn-fc),dy=af["ee"]+af["y"];
		fp.style.left=fb+"px";
		if(dy+bh["ee"]>dc["y"])fp.style.top=dy-bh["ee"];
		else fp.style.top=dy+"px";
	};
	
	function bq(cal,yr){
		var af=l(cal),em=l(yr),dc=dt();
		if(em["ef"]+af["x"]+af["ef"]>dc["x"])yr.style.left=dc["x"]-em["ef"];
		else yr.style.left=af["x"]+af["ef"]+"px";
		if(em["ee"]+af["y"]>dc["y"])yr.style.top=af["y"];
		else yr.style.top=af["y"]+"px";
	};
	
	function setDefDate(){
		var aj;
		if(a.q){
			aj=a.q.value;
			if(a.q.value!=""){
				ap=new Date(a.bz=="1"?fg(aj):aj.replace(/\./g,"-"));
			}else ap=new Date();
			}else ap=new Date();
			if(isNaN(ap))a.ao=new Date();
			else a.ao=ap;
			t();
			v(a.e,j());
		};
		var a;
	};
	
function fs(){};

function ec(bx){
	this.ds=new Array();
	this.dz=new Array();
	this.eb=eb;
	this.g=g;
	eb(bx,this);
	
	function eb(ek,dd){
		var i,aryOptions,dp,bm;
		if(ek)aryOptions=ek.split(";");
		else return;
		var dp,strValue,df;
		for(i=0;i<aryOptions.length;i++){
			df=aryOptions[i].indexOf(":");
			if(df>0){
				dp=aryOptions[i].substring(0,df).toUpperCase();
				bm=aryOptions[i].substring(df+1,aryOptions[i].length);
				if(bm.toLowerCase()=="true")bm=true;
				else if(bm.toLowerCase()=="false")bm=false;
				dd.dz[i]=dp;
				dd.ds[i]=bm;
			};
		};
	};
	
	function g(fh){
		var i;
		for(i=0;i<this.dz.length;i++){
			if(this.dz[i]==fh){
				return this.ds[i];
			};
		};
		return null;
	};
};

function docClick(dm){
	var fm=false,ai={x:0,y:0};
	if(window.event){
		ai.x=event.clientX+document.body.scrollLeft;
		ai.y=event.clientY+document.body.scrollTop;
	}else if(dm){
		ai.x=dm.pageX;
		ai.y=dm.pageY;
	};
	for(var i=0;i<glbCalendars.length;i++){
		if(!cr(ai,glbCalendars[i].bk)&&!cr(ai,glbCalendars[i].cb)&&!cr(ai,glbCalendars[i].cq)){glbCalendars[i].aa();
		}else fm=true;
		glbCalendars[i].ae=false;
	};
};

function cr(fo,bk){
	if((fo.x>bk.x&&fo.x<bk.x+bk.ef)&&(fo.y>bk.y&&fo.y<bk.y+bk.ee));	return true; return false;
};

function l(ay){
	var ab={x:0,y:0,ef:0,ee:0};
	if(ay!=null){
		ab.ee=ay.offsetHeight;
		ab.ef=ay.offsetWidth;
		while(ay){
			ab.x+=ay.offsetLeft;
			ab.y+=ay.offsetTop;
			ay=ay.offsetParent;
		};
		return(ab);
	};
};

function dt(){
	var ab={x:0,y:0};
	if(document.body.clientWidth){
		ab.x+=document.body.clientWidth;
		ab.y+=document.body.clientHeight;
	}else if(window.innerWidth){
		ab.x+=window.innerWidth;
		ab.y+=window.innerHeight;
	};
	return(ab);
};

var o="";
if(typeof(document.media)=='string'&&document.getElementById&&document.all)o="ie6";
else if(document.getElementById&&document.all)o="ie5";
else if(document.getElementById&&!document.all)o="ns6";
else if(document.all)o="ie4";
else if(document.layers)o="ns4";
else o="other";
var bo=9999;
switch(o){
	case"ie5":
	case"ie6":if(document.attachEvent)document.attachEvent('onclick',docClick);
			break;
	case"ns6":break;
	case"ns4":break;
};

function ex(cj){
	if(typeof cj=='undefined')cj=window.event;
	if(cj){
		if(typeof cj.layerX=='undefined')cj.layerX=cj.offsetX;
		if(typeof cj.layerY=='undefined')cj.layerY=cj.offsetY;
	};
	return cj;
};

function du(){
	if(o=="ie6"&&!window.opera){
		if(!document.getElementsByTagName("select"))ba=false;
		else ba=true;
	}else ba=false;
};

function fg(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;
};
var glbCalendars=Array(),ba=Array();
