PageSourceSearch

https://www.carotenoidspalma2026.org/js/yav.js

js carotenoidspalma2026.org collected 2026-10-08 18:54:42 UTC 18,125 bytes, 1 lines download raw bytes

1var undef,ISFOCUSSET=!1,INPUTHIGHLIGHT=!0,internalRules;function performCheck(J,H,D){isFocusSet=ISFOCUSSET;var I=makeRules(H);if(internalRules=makeRules(H),this.f=document.forms[J],!this.f)return debug("DEBUG: could not find form object "+J),null;var G=new Array,C=0,K;if(I.length)for(var E=0;E<I.length;E++){var F;null!=(F=I[E])&&highlight(getField(f,F.el),inputclassnormal)}else null!=I&&highlight(getField(f,I.el),inputclassnormal);if(I.length)for(var E=0;E<I.length;E++){var F,B=null;if(null==(F=I[E]));else if("pre-condition"==F.ruleType||"post-condition"==F.ruleType||"andor-operator"==F.ruleType);else if("implies"==F.ruleName){pre=F.el,post=F.comparisonValue;var A=getField(f,I[pre].el).className;null==checkRule(f,I[pre])&&null!=checkRule(f,I[post])?B=deleteInline(F.alertMsg)+"__inline__"+I[post].el:null!=checkRule(f,I[pre])&&(getField(f,I[pre].el).className=A)}else B=checkRule(f,F);null!=B&&(G[C]=B,C++)}else err=checkRule(f,I),null!=err&&(G[0]=err);return displayAlert(G,D)}function checkKeyPress(E,G,A){var F=null;"msie"==getBrowser()?F=window.event.keyCode:"netscape"!=getBrowser()&&"firefox"!=getBrowser()||(F=E.which);var H=makeRules(A),B=!0,C;if(H.length)for(var D=0;D<H.length;D++){var C;if("keypress"==(C=H[D]).ruleName&&C.el==G.name){B=isKeyAllowed(F,C.comparisonValue);break}}else"keypress"==(C=H).ruleName&&C.el==G.name&&(B=isKeyAllowed(F,C.comparisonValue));return B||("msie"==getBrowser()?window.event.keyCode=0:"netscape"!=getBrowser()&&"firefox"!=getBrowser()||(E.preventDefault(),E.stopPropagation(),E.returnValue=!1)),!1}function displayAlert(C,B){var A=null;return clearAllInlineDivs(),"classic"==B?A=displayClassic(C):"innerHtml"==B?A=displayInnerHtml(C):"inline"==B?A=displayInline(C):"jsVar"==B?A=displayJsVar(C):debug("DEBUG: alert type "+B+" not supported"),A}function displayClassic(B){var C="";if(null!=B&&B.length>0){strTrim(HEADER_MSG).length>0&&(C+=HEADER_MSG+"\n\n");for(var A=0;A<B.length;A++)C+=" "+deleteInline(B[A])+"\n";return strTrim(FOOTER_MSG).length>0&&(C+="\n"+FOOTER_MSG),alert(C),!1}return!0}function displayInnerHtml(B){if(null!=B&&B.length>0){var C="";strTrim(HEADER_MSG).length>0&&(C+=HEADER_MSG),C+="<ul>";for(var A=0;A<B.length;A++)C+="<li>"+deleteInline(B[A])+"</li>";return C+="</ul>",strTrim(FOOTER_MSG).length>0&&(C+=FOOTER_MSG),document.getElementById(errorsdiv).innerHTML=C,document.getElementById(errorsdiv).className=innererror,document.getElementById(errorsdiv).style.display="block",!1}return document.getElementById(errorsdiv).innerHTML="",document.getElementById(errorsdiv).className="",document.getElementById(errorsdiv).style.display="none",!0}function displayInline(C){if(null!=C&&C.length>0){for(var A=new Array,D=0,B=0;B<C.length;B++){var E=C[B].substring(C[B].indexOf("__inline__")+10);document.getElementById(errorsdiv+"_"+E)?(document.getElementById(errorsdiv+"_"+E).innerHTML=deleteInline(C[B]),document.getElementById(errorsdiv+"_"+E).className=innererror,document.getElementById(errorsdiv+"_"+E).style.display="block"):(A[D]=C[B],D++)}return D>0&&displayInnerHtml(A),!1}return!0}function clearAllInlineDivs(){for(var C=document.getElementsByTagName("div"),B=0;B<C.length;B++){var A=C[B].id;0==A.indexOf(errorsdiv+"_")&&(document.getElementById(A).innerHTML="",document.getElementById(A).className="",document.getElementById(A).style.display="none")}}function displayJsVar(B){if(document.getElementById(errorsdiv).className="",document.getElementById(errorsdiv).style.display="none",null!=B&&B.length>0){for(var A=0;A<B.length;A++)B[A]=deleteInline(B[A]);var C="";return C+="<script>var jsErrors;<\/script>",document.getElementById(errorsdiv).innerHTML=C,jsErrors=B,!1}return document.getElementById(errorsdiv).innerHTML="<script>var jsErrors;<\/script>",!0}function rule(B,D,C,A,E){if(!checkArguments(arguments))return!1;tmp=B.split(":"),nameDisplayed="",2==tmp.length&&(nameDisplayed=tmp[1],B=tmp[0]),this.el=B,this.nameDisplayed=nameDisplayed,this.ruleName=D,this.comparisonValue=C,this.ruleType=E,this.alertMsg=A==undef||null==A?getDefaultMessage(B,nameDisplayed,D,C)+"__inline__"+this.el:A+"__inline__"+this.el}function checkRule(f,myRule){if(retVal=null,null!=myRule)if("custom"==myRule.ruleName){var customFunction=" retVal = "+myRule.el;eval(customFunction)}else if("and"==myRule.ruleName){var op_1=myRule.el,op_next=myRule.comparisonValue;if(null!=checkRule(f,internalRules[op_1]))retVal=myRule.alertMsg,"pre-condition"==myRule.ruleType||myRule.ruleType;else for(var op_k=op_next.split("-"),k=0;k<op_k.length;
1k++)if(null!=checkRule(f,internalRules[op_k[k]])){retVal=myRule.alertMsg,"pre-condition"==myRule.ruleType||myRule.ruleType;break}}else if("or"==myRule.ruleName){var op_1=myRule.el,op_next=myRule.comparisonValue,success=!1;if(null==checkRule(f,internalRules[op_1]))success=!0;else{"pre-condition"==myRule.ruleType||myRule.ruleType;for(var op_k=op_next.split("-"),k=0;k<op_k.length;k++){if(null==checkRule(f,internalRules[op_k[k]])){success=!0;break}"pre-condition"==myRule.ruleType||myRule.ruleType}}if(success){highlight(getField(f,internalRules[op_1].el),inputclassnormal);for(var op_k=op_next.split("-"),k=0;k<op_k.length;k++)highlight(getField(f,internalRules[op_k[k]].el),inputclassnormal)}else retVal=myRule.alertMsg}else{if(el=getField(f,myRule.el),null==el)return debug("DEBUG: could not find element "+myRule.el),null;var err=null;el.type?"hidden"==el.type||"text"==el.type||"password"==el.type||"textarea"==el.type?err=checkText(el,myRule):"checkbox"==el.type?err=checkCheckbox(el,myRule):"select-one"==el.type?err=checkSelOne(el,myRule):"select-multiple"==el.type?err=checkSelMul(el,myRule):"radio"==el.type?err=checkRadio(el,myRule):debug("DEBUG: type "+el.type+" not supported"):err=checkRadio(el,myRule),retVal=err}return retVal}function checkArguments(A){return A.length<4?(debug("DEBUG: rule requires four arguments at least"),!1):null!=A[0]&&null!=A[1]||(debug("DEBUG: el and ruleName are required"),!1)}function checkRadio(B,E){var C=null;if("required"==E.ruleName){var F=B,D=!1;if(isNaN(F.length)&&F.checked)D=!0;else for(var A=0;A<F.length;A++)if(F[A].checked){D=!0;break}D||(highlight(B,inputclasserror),C=E.alertMsg)}else if("equal"==E.ruleName){var F=B,D=!1;if(isNaN(F.length)&&F.checked)F.value==E.comparisonValue&&(D=!0);else for(var A=0;A<F.length;A++)if(F[A].checked&&F[A].value==E.comparisonValue){D=!0;break}D||(C=E.alertMsg)}else if("notequal"==E.ruleName){var F=B,D=!1;if(isNaN(F.length)&&F.checked)F.value!=E.comparisonValue&&(D=!0);else for(var A=0;A<F.length;A++)if(F[A].checked&&F[A].value!=E.comparisonValue){D=!0;break}D||(C=E.alertMsg)}else debug("DEBUG: rule "+E.ruleName+" not supported for radio");return C}function checkText(el,myRule){return err=null,trimenabled&&(el.value=strTrim(el.value)),"required"==myRule.ruleName?null!=el.value&&""!=el.value||(highlight(el,inputclasserror),err=myRule.alertMsg):"equal"==myRule.ruleName?err=checkEqual(el,myRule):"notequal"==myRule.ruleName?err=checkNotEqual(el,myRule):"numeric"==myRule.ruleName?(reg=new RegExp("^[0-9]*$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"alphabetic"==myRule.ruleName?(reg=new RegExp("^[A-Za-z]*$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"alphanumeric"==myRule.ruleName?(reg=new RegExp("^[A-Za-z0-9]*$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"alnumhyphen"==myRule.ruleName?(reg=new RegExp("^[A-Za-z0-9-_]*$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"alnumhyphenat"==myRule.ruleName?(reg=new RegExp("^[A-Za-z0-9-_@]*$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"alphaspace"==myRule.ruleName?(reg=new RegExp("^[A-Za-z0-9-_ \n\r\t]*$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"email"==myRule.ruleName?(reg=new RegExp("^(([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z-_.]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,}){0,1}$"),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"maxlength"==myRule.ruleName?isNaN(myRule.comparisonValue)?debug("DEBUG: comparisonValue for rule "+myRule.ruleName+" not a number"):el.value.length>myRule.comparisonValue&&(highlight(el,inputclasserror),err=myRule.alertMsg):"minlength"==myRule.ruleName?isNaN(myRule.comparisonValue)?debug("DEBUG: comparisonValue for rule "+myRule.ruleName+" not a number"):el.value.length<myRule.comparisonValue&&(highlight(el,inputclasserror),err=myRule.alertMsg):"numrange"==myRule.ruleName?(reg=new RegExp("^[-+]{0,1}[0-9]*[.]{0,1}[0-9]*$"),reg.test(unformatNumber(el.value))?(regRange=new RegExp("^[0-9]+-[0-9]+$"),regRange.test(myRule.comparisonValue)?(rangeVal=myRule.comparisonValue.split("-"),(eval(unformatNumber(el.value))<eval(rangeVal[0])||eval(unformatNumber(el.value))>eval(rangeVal[1]))&&(highlight(el,inputclasserror),err=myRule.alertMsg)):debug("DEBUG: comparisonValue for rule "+myRule.ruleName+" not in format number1-number2")):(highlight(el,inputclasserror),err=myRule.alertMsg)):"regexp"==myRule.ruleName?(reg=new RegExp(myRule.comparisonValue),reg.test(el.value)||(highlight(el,inputclasserror),err=myRule.alertMsg)):"integer"==myRule.ruleName?err=checkInteger(el,myRule):"double"==myRule.ruleName?err=checkDouble(el,myRule):"date"==myRule.ruleName?err=checkDate(el,myRule):"date_lt"==myRule.ruleName?err=checkDateLessThan(el,myRule,!1):"date_le"==myRule.ruleName?err=checkDateLessThan(el,myRule,!0):"keypress"==myRule.ruleName||("empty"==myRule.ruleName?null!=el.value&&""!=el.value&&(highlight(el,inputclasserror),err=myRule.alertMsg):debug("DEBUG: rule "+myRule.ruleName+" not supported for "+el.type)),err}function checkInteger(A,B){if(reg=new RegExp("^[-+]{0,1}[0-9]*$"),!reg.test(A.value))return highlight(A,inputclasserror),B.alertMsg}function checkDouble(B,C){var A=DECIMAL_SEP;if(reg=new RegExp("^[-+]{0,1}[0-9]*["+A+"]{0,1}[0-9]*$"),!reg.test(B.value))return highlight(B,inputclasserror),C.alertMsg}function checkDate(B,C){if(error=null,""!=B.value){var A=DATE_FORMAT;ddReg=new RegExp("dd"),MMReg=new RegExp("MM"),yyyyReg=new RegExp("yyyy"),ddReg.test(A)&&MMReg.test(A)&&yyyyReg.test(A)?(ddStart=A.indexOf("dd"),MMStart=A.indexOf("MM"),yyyyStart=A.indexOf("yyyy")):debug("DEBUG: locale format "+A+" not supported"),strReg
1=A.replace("dd","[0-9]{2}").replace("MM","[0-9]{2}").replace("yyyy","[0-9]{4}"),reg=new RegExp("^"+strReg+"$"),reg.test(B.value)?(dd=B.value.substring(ddStart,ddStart+2),MM=B.value.substring(MMStart,MMStart+2),yyyy=B.value.substring(yyyyStart,yyyyStart+4),checkddMMyyyy(dd,MM,yyyy)||(highlight(B,inputclasserror),error=C.alertMsg)):(highlight(B,inputclasserror),error=C.alertMsg)}return error}function checkDateLessThan(E,F,C){var B;if(error=null,null==checkDate(E,F)&&""!=E.value){var A=DATE_FORMAT;ddStart=A.indexOf("dd"),MMStart=A.indexOf("MM"),yyyyStart=A.indexOf("yyyy"),dd=E.value.substring(ddStart,ddStart+2),MM=E.value.substring(MMStart,MMStart+2),yyyy=E.value.substring(yyyyStart,yyyyStart+4),myDate=""+yyyy+MM+dd,strReg=A.replace("dd","[0-9]{2}").replace("MM","[0-9]{2}").replace("yyyy","[0-9]{4}"),reg=new RegExp("^"+strReg+"$");var G,D="";0==F.comparisonValue.indexOf("$")?(toSplit=F.comparisonValue.substr(1),tmp=toSplit.split(":"),D=2==tmp.length?this.getField(f,tmp[0]).value:this.getField(f,F.comparisonValue.substr(1)).value):D=F.comparisonValue,reg.test(D)?(cdd=D.substring(ddStart,ddStart+2),cMM=D.substring(MMStart,MMStart+2),cyyyy=D.substring(yyyyStart,yyyyStart+4),cDate=""+cyyyy+cMM+cdd,C?(!checkddMMyyyy(cdd,cMM,cyyyy)||myDate>cDate)&&(highlight(E,inputclasserror),error=F.alertMsg):(!checkddMMyyyy(cdd,cMM,cyyyy)||myDate>=cDate)&&(highlight(E,inputclasserror),error=F.alertMsg)):(highlight(E,inputclasserror),error=F.alertMsg)}else""!=E.value&&(highlight(E,inputclasserror),error=F.alertMsg);return error}function checkEqual(B,C){error=null;var D,A="";return 0==C.comparisonValue.indexOf("$")?(toSplit=C.comparisonValue.substr(1),tmp=toSplit.split(":"),A=2==tmp.length?this.getField(f,tmp[0]).value:this.getField(f,C.comparisonValue.substr(1)).value):A=C.comparisonValue,B.value!=A&&(highlight(B,inputclasserror),error=C.alertMsg),error}function checkNotEqual(B,C){error=null;var D,A="";return 0==C.comparisonValue.indexOf("$")?(toSplit=C.comparisonValue.substr(1),tmp=toSplit.split(":"),A=2==tmp.length?this.getField(f,tmp[0]).value:this.getField(f,C.comparisonValue.substr(1)).value):A=C.comparisonValue,B.value==A&&(highlight(B,inputclasserror),error=C.alertMsg),error}function checkddMMyyyy(A,C,B){return retVal=!0,(A<1||A>31||C<1||C>12||31==A&&(2==C||4==C||6==C||9==C||11==C)||A>29&&2==C||29==A&&2==C&&(B%4>0||B%4==0&&B%100==0&&B%400>0))&&(retVal=!1),retVal}function checkCheckbox(A,B){if("required"==B.ruleName){if(!A.checked)return highlight(A,inputclasserror),B.alertMsg}else if("equal"==B.ruleName){if(!A.checked||A.value!=B.comparisonValue)return highlight(A,inputclasserror),B.alertMsg}else if("notequal"==B.ruleName){if(!A.checked||A.value==B.comparisonValue)return highlight(A,inputclasserror),B.alertMsg}else debug("DEBUG: rule "+B.ruleName+" not supported for "+A.type)}function checkSelOne(A,C){if("required"==C.ruleName){var B=!1,D;if((D=A.selectedIndex)>=0&&A.options[D].value&&(B=!0),!B)return highlight(A,inputclasserror),C.alertMsg}else if("equal"==C.ruleName){var B=!1,D;if((D=A.selectedIndex)>=0&&A.options[D].value==C.comparisonValue&&(B=!0),!B)return highlight(A,inputclasserror),C.alertMsg}else if("notequal"==C.ruleName){var B=!1,D;if((D=A.selectedIndex)>=0&&A.options[D].value!=C.comparisonValue&&(B=!0),!B)return highlight(A,inputclasserror),C.alertMsg}else debug("DEBUG: rule "+C.ruleName+" not supported for "+A.type)}function checkSelMul(B,D){if("required"==D.ruleName){var C=!1;opts=B.options;for(var A=0;A<opts.length;A++)if(opts[A].selected&&opts[A].value){C=!0;break}if(!C)return highlight(B,inputclasserror),D.alertMsg}else if("equal"==D.ruleName){var C=!1;opts=B.options;for(var A=0;A<opts.length;A++)if(opts[A].selected&&opts[A].value==D.comparisonValue){C=!0;break}if(!C)return highlight(B,inputclasserror),D.alertMsg}else if("notequal"==D.ruleName){var C=!1;opts=B.options;for(var A=0;A<opts.length;A++)if(opts[A].selected&&opts[A].value!=D.comparisonValue){C=!0;break}if(!C)return highlight(B,inputclasserror),D.alertMsg}else debug("DEBUG: rule "+D.ruleName+" not supported for "+B.type)}function debug(A){debugmode&&alert(A)}function strTrim(A){return A.replace(/^\s+/,"").replace(/\s+$/,"")}
1function makeRules(A){var C=new Array;if(A.length)for(var B=0;B<A.length;B++)C[B]=splitRule(A[B]);else C[0]=splitRule(A);return C}function splitRule(B){var A=null;if(B!=undef)switch(params=B.split(RULE_SEP),params.length){case 2:A=new rule(params[0],params[1],null,null,null);break;case 3:A=threeParamRule(params[1])?new rule(params[0],params[1],params[2],null,null):"pre-condition"==params[2]||"post-condition"==params[2]||"andor-operator"==params[2]?new rule(params[0],params[1],null,"foo",params[2]):new rule(params[0],params[1],null,params[2],null);break;case 4:A=!threeParamRule(params[1])||"pre-condition"!=params[3]&&"post-condition"!=params[3]&&"andor-operator"!=params[3]?new rule(params[0],params[1],params[2],params[3],null):new rule(params[0],params[1],params[2],"foo",params[3]);break;default:debug("DEBUG: wrong definition of rule")}return A}function threeParamRule(A){return"equal"==A||"notequal"==A||"minlength"==A||"maxlength"==A||"date_lt"==A||"date_le"==A||"implies"==A||"regexp"==A||"numrange"==A||"keypress"==A||"and"==A||"or"==A}function highlight(B,A){isFocusSet&&A==inputclasserror&&B.focus(),B!=undef&&inputhighlight&&INPUTHIGHLIGHT&&(multipleclassname?highlightMultipleClassName(B,A):B.className=A)}function highlightMultipleClassName(B,A){void 0!==B.classList?(B.classList.remove(inputclassnormal,inputclasserror),B.classList.add(A)):(re=new RegExp("(^|s)("+inputclassnormal+"|"+inputclasserror+")($|s)"),B.className=strTrim((void 0!==B.className?B.className.replace(re,""):"")+" "+A))}function getDefaultMessage(B,A,D,C){0==A.length&&(A=B);var E=DEFAULT_MSG;return"required"==D?E=REQUIRED_MSG.replace("{1}",A):"minlength"==D?E=MINLENGTH_MSG.replace("{1}",A).replace("{2}",C):"maxlength"==D?E=MAXLENGTH_MSG.replace("{1}",A).replace("{2}",C):"numrange"==D?E=NUMRANGE_MSG.replace("{1}",A).replace("{2}",C):"date"==D?E=DATE_MSG.replace("{1}",A):"numeric"==D?E=NUMERIC_MSG.replace("{1}",A):"integer"==D?E=INTEGER_MSG.replace("{1}",A):"double"==D?E=DOUBLE_MSG.replace("{1}",A):"equal"==D?E=EQUAL_MSG.replace("{1}",A).replace("{2}",getComparisonDisplayed(C)):"notequal"==D?E=NOTEQUAL_MSG.replace("{1}",A).replace("{2}",getComparisonDisplayed(C)):"alphabetic"==D?E=ALPHABETIC_MSG.replace("{1}
1",A):"alphanumeric"==D?E=ALPHANUMERIC_MSG.replace("{1}",A):"alnumhyphen"==D?E=ALNUMHYPHEN_MSG.replace("{1}",A):"alnumhyphenat"==D?E=ALNUMHYPHENAT_MSG.replace("{1}",A):"alphaspace"==D?E=ALPHASPACE_MSG.replace("{1}",A):"email"==D?E=EMAIL_MSG.replace("{1}",A):"regexp"==D?E=REGEXP_MSG.replace("{1}",A).replace("{2}",C):"date_lt"==D?E=DATE_LT_MSG.replace("{1}",A).replace("{2}",getComparisonDisplayed(C)):"date_le"==D?E=DATE_LE_MSG.replace("{1}",A).replace("{2}",getComparisonDisplayed(C)):"empty"==D&&(E=EMPTY_MSG.replace("{1}",A)),E}function getComparisonDisplayed(A){return comparisonDisplayed=A,"$"==A.substring(0,1)&&(A=A.substring(1,A.length),tmp=A.split(":"),2==tmp.length?comparisonDisplayed=tmp[1]:comparisonDisplayed=A),comparisonDisplayed}function getBrowser(){var A;return brs=navigator.userAgent.toLowerCase(),-1!=brs.search(/msie\s(\d+(\.?\d)*)/)?"msie":-1!=brs.search(/netscape[\/\s](\d+([\.-]\d)*)/)?"netscape":-1!=brs.search(/firefox[\/\s](\d+([\.-]\d)*)/)?"firefox":"unknown"}function isKeyAllowed(D,B){var A;if(retval=!1,8==D)retval=!0;else for(var C=0;C<B.length;C++)if((A=B.charCodeAt(C))==D){retval=!0;break}return retval}function getField(B,C){var A=null;try{B.elements[C]?A=B.elements[C]:document.getElementById(C)&&(A=document.getElementById(C))}catch(e){document.getElementById(C)&&(A=document.getElementById(C))}return A}function unformatNumber(B){var A;return B.replace(THOUSAND_SEP,"").replace(DECIMAL_SEP,".")}function deleteInline(A){return-1==A.indexOf("__inline__")?A:A.substring(0,A.indexOf("__inline__"))}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.