var valid=new Object();
valid.identificador=new Object();
valid.identificador.expresion=/^([a-zA-Z\_][a-zA-Z0-9_\-\.]*)*$/;
valid.identificador.error0=i18n_elIdentificador;
valid.identificador.error=i18n_identificadorNoCorrecta;
valid.identificador.normalizacion=normalizarIdentificador;
function insertAtCurrentPosition(e,c){if(document.selection){c.focus();
var d=document.selection.createRange();
d.text=e
}else{if(c.selectionStart||c.selectionStart=="0"){var b=c.selectionStart;
var a=c.selectionEnd;
c.value=c.value.substring(0,b)+e+c.value.substring(a,c.value.length);
c.selectionStart=b+1;
c.selectionEnd=b+1
}else{c.value+=e
}}}function formatearIdentificador(b){var a="";
if(b!=null&&b.length>0){a=b;
a=replaceAll(a,String.fromCharCode(224),"a");
a=replaceAll(a,String.fromCharCode(225),"a");
a=replaceAll(a,String.fromCharCode(226),"a");
a=replaceAll(a,String.fromCharCode(227),"a");
a=replaceAll(a,String.fromCharCode(228),"a");
a=replaceAll(a,String.fromCharCode(192),"A");
a=replaceAll(a,String.fromCharCode(193),"A");
a=replaceAll(a,String.fromCharCode(194),"A");
a=replaceAll(a,String.fromCharCode(195),"A");
a=replaceAll(a,String.fromCharCode(196),"A");
a=replaceAll(a,String.fromCharCode(232),"e");
a=replaceAll(a,String.fromCharCode(233),"e");
a=replaceAll(a,String.fromCharCode(234),"e");
a=replaceAll(a,String.fromCharCode(235),"e");
a=replaceAll(a,String.fromCharCode(200),"E");
a=replaceAll(a,String.fromCharCode(201),"E");
a=replaceAll(a,String.fromCharCode(202),"E");
a=replaceAll(a,String.fromCharCode(203),"E");
a=replaceAll(a,String.fromCharCode(236),"i");
a=replaceAll(a,String.fromCharCode(237),"i");
a=replaceAll(a,String.fromCharCode(238),"i");
a=replaceAll(a,String.fromCharCode(239),"i");
a=replaceAll(a,String.fromCharCode(204),"I");
a=replaceAll(a,String.fromCharCode(205),"I");
a=replaceAll(a,String.fromCharCode(206),"I");
a=replaceAll(a,String.fromCharCode(207),"I");
a=replaceAll(a,String.fromCharCode(242),"o");
a=replaceAll(a,String.fromCharCode(243),"o");
a=replaceAll(a,String.fromCharCode(244),"o");
a=replaceAll(a,String.fromCharCode(245),"o");
a=replaceAll(a,String.fromCharCode(246),"o");
a=replaceAll(a,String.fromCharCode(210),"O");
a=replaceAll(a,String.fromCharCode(211),"O");
a=replaceAll(a,String.fromCharCode(212),"O");
a=replaceAll(a,String.fromCharCode(213),"O");
a=replaceAll(a,String.fromCharCode(214),"O");
a=replaceAll(a,String.fromCharCode(249),"u");
a=replaceAll(a,String.fromCharCode(250),"u");
a=replaceAll(a,String.fromCharCode(251),"u");
a=replaceAll(a,String.fromCharCode(252),"u");
a=replaceAll(a,String.fromCharCode(217),"U");
a=replaceAll(a,String.fromCharCode(218),"U");
a=replaceAll(a,String.fromCharCode(219),"U");
a=replaceAll(a,String.fromCharCode(220),"U");
a=replaceAll(a,String.fromCharCode(241),"n");
a=replaceAll(a,String.fromCharCode(209),"N");
a=a.replace(/[ ;,:]/gi,"_");
a=a.replace(/([^a-z0-9_\-\.])/gi,"")
}return a
}function normalizarIdentificador(a){var b=formatearIdentificador(a.value);
a.value=b
}function replaceAll(a,c,b){while(a.toString().indexOf(c)!=-1){a=a.toString().replace(c,b)
}return a
}function teclasIdentificador(a){var b=filtroExpresion(a,/^[a-zA-Z0-9_\-\.]*$/);
if(b=="true"){return true
}else{b=formatearIdentificador(b);
if(b!=""){insertAtCurrentPosition(b,this)
}return false
}}valid.texto=new Object();
valid.texto.error0=i18n_elCampoTexto;
valid.texto.validacion=validarLongitud2;
valid.numero=new Object();
valid.numero.expresion=/^(\d)*$/;
valid.numero.onkeypress=teclasNumero;
valid.numero.error0=i18n_elNumero;
valid.numero.error=i18n_campoInvalido;
function teclasNumero(a){return filtrarTecla(a,"0123456789")
}valid.decimal2=new Object();
valid.decimal2.expresion=/^(\d)(\d)*((.|,)(\d)+){0,1}$/;
valid.decimal2.validacion=validarDecimal2;
valid.decimal2.onkeypress=teclasDecimales2;
valid.decimal2.error0=i18n_elNumero;
valid.decimal2.error=i18n_campoInvalido;
valid.decimal2.normalizacion=formatearDecimal;
function teclasDecimales2(c,b){var a=this.value;
return teclasDecimales(c,a,2)
}function teclasDecimales(d,b,c){var f=b.indexOf(",");
var a=b.indexOf(".");
var e=(f>a?f:a);
if((b.length>0)&&(e<0)){return filtrarTecla(d,"0123456789,.")
}else{return filtrarTecla(d,"0123456789")
}}function validarDecimal2(a,b,c){return validarDecimal(a,b,c,2)
}function validarDecimal(b,e,g,d){var c=b.value;
var h=c.indexOf(",");
var a=c.indexOf(".");
var f=(h>a?h:a);
if((f>=0)&&(f+d+1<c.length)){alert(i18n(i18n_demasiadosDecimales,2));
return false
}return true
}function formatearDecimal(a){if(a.value.indexOf(",")>=0){a.value=a.value.replace(/,/g,".")
}}valid.fecha=new Object();
valid.fecha.expresion=/^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2,4})$/;
valid.fecha.normalizacion=normalizarFecha;
valid.fecha.validacion=validarFecha;
valid.fecha.longitud=10;
valid.fecha.onkeypress=teclasFecha;
valid.fecha.error0=i18n_laFecha;
valid.fecha.error=i18n_fechaNoCorrecta;
valid.fecha.formateoSubmit=formatearFechaEv;
valid.fecha.desformateoSubmit=desformatearFechaEv;
valid.calendario=valid.fecha;
var meses=i18n_meses;
function validarFecha(a,c,d){month=c[3];
day=c[1];
year=c[4];
if(month<1||month>12){alert(i18n_mesesValidos);
return false
}if(day<1||day>31){alert(i18n_diasValidos);
return false
}if((month==4||month==6||month==9||month==11)&&day==31){alert(i18n(i18n_fechaInvalida,meses[month-1]));
return false
}if(month==2){var b=(year%4==0&&(year%100!=0||year%400==0));
if(day>29||(day==29&&!b)){alert(i18n(i18n_febreroInvalido,year,day));
return false
}}return true
}function normalizarFecha(a,b){if(a.value!=""){if(b!=null){month=b[3];
day=b[1];
year=b[4];
if(day.length==1){day="0"+day
}if(month.length==1){month="0"+month
}year=year4(year);
a.value=day+"/"+month+"/"+year
}}}function formatearFechaEv(a){a.value=formatearFecha(a.value,getAtributo(a,"submitFormat"))
}function desformatearFechaEv(a){a.value=desformatearFecha(a.value,getAtributo(a,"submitFormat"))
}function formatearFecha(b,a){if(a=="ddMMyyyy"){return b.substring(0,2)+b.substring(3,5)+b.substring(6,10)
}else{if(a=="yyyyMMdd"){return b.substring(6,10)+b.substring(3,5)+b.substring(0,2)
}else{return b
}}}function desformatearFecha(b,a){if(a=="ddMMyyyy"){if(b.length==8){return b.substring(0,2)+"/"+b.substring(2,4)+"/"+b.substring(4,8)
}}else{if(a=="yyyyMMdd"){if(b.length==8){return b.substring(6,8)+"/"+b.substring(4,6)+"/"+b.substring(0,4)
}}}return b
}function year4(b){if(b.length==1){b="0"+b
}if(b.length==2){var c=(new Date()).getYear();
var a=parseInt(c/100);
if(parseInt(c%100)<parseInt(b)-5){a--
}b=""+a+b
}if(b.length==3){b="0"+b
}return b
}function teclasFecha(a){return filtrarTecla(a,"0123456789/-")
}valid.hora=new Object();
valid.hora.expresion=/^([0-9]|1[0-9]|2[0-3]):[0-5]\d$/;
valid.hora.longitud=5;
valid.hora.onkeypress=teclasHora;
function teclasHora(a){return filtrarTecla(a,"0123456789:")
}valid.email=new Object();
valid.email.expresion=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,250}|[0-9]{1,250})(\]?)$/;
valid.email.error0=i18n(i18n_dirCorreo);
function inicializarForm(b,a){inicializarCampos(b);
a.focus()
}function inicializarCampos(d){var b=d.elements;
for(var c=0;
c<b.length;
c++){var a=b[c];
configurarCampoValidacion(a)
}}function addCampoValidacion(d,f,e,c){var a=getObj(d);
var b=valid[f];
if(!b){return
}setAtributo(a,"validacion",f);
if(e){setAtributo(a,"requerido","si")
}if((c!=null)&&(c!="")){setAtributo(a,"descripcion",c)
}configurarCampoValidacion(a);
configurarCampoCalendario(a)
}function configurarCampoValidacion(a){var c=getAtributo(a,"validacion");
var b=valid[c];
if(!b){return
}if(b.longitud){a.maxLength=b.longitud
}if(b.onkeypress){a.onkeypress=b.onkeypress
}if(b.onkeyup){a.onkeyup=b.onkeyup
}if(b.onkeydown){a.onkeydown=b.onkeydown
}if(b.normalizacion){a.onblur=normalizarCampoEv;
if(a.value){if(b.desformateoSubmit){b.desformateoSubmit(a)
}normalizarCampo(a)
}}}function configurarCampoCalendario(a){var c=getAtributo(a,"validacion");
if(c=="calendario"){var b=a.className;
a.className=b+" datechooser dc-dateformat='j/n/Y' dc-iconlink='"+root_i18n+"/img/iconos_campos/datechooser.png' "
}}function validarLongitud2(a,b,c){return validarLongitud(a)
}function validarLongitud(a){var b=getAtributo(a,"maxLongitud");
if(b==null){return true
}var c=/\n/g;
if(a.value.replace(c,"\n\r").length>b){alert(i18n(i18n_campoLargo,b));
return false
}else{return true
}}function keypressLongitud(b){var a=getAtributo(this,"maxLongitud");
if(this.value.length>=a){this.value=this.value.substring(0,a);
return filtrarTecla(b,"")
}else{return true
}}function eventCheckLongitud(b){var a=getAtributo(this,"maxLongitud");
if(this.value.length>a){this.value=this.value.substring(0,a)
}}function addLongitudTextArea(c,b){var a=getObj(c);
setAtributo(a,"maxLongitud",b);
a.onkeypress=keypressLongitud;
a.onkeydown=eventCheckLongitud;
a.ondrop=eventCheckLongitud;
a.onpaste=eventCheckLongitud;
a.onblur=eventCheckLongitud
}function getAtributo(a,b){if(a.getAttribute(b)){return a.getAttribute(b)
}else{return null
}}function setAtributo(a,c,b){if(a.setAttribute){a.setAttribute(c,b)
}}function validarCampos(e){var f=e.elements;
for(var d=0;
d<f.length;
d++){var n=f[d];
var l=valid[getAtributo(n,"validacion")];
if(!l){continue
}var m;
if(getAtributo(n,"descripcion")){m=getAtributo(n,"descripcion")
}else{m=i18n(i18n_elCampo,n.name)
}var j;
if(l.error){if(!getAtributo(n,"descripcion")&&l.error0){j=i18n(l.error,l.error0)
}else{j=i18n(l.error,m)
}}else{j=i18n(i18n_campoInvalido,m)
}var k=true;
var b=getAtributo(n,"requerido");
if(b){b=(b.toLowerCase()!="no")
}var g=isEmpty(n.value);
if(g&&b){k=false;
alert(i18n(i18n_rellenar,minuscPrimera(m)))
}else{if(g){n.value=""
}else{var a=l.expresion;
var c=null;
if(a){c=n.value.match(a);
k=(c!=null)
}if(!k){alert(j)
}if(k&&l.validacion){k=l.validacion(n,c,m)
}}}var h=getAtributo(n,"maxLongitud");
if(k&&h){k=validarLongitud(n)
}if(!k){if(f[d].select){f[d].select()
}f[d].focus();
return false
}else{if(l.normalizacion){l.normalizacion(n,c)
}}if(k&&l.formateoSubmit){l.formateoSubmit(n)
}}return true
}function normalizarCampo(a){var b=valid[getAtributo(a,"validacion")];
if(!b||!b.normalizacion){return
}var d=b.expresion;
var c=null;
if(d){c=a.value.match(d)
}if(b.normalizacion){b.normalizacion(a,c)
}}function normalizarCampoEv(){var a=this;
normalizarCampo(a)
}function filtrarTecla(b,c){var a,d;
if(window.event){a=window.event.keyCode
}else{if(b){a=b.which
}else{return true
}}d=String.fromCharCode(a);
if((a==null)||(a==0)||(a==8)||(a==9)||(a==13)||(a==27)){return true
}else{if(((c).indexOf(d)>-1)){return true
}else{return false
}}}function filtroExpresion(b,d){var a,c;
if(window.event){a=window.event.keyCode
}else{if(b){a=b.which
}else{return"true"
}}c=String.fromCharCode(a);
if((a==null)||(a==0)||(a==8)||(a==9)||(a==13)||(a==27)){return"true"
}else{if(d.test(c)){return"true"
}else{return c
}}}function minuscPrimera(a){if((a==null)||(a.length<2)){return a
}else{return a.substring(0,1).toLowerCase()+a.substring(1)
}}function isEmpty(a){if(a==null){return true
}else{return(strip(" \n\r\t",a).length==0)
}}function i(a){if(a==null){return true
}else{return(strip(" \n\r\t",a).length==0)
}}function strip(d,f){var c,b;
var e="";
var a=f.length;
for(var c=0;
c<a;
c++){b=f.charAt(c);
if(d.indexOf(b)<0){e+=b
}}return e
}if(typeof(objPHPDate)=="undefined"){var objPHPDate={aDay:i18n_dias,aShortDay:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],aLetterDay:i18n_dias_letra,aMonth:i18n_meses,aShortMonth:i18n_meses_corto,aSuffix:["th","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"],sTimezoneOffset:"",GetTimezoneOffset:function(){var c=new Date();
c.setHours(0);
c.setMinutes(0);
c.setSeconds(0);
c.setMilliseconds(0);
var b=new Date();
b.setFullYear(c.getUTCFullYear());
b.setMonth(c.getUTCMonth());
b.setDate(c.getUTCDate());
b.setHours(c.getUTCHours());
b.setMinutes(c.getUTCMinutes());
b.setSeconds(c.getUTCSeconds());
b.setMilliseconds(c.getUTCMilliseconds());
this.sTimezoneOffset=((c.getTime()-b.getTime())/(1000*3600));
var a=(this.sTimezoneOffset<0);
c=null;
b=null;
this.sTimezoneOffset=a?(this.sTimezoneOffset+"").substring(1):this.sTimezoneOffset+"";
this.sTimezoneOffset=this.sTimezoneOffset.replace(/\.5/,(parseInt("$1",10)*60)+"");
this.sTimezoneOffset+=(this.sTimezoneOffset.substring(this.sTimezoneOffset.length-3)!=":30")?":00":"";
this.sTimezoneOffset=(this.sTimezoneOffset.substr(0,this.sTimezoneOffset.indexOf(":")).length==1)?"0"+this.sTimezoneOffset:this.sTimezoneOffset;
this.sTimezoneOffset=a?"-"+this.sTimezoneOffset:"+"+this.sTimezoneOffset;
return true
},PHPDate:function(){var r=(arguments.length>0)?arguments[0]:"";
var m=this.getFullYear();
var p=m+"";
var o=this.getMonth();
var e=(o+1)+"";
var g=(e.length==1)?"0"+e:e;
var t=this.getDate();
var b=t+"";
var k=(b.length==1)?"0"+b:b;
var h=this.getDay();
var c=h+"";
var j=this.getHours();
var f=(j%12)+"";
if(f=="0"){f="12"
}var d=(f.length==1)?"0"+f:f;
var n=j+"";
var l=(n.length==1)?"0"+n:n;
var q=this.getMinutes()+"";
if(q.length==1){q="0"+q
}var s=this.getMinutes()+"";
if(s.length==1){s="0"+s
}var a=(this.getHours()<12)?"am":"pm";
r=r.replace(/([AacDdFGgHhijLlMmNnrSsUwYy])/g,"y5-cal-regexp:$1");
r=r.replace(/y5-cal-regexp:A/,a.toUpperCase());
r=r.replace(/y5-cal-regexp:a/,a);
r=r.replace(/y5-cal-regexp:c/,p+"-"+g+"-"+k+"T00:00:00"+objPHPDate.sTimezoneOffset);
r=r.replace(/y5-cal-regexp:D/,objPHPDate.aShortDay[h]);
r=r.replace(/y5-cal-regexp:d/,k);
r=r.replace(/y5-cal-regexp:F/,objPHPDate.aMonth[o]);
r=r.replace(/y5-cal-regexp:G/,n);
r=r.replace(/y5-cal-regexp:g/,f);
r=r.replace(/y5-cal-regexp:H/,l);
r=r.replace(/y5-cal-regexp:h/,d);
r=r.replace(/y5-cal-regexp:i/,q);
r=r.replace(/y5-cal-regexp:j/,t);
r=r.replace(/y5-cal-regexp:L/,objPHPDate.aLetterDay[h]);
r=r.replace(/y5-cal-regexp:l/,objPHPDate.aDay[h]);
r=r.replace(/y5-cal-regexp:M/,objPHPDate.aShortMonth[o]);
r=r.replace(/y5-cal-regexp:m/,g);
r=r.replace(/y5-cal-regexp:N/,(h==0)?7:h);
r=r.replace(/y5-cal-regexp:n/,e);
r=r.replace(/y5-cal-regexp:r/,objPHPDate.aShortDay[h]+", "+k+" "+objPHPDate.aShortMonth[o]+" "+p+" 00:00:00 "+objPHPDate.sTimezoneOffset.replace(/:/,""));
r=r.replace(/y5-cal-regexp:S/,objPHPDate.aSuffix[t]);
r=r.replace(/y5-cal-regexp:s/,s);
r=r.replace(/y5-cal-regexp:U/,parseInt((this.getTime()/1000),10));
r=r.replace(/y5-cal-regexp:w/,h);
r=r.replace(/y5-cal-regexp:Y/,p);
r=r.replace(/y5-cal-regexp:y/,p.substring(2));
return r
}};
objPHPDate.GetTimezoneOffset();
Date.prototype.getPHPDate=objPHPDate.PHPDate
}function validarCampo(a){var c=valid[getAtributo(a,"validacion")];
var d=null;
if(c){var f=c.expresion;
var e=null;
var b;
if(getAtributo(a,"descripcion")){b=getAtributo(a,"descripcion")
}else{b=i18n(i18n_elCampo,a.name)
}if(f){e=a.value.match(f);
d=(e!=null)
}if(!d){alert(i18n(c.error,b))
}if(d&&c.validacion){d=c.validacion(a,e,b)
}}return d
}function DateChooser(){var nWeekStartDay=1;
var nXOffset=0;
var nYOffset=0;
var nTimeout=0;
var objAllowedDays={"0":true,"1":true,"2":true,"3":true,"4":true,"5":true,"6":true};
var fnUpdate=null;
var sDefaultIcon=false;
var objUpdateFields={};
var objEarliestDate=null;
var objLatestDate=null;
if(!arguments||!document.getElementById||!document.getElementsByTagName){return null
}var ndBodyElement=document.getElementsByTagName("body").length?document.getElementsByTagName("body")[0]:document;
var objTimeout=null;
var ndFrame=null;
/*@cc_on@*/
/*@if(@_jscript_version < 6)
		if (document.getElementById('iframehack'))
		{
			ndFrame = document.getElementById('iframehack');
		}
		else
		{
			ndFrame = xb.createElement('iframe');
			ndFrame.id = 'iframehack';
			ndFrame.src = 'javascript:null;';
			ndFrame.scrolling = 'no';
			ndFrame.frameBorder = 0;
			ndFrame.style.border = '0';
			ndFrame.style.padding = 0;
			ndFrame.style.display = 'none';
			ndFrame.style.position = 'absolute';
			ndFrame.style.zIndex = '5000';

			ndBodyElement.appendChild(ndFrame);
		}
	/*@end@*/
var nDateChooserID=0;
while(document.getElementById("calendar"+nDateChooserID)){++nDateChooserID
}var sDateChooserID="calendar"+nDateChooserID;
var objSelectedDate=null;
var objStartDate=new Date();
objStartDate.setHours(0);
objStartDate.setMinutes(0);
objStartDate.setSeconds(0);
objStartDate.setMilliseconds(0);
var objMonthYear=new Date(objStartDate);
objMonthYear.setDate(1);
var ndDateChooser=xb.createElement("div");
ndDateChooser.id=sDateChooserID;
ndDateChooser.className="calendar";
ndDateChooser.style.visibility="hidden";
ndDateChooser.style.position="absolute";
ndDateChooser.style.zIndex="5001";
ndDateChooser.style.top="0";
ndDateChooser.style.left="0";
ndBodyElement.appendChild(ndDateChooser);
var AddClickEvents=function(){var aNavLinks=ndDateChooser.getElementsByTagName("thead")[0].getElementsByTagName("a");
for(var nNavLink=0;
nNavLink<aNavLinks.length;
++nNavLink){events.add(aNavLinks[nNavLink],"click",function(e){e=e||window.event;
var ndClicked=e.target||e.srcElement;
if(ndClicked.nodeName=="#text"){ndClicked=ndClicked.parentNode
}var sClass=ndClicked.className;
if(sClass=="previousyear"){objMonthYear.setFullYear(objMonthYear.getFullYear()-1);
if(objEarliestDate&&objEarliestDate.getTime()>objMonthYear.getTime()){objMonthYear.setFullYear(objEarliestDate.getFullYear());
objMonthYear.setMonth(objEarliestDate.getMonth())
}}else{if(sClass=="previousmonth"){objMonthYear.setMonth(objMonthYear.getMonth()-1);
if(objEarliestDate&&objEarliestDate.getTime()>objMonthYear.getTime()){objMonthYear.setFullYear(objEarliestDate.getFullYear());
objMonthYear.setMonth(objEarliestDate.getMonth())
}}else{if(sClass=="currentdate"){objMonthYear.setFullYear(objStartDate.getFullYear());
objMonthYear.setMonth(objStartDate.getMonth())
}else{if(sClass=="nextmonth"){objMonthYear.setMonth(objMonthYear.getMonth()+1);
if(objLatestDate&&objLatestDate.getTime()<objMonthYear.getTime()){objMonthYear.setFullYear(objLatestDate.getFullYear());
objMonthYear.setMonth(objLatestDate.getMonth())
}}else{if(sClass=="nextyear"){objMonthYear.setFullYear(objMonthYear.getFullYear()+1);
if(objLatestDate&&objLatestDate.getTime()<objMonthYear.getTime()){objMonthYear.setFullYear(objLatestDate.getFullYear());
objMonthYear.setMonth(objLatestDate.getMonth())
}}}}}}RefreshDisplay();
return false
})
}var aDateLinks=ndDateChooser.getElementsByTagName("tbody")[0].getElementsByTagName("a");
for(var nDateLink=0;
nDateLink<aDateLinks.length;
++nDateLink){events.add(aDateLinks[nDateLink],"click",function(e){e=e||window.event;
var ndClicked=e.target||e.srcElement;
if(ndClicked.nodeName=="#text"){ndClicked=ndClicked.parentNode
}for(var nLink=0;
nLink<aDateLinks.length;
++nLink){if(aDateLinks[nLink].className=="selecteddate"){aDateLinks[nLink].removeAttribute("class")
}}var objTempDate=new Date(objMonthYear);
objTempDate.setDate(parseInt(ndClicked.childNodes[0].nodeValue,10));
var nTime=objTempDate.getTime();
var sWeekday=objTempDate.getPHPDate("w");
objTempDate=null;
if(objEarliestDate&&objEarliestDate.getTime()>nTime){return false
}if(objLatestDate&&objLatestDate.getTime()<nTime){return false
}if(!objAllowedDays[sWeekday]){return false
}objMonthYear.setTime(nTime);
objMonthYear.setDate(1);
if(!objSelectedDate){objSelectedDate=new Date(nTime)
}objSelectedDate.setTime(nTime);
ndClicked.className="selecteddate";
if(ndFrame){ndFrame.style.display="none"
}ndDateChooser.style.visibility="hidden";
if(objTimeout){clearTimeout(objTimeout)
}UpdateFields();
if(fnUpdate){fnUpdate(objSelectedDate)
}return false
})
}return true
};
var UpdateFields=function(){if(!objSelectedDate){return true
}for(var sFieldName in objUpdateFields){var ndField=document.getElementById(sFieldName);
if(ndField){ndField.value=objSelectedDate.getPHPDate(objUpdateFields[sFieldName])
}}return true
};
var RefreshDisplay=function(){var ndTable,ndTHead,ndTR,ndTH,ndA,ndTBody,ndTD,nTime,sWeekday;
var sClass="";
var objTempDate=new Date(objMonthYear);
var objToday=new Date();
objToday.setHours(0);
objToday.setMinutes(0);
objToday.setSeconds(0);
objToday.setMilliseconds(0);
ndTable=xb.createElement("table");
ndTable.setAttribute("summary","DateChooser");
ndTHead=xb.createElement("thead");
ndTable.appendChild(ndTHead);
ndTR=xb.createElement("tr");
ndTHead.appendChild(ndTR);
ndTH=xb.createElement("th");
ndTR.appendChild(ndTH);
ndA=xb.createElement("a");
ndA.className="previousyear";
ndA.setAttribute("href","#");
ndA.setAttribute("title","Previous Year");
ndTH.appendChild(ndA);
ndA.appendChild(document.createTextNode(String.fromCharCode(171)));
ndTH=xb.createElement("th");
ndTR.appendChild(ndTH);
ndA=xb.createElement("a");
ndA.className="previousmonth";
ndA.setAttribute("href","#");
ndA.setAttribute("title","Previous Month");
ndTH.appendChild(ndA);
ndA.appendChild(document.createTextNode(String.fromCharCode(60)));
ndTH=xb.createElement("th");
ndTH.setAttribute("colspan","3");
/*@cc_on@*/
/*@if(@_jscript_version < 6)
			ndTH.colSpan = '3';
		/*@end@*/
ndTR.appendChild(ndTH);
ndA=xb.createElement("a");
ndA.className="currentdate";
ndA.setAttribute("href","#");
ndA.setAttribute("title","Current Date");
ndTH.appendChild(ndA);
ndA.appendChild(document.createTextNode(objMonthYear.getPHPDate("M Y")));
ndTH=xb.createElement("th");
ndTR.appendChild(ndTH);
ndA=xb.createElement("a");
ndA.className="nextmonth";
ndA.setAttribute("href","#");
ndA.setAttribute("title","Next Month");
ndTH.appendChild(ndA);
ndA.appendChild(document.createTextNode(String.fromCharCode(62)));
ndTH=xb.createElement("th");
ndTR.appendChild(ndTH);
ndA=xb.createElement("a");
ndA.className="nextyear";
ndA.setAttribute("href","#");
ndA.setAttribute("title","Next Year");
ndTH.appendChild(ndA);
ndA.appendChild(document.createTextNode(String.fromCharCode(187)));
ndTR=xb.createElement("tr");
ndTHead.appendChild(ndTR);
for(var nDay=0;
nDay<objPHPDate.aLetterDay.length;
++nDay){ndTD=xb.createElement("td");
ndTR.appendChild(ndTD);
ndTD.appendChild(document.createTextNode(objPHPDate.aLetterDay[(nWeekStartDay+nDay)%objPHPDate.aLetterDay.length]))
}ndTBody=xb.createElement("tbody");
ndTable.appendChild(ndTBody);
while(objTempDate.getMonth()==objMonthYear.getMonth()){ndTR=xb.createElement("tr");
ndTBody.appendChild(ndTR);
for(nDay=0;
nDay<7;
++nDay){var nWeek=(nWeekStartDay+nDay)%objPHPDate.aLetterDay.length;
if((objTempDate.getDay()==nWeek)&&(objTempDate.getMonth()==objMonthYear.getMonth())){nTime=objTempDate.getTime();
sWeekday=objTempDate.getPHPDate("w");
sClass=(objSelectedDate&&(objTempDate.getTime()==objSelectedDate.getTime()))?"selectedday":"";
sClass+=(objTempDate.getTime()==objToday.getTime())?" today":"";
sClass=((sClass.length>0)&&(sClass[1]==" "))?sClass.substr(1,sClass.length-1):sClass;
ndTD=xb.createElement("td");
if((objEarliestDate&&objEarliestDate.getTime()>nTime)||(objLatestDate&&objLatestDate.getTime()<nTime)||!objAllowedDays[sWeekday]){ndTD.className="invalidday"
}ndTR.appendChild(ndTD);
ndA=xb.createElement("a");
if(sClass.length>0){ndA.className=sClass
}ndA.setAttribute("href","#");
ndTD.appendChild(ndA);
ndA.appendChild(document.createTextNode(objTempDate.getDate()));
objTempDate.setDate(objTempDate.getDate()+1)
}else{ndTD=xb.createElement("td");
ndTR.appendChild(ndTD)
}}}while(ndDateChooser.hasChildNodes()){ndDateChooser.removeChild(ndDateChooser.firstChild)
}ndDateChooser.appendChild(ndTable);
if(ndFrame){ndFrame.style.display="block";
ndFrame.style.top=ndDateChooser.style.top;
ndFrame.style.left=ndDateChooser.style.left;
ndFrame.style.width=(ndTable.clientWidth+2)+"px";
ndFrame.style.height=(ndTable.clientHeight+4)+"px"
}objTempDate=null;
objToday=null;
AddClickEvents();
return true
};
var DisplayDateChooser=function(){var sPositionX=(arguments.length>0)?arguments[0]:"auto";
var sPositionY=(arguments.length>1)?arguments[1]:"auto";
var ndStyle=ndDateChooser.style;
ndStyle.top=sPositionY+"";
ndStyle.left=sPositionX+"";
ndDateChooser.style.visibility="visible";
if(objTimeout){clearTimeout(objTimeout)
}var ndField;
for(var sFieldName in objUpdateFields){ndField=document.getElementById(sFieldName)
}if(ndField.value){var ok=validarCampo(ndField);
if(ok==true){var fecha=new Date();
var fechaDividida=ndField.value.split("/");
var fechaFormateada=fechaDividida[1]+"/"+fechaDividida[0]+"/"+fechaDividida[2];
fecha.setTime(Date.parse(fechaFormateada));
objSelectedDate=fecha
}else{objSelectedDate=null
}}else{objSelectedDate=null
}if(objSelectedDate){objMonthYear.setTime(objSelectedDate.getTime())
}else{objMonthYear.setTime(objStartDate.getTime())
}objMonthYear.setHours(0);
objMonthYear.setMinutes(0);
objMonthYear.setSeconds(0);
objMonthYear.setMilliseconds(0);
objMonthYear.setDate(1);
return RefreshDisplay()
};
var GetPosition=function(ndNode){var nTop=0,nLeft=0;
if(ndNode.offsetParent){nTop=ndNode.offsetTop;
nLeft=ndNode.offsetLeft;
while(ndNode.offsetParent){ndNode=ndNode.offsetParent;
nTop+=ndNode.offsetTop;
nLeft+=ndNode.offsetLeft
}}return({top:nTop,left:nLeft})
};
this.displayPosition=function(){var sPositionX=(arguments.length>0)?arguments[0]:"auto";
var sPositionY=(arguments.length>1)?arguments[1]:"auto";
return DisplayDateChooser(sPositionX,sPositionY)
};
this.display=function(e){e=e||window.event;
var ndClicked=e.target||e.srcElement;
if(ndClicked.nodeName=="#text"){ndClicked=ndClicked.parentNode
}var objPosition=GetPosition(ndClicked);
DisplayDateChooser(objPosition.left+nXOffset+"px",objPosition.top+nYOffset+"px");
return false
};
this.setXOffset=function(){nXOffset=((arguments.length>0)&&(typeof(arguments[0])=="number"))?parseInt(arguments[0],10):nXOffset;
return true
};
this.setYOffset=function(){nYOffset=((arguments.length>0)&&(typeof(arguments[0])=="number"))?parseInt(arguments[0],10):nYOffset;
return true
};
this.setCloseTime=function(){nTimeout=((arguments.length>0)&&(typeof(arguments[0])=="number")&&(arguments[0]>=0))?arguments[0]:nTimeout;
return true
};
this.setUpdateFunction=function(){if((arguments.length>0)&&(typeof(arguments[0])=="function")){fnUpdate=arguments[0]
}return true
};
this.setUpdateField=function(){objUpdateFields={};
if((typeof(arguments[0])=="string")&&(typeof(arguments[1])=="string")&&document.getElementById(arguments[0])){objUpdateFields[arguments[0]]=arguments[1]
}else{if((typeof(arguments[0])=="object")&&(typeof(arguments[1])=="object")){for(var nField=0;
nField<arguments[0].length;
++nField){if(nField>=arguments[1].length){break
}objUpdateFields[arguments[0][nField]]=arguments[1][nField]
}}else{if(typeof(arguments[0])=="object"){objUpdateFields=arguments[0]
}}}return true
};
this.setLink=function(){var sLinkText=((arguments.length>0)&&(typeof(arguments[0])=="string"))?arguments[0]:"Choose a date";
var ndNode=((arguments.length>1)&&(typeof(arguments[1])=="string"))?document.getElementById(arguments[1]):null;
var bPlaceRight=((arguments.length<=2)||arguments[2]);
var sTitleText=((arguments.length>3)&&(typeof(arguments[3])=="string"))?arguments[3]:"Pinche para seleccionar una fecha";
if(!ndNode){return false
}var ndAnchor=xb.createElement("a");
ndAnchor.className="calendarlink";
ndAnchor.href="#";
if(sTitleText.length>0){ndAnchor.setAttribute("title",sTitleText)
}ndAnchor.appendChild(document.createTextNode(sLinkText));
if(bPlaceRight){if(ndNode.nextSibling){ndNode.parentNode.insertBefore(ndAnchor,ndNode.nextSibling)
}else{ndNode.parentNode.appendChild(ndAnchor)
}}else{ndNode.parentNode.insertBefore(ndAnchor,ndNode)
}events.add(ndAnchor,"click",this.display);
return true
};
this.setIcon=function(){var sIconFile=((arguments.length>0)&&(typeof(arguments[0])=="string"))?arguments[0]:sDefaultIcon;
var ndNode=((arguments.length>1)&&(typeof(arguments[1])=="string"))?document.getElementById(arguments[1]):null;
var bPlaceRight=((arguments.length<=2)||arguments[2]);
var sTitleText=((arguments.length>3)&&(typeof(arguments[3])=="string"))?arguments[3]:"Pinche para seleccionar una fecha";
if(!ndNode||!sIconFile){return false
}var ndIcon=xb.createElement("img");
ndIcon.className="calendaricon";
ndIcon.src=sIconFile;
ndIcon.setAttribute("alt","DateChooser Icon "+(nDateChooserID+1));
if(sTitleText.length>0){ndIcon.setAttribute("title",sTitleText)
}if(bPlaceRight){if(ndNode.nextSibling){ndNode.parentNode.insertBefore(ndIcon,ndNode.nextSibling)
}else{ndNode.parentNode.appendChild(ndIcon)
}}else{ndNode.parentNode.insertBefore(ndIcon,ndNode)
}events.add(ndIcon,"click",this.display);
return true
};
this.setStartDate=function(){if(!arguments.length||!(typeof(arguments[0])=="object")||!arguments[0].getTime){return false
}objStartDate.setTime(arguments[0].getTime());
objStartDate.setHours(0);
objStartDate.setMinutes(0);
objStartDate.setSeconds(0);
objStartDate.setMilliseconds(0);
if(objEarliestDate&&objEarliestDate.getTime()>objStartDate.getTime()){objStartDate.setTime(objEarliestDate.getTime())
}else{if(objLatestDate&&objLatestDate.getTime()<objStartDate.getTime()){objStartDate.setTime(objLatestDate.getTime())
}}objMonthYear.setMonth(objStartDate.getMonth());
objMonthYear.setFullYear(objStartDate.getFullYear());
if(!objSelectedDate){objSelectedDate=new Date(objStartDate)
}objSelectedDate.setTime(objStartDate);
return true
};
this.setEarliestDate=function(){if(!arguments.length||(typeof(arguments[0])!="object")||!arguments[0].getTime){return false
}objEarliestDate=new Date();
objEarliestDate.setTime(arguments[0].getTime());
objEarliestDate.setHours(0);
objEarliestDate.setMinutes(0);
objEarliestDate.setSeconds(0);
objEarliestDate.setMilliseconds(0);
if(objEarliestDate.getTime()>objStartDate.getTime()){objStartDate.setTime(objEarliestDate.getTime());
objMonthYear.setMonth(objEarliestDate.getMonth());
objMonthYear.setFullYear(objEarliestDate.getFullYear())
}if(objSelectedDate&&(objEarliestDate.getTime()>objSelectedDate.getTime())){objSelectedDate.setTime(objEarliestDate.getTime());
objMonthYear.setMonth(objEarliestDate.getMonth());
objMonthYear.setFullYear(objEarliestDate.getFullYear())
}return true
};
this.setLatestDate=function(){if(!arguments.length||!(typeof(arguments[0])=="object")||!arguments[0].getTime){return false
}objLatestDate=new Date();
objLatestDate.setTime(arguments[0].getTime());
objLatestDate.setHours(0);
objLatestDate.setMinutes(0);
objLatestDate.setSeconds(0);
objLatestDate.setMilliseconds(0);
if(objLatestDate.getTime()<objStartDate.getTime()){objStartDate.setTime(objLatestDate.getTime());
objMonthYear.setMonth(objLatestDate.getMonth());
objMonthYear.setFullYear(objLatestDate.getFullYear())
}if(objSelectedDate&&(objLatestDate.getTime()<objSelectedDate.getTime())){objSelectedDate.setTime(objLatestDate.getTime());
objMonthYear.setMonth(objLatestDate.getMonth());
objMonthYear.setFullYear(objLatestDate.getFullYear())
}return true
};
this.setAllowedDays=function(){if(!arguments.length||!(typeof(arguments[0])=="object")){return false
}var nCount;
for(nCount=0;
nCount<7;
++nCount){objAllowedDays[nCount+""]=false
}for(nCount=0;
nCount<arguments[0].length;
++nCount){objAllowedDays[arguments[0][nCount]+""]=true
}return true
};
this.setWeekStartDay=function(){if(!arguments.length||!(typeof(arguments[0])=="number")){return false
}var nNewStartDay=parseInt(arguments[0],10);
if((nNewStartDay<0)||(nNewStartDay>6)){return false
}nWeekStartDay=nNewStartDay;
return true
};
this.getSelectedDate=function(){return objSelectedDate
};
this.setSelectedDate=function(objDate){objSelectedDate.setTime(objDate.getTime());
UpdateFields();
return true
};
this.updateFields=function(){return UpdateFields()
};
var clickWindow=function(e){e=e||window.event;
var ndTarget=e.target||e.srcElement;
if(ndTarget.nodeName=="#text"){ndTarget=ndTarget.parentNode
}while(ndTarget&&(ndTarget!=document)){if(ndTarget.className=="calendar"){return true
}ndTarget=ndTarget.parentNode
}for(var nCount=0;
nCount<=nDateChooserID;
++nCount){if(ndFrame){ndFrame.style.display="none"
}document.getElementById("calendar"+nCount).style.visibility="hidden"
}return true
};
var mouseoverDateChooser=function(){if(objTimeout){clearTimeout(objTimeout)
}return true
};
var mouseoutDateChooser=function(){if(nTimeout>0){objTimeout=setTimeout('document.getElementById("'+sDateChooserID+'").style.visibility = "hidden"; if (document.getElementById("iframehack")) document.getElementById("iframehack").style.display = "none";',nTimeout)
}return true
};
events.add(ndDateChooser,"mouseover",mouseoverDateChooser);
events.add(ndDateChooser,"mouseout",mouseoutDateChooser);
events.add(document,"mousedown",clickWindow);
return true
}if(typeof(Array.prototype.push)=="undefined"){Array.prototype.push=function(){for(var a=0;
a<arguments.length;
a++){this[this.length]=arguments[a]
}return this.length
}
}if(typeof(xb)=="undefined"){var xb={createElement:function(a){if(typeof(document.createElement)!="undefined"){return document.createElement(a)
}if(typeof(document.createElementNS)!="undefined"){return document.createElementNS("http://www.w3.org/1999/xhtml",a)
}return null
},getElementsByAttribute:function(b,e,c){var h=[];
if(!b.all&&!b.getElementsByTagName){return h
}var d=RegExp("(^|\\s)"+c+"(\\s|$)");
var g,f=b.all||b.getElementsByTagName("*");
for(var a=0;
a<f.length;
++a){if(!f[a].getAttribute){continue
}g=(e=="class")?f[a].className:f[a].getAttribute(e);
if((typeof(g)!="string")||(g.length==0)){continue
}if(d.test(g)){h.push(f[a])
}}return h
}}
}if(typeof(events)=="undefined"){var events={nEventID:1,add:function(c,d,a){if(!a.$$nEventID){a.$$nEventID=this.nEventID++
}if(typeof(c.objEvents)=="undefined"){c.objEvents={}
}var b=c.objEvents[d];
if(!b){b=c.objEvents[d]={};
if(c["on"+d]){b[0]=c["on"+d]
}}b[a.$$nEventID]=a;
c["on"+d]=this.handle;
return true
},remove:function(b,c,a){if(b.objEvents&&b.objEvents[c]){delete b.objEvents[c][a.$$nEventID]
}return true
},exists:function(b,c,a){return(b.objEvents&&b.objEvents[c]&&b.objEvents[c][a.$$nEventID])
},handle:function(d){d=d||events.fix(event);
var c=true,b=this.objEvents[d.type];
for(var a in b){this.$$handle=b[a];
if(this.$$handle(d)===false){c=false
}}return c
},fix:function(a){a.preventDefault=this.fix.preventDefault;
a.stopPropagation=this.fix.stopPropagation;
return a
},cancel:function(a){a.preventDefault();
a.stopPropagation();
return false
}};
events.fix.preventDefault=function(){this.returnValue=false;
return true
};
events.fix.stopPropagation=function(){this.cancelBubble=true;
return true
}
}addFuncionOnLoad(function(){var ndDateChooser,ndElement,sClass,aMatch,sLastID,sLinkID,sLinkPosition,objUpdateField,objDate,aDateFormatNodes;
var sDateFormat,sIcon,sText,sXOffset,sYOffset,sCloseTime,sOnUpdate,sStartDate,sEarliestDate,sLatestDate,sAllowedDays,sWeekStartDay;
var aDateChoosers=[];
var nFieldID=0;
objDate=new Date();
objDate.setHours(0);
objDate.setMinutes(0);
objDate.setMilliseconds(0);
var aElements=xb.getElementsByAttribute(document,"class","datechooser");
for(var nIndex=0;
nIndex<aElements.length;
++nIndex){ndDateChooser=aElements[nIndex];
sClass=ndDateChooser.className;
if(!ndDateChooser.id){ndDateChooser.id="dc-id-"+(++nFieldID)
}sLastID=ndDateChooser.id;
sDateFormat=ndDateChooser.getAttribute("dc-dateformat");
if(!sDateFormat){aMatch=sClass.match(/(?:^|\s)dc-dateformat=\'([^\']+)(?:\'|$)/);
sDateFormat=aMatch?aMatch[1]:false
}sIcon=ndDateChooser.getAttribute("dc-iconlink");
if(!sIcon){aMatch=sClass.match(/(?:^|\s)dc-iconlink=\'([^\']+)(?:\'|$)/);
sIcon=aMatch?aMatch[1]:false
}sText=ndDateChooser.getAttribute("dc-textlink");
if(!sText){aMatch=sClass.match(/(?:^|\s)dc-textlink=\'([^\']+)(?:\'|$)/);
sText=aMatch?aMatch[1]:false
}sXOffset=ndDateChooser.getAttribute("dc-offset-x");
if(!sXOffset){aMatch=sClass.match(/(?:^|\s)dc-offset-x=\'([^\']+)(?:\'|$)/);
sXOffset=aMatch?aMatch[1]:false
}sYOffset=ndDateChooser.getAttribute("dc-offset-y");
if(!sYOffset){aMatch=sClass.match(/(?:^|\s)dc-offset-y=\'([^\']+)(?:\'|$)/);
sYOffset=aMatch?aMatch[1]:false
}sCloseTime=ndDateChooser.getAttribute("dc-closetime");
if(!sCloseTime){aMatch=sClass.match(/(?:^|\s)dc-closetime=\'([^\']+)(?:\'|$)/);
sCloseTime=aMatch?aMatch[1]:false
}sOnUpdate=ndDateChooser.getAttribute("dc-onupdate");
if(!sOnUpdate){aMatch=sClass.match(/(?:^|\s)dc-onupdate=\'([^\']+)(?:\'|$)/);
sOnUpdate=aMatch?aMatch[1]:false
}sStartDate=ndDateChooser.getAttribute("dc-startdate");
if(!sStartDate){aMatch=sClass.match(/(?:^|\s)dc-startdate=\'([^\']+)(?:\'|$)/);
sStartDate=aMatch?aMatch[1]:false
}sEarliestDate=ndDateChooser.getAttribute("dc-earliestdate");
if(!sEarliestDate){aMatch=sClass.match(/(?:^|\s)dc-earliestdate=\'([^\']+)(?:\'|$)/);
sEarliestDate=aMatch?aMatch[1]:false
}sLatestDate=ndDateChooser.getAttribute("dc-latestdate");
if(!sLatestDate){aMatch=sClass.match(/(?:^|\s)dc-latestdate=\'([^\']+)(?:\'|$)/);
sLatestDate=aMatch?aMatch[1]:false
}sAllowedDays=ndDateChooser.getAttribute("dc-alloweddays");
if(!sAllowedDays){aMatch=sClass.match(/(?:^|\s)dc-alloweddays=\'([^\']+)(?:\'|$)/);
sAllowedDays=aMatch?aMatch[1]:false
}sWeekStartDay=ndDateChooser.getAttribute("dc-weekstartday");
if(!sWeekStartDay){aMatch=sClass.match(/(?:^|\s)dc-weekstartday=\'([^\']+)(?:\'|$)/);
sWeekStartDay=aMatch?aMatch[1]:false
}sLinkPosition=ndDateChooser.getAttribute("dc-linkposition");
if(!sLinkPosition){aMatch=sClass.match(/(?:^|\s)dc-linkposition=\'([^\']+)(?:\'|$)/);
sLinkPosition=aMatch?aMatch[1].toLowerCase():false;
if(sLinkPosition){sLinkID=ndDateChooser.id
}}objUpdateField={};
if(sDateFormat){objUpdateField[ndDateChooser.id]=sDateFormat
}aDateFormatNodes=ndDateChooser.all||ndDateChooser.getElementsByTagName("*");
for(var nDateFormat=0;
nDateFormat<aDateFormatNodes.length;
++nDateFormat){ndElement=aDateFormatNodes[nDateFormat];
sClass=ndElement.className;
sDateFormat=ndElement.getAttribute("dc-dateformat");
if(!sDateFormat){aMatch=sClass.match(/(?:^|\s)dc-dateformat=\'([^\']+)(?:\'|$)/);
sDateFormat=aMatch?aMatch[1]:false
}if(!sDateFormat){continue
}if(!ndElement.id){ndElement.id="dc-id-"+(++nFieldID)
}objUpdateField[ndElement.id]=sDateFormat;
sLastID=ndElement.id;
if(!sLinkPosition){sLinkPosition=ndElement.getAttribute("dc-linkposition")
}if(!sLinkPosition){aMatch=sClass.match(/(?:^|\s)dc-linkposition=\'([^\']+)(?:\'|$)/);
sLinkPosition=aMatch?aMatch[1].toLowerCase():false;
if(sLinkPosition){sLinkID=ndElement.id
}}}if(!sLinkPosition){sLinkID=sLastID;
sLinkPosition="right"
}ndDateChooser.datechooser=new DateChooser();
if(sXOffset){ndDateChooser.datechooser.setXOffset(sXOffset)
}if(sYOffset){ndDateChooser.datechooser.setYOffset(sYOffset)
}if(sCloseTime){ndDateChooser.datechooser.setCloseTime(sCloseTime)
}if(sOnUpdate){ndDateChooser.datechooser.setUpdateFunction(eval(sOnUpdate))
}if(sStartDate){objDate=new Date();
objDate.setFullYear(parseInt(sStartDate.substring(4),10));
objDate.setMonth(parseInt(sStartDate.substring(0,2),10)-1);
objDate.setDate(parseInt(sStartDate.substring(2,4),10));
ndDateChooser.datechooser.setStartDate(objDate)
}if(sEarliestDate){objDate=new Date();
objDate.setFullYear(parseInt(sEarliestDate.substring(4),10));
objDate.setMonth(parseInt(sEarliestDate.substring(0,2),10)-1);
objDate.setDate(parseInt(sEarliestDate.substring(2,4),10));
ndDateChooser.datechooser.setEarliestDate(objDate)
}if(sLatestDate){objDate=new Date();
objDate.setFullYear(parseInt(sLatestDate.substring(4),10));
objDate.setMonth(parseInt(sLatestDate.substring(0,2),10)-1);
objDate.setDate(parseInt(sLatestDate.substring(2,4),10));
ndDateChooser.datechooser.setLatestDate(objDate)
}if(sAllowedDays){ndDateChooser.datechooser.setAllowedDays(sAllowedDays.split(","))
}if(sWeekStartDay){ndDateChooser.datechooser.setWeekStartDay(parseInt(sWeekStartDay,10))
}if(sIcon){ndDateChooser.datechooser.setIcon(sIcon,sLinkID,(sLinkPosition!="left"))
}if(sText){ndDateChooser.datechooser.setLink(sText,sLinkID,(sLinkPosition!="left"))
}ndDateChooser.datechooser.setUpdateField(objUpdateField)
}delete objDate;
return true
});
