var Page_ValidationVer="125";var Page_IsValid=true;var Page_BlockSubmit=false;var Page_InvalidControlToBeFocused=null;function ValidatorUpdateDisplay(A){if(typeof(A.display)=="string"){if(A.display=="None"){return}if(A.display=="Dynamic"){A.style.display=A.isvalid?"none":"inline";return}}if((navigator.userAgent.indexOf("Mac")>-1)&&(navigator.userAgent.indexOf("MSIE")>-1)){A.style.display="inline"}A.style.visibility=A.isvalid?"hidden":"visible"}function ValidatorUpdateIsValid(){Page_IsValid=AllValidatorsValid(Page_Validators)}function AllValidatorsValid(A){if((typeof(A)!="undefined")&&(A!=null)){var B;for(B=0;B<A.length;B++){if(!A[B].isvalid){return false}}}return true}function ValidatorHookupControlID(A,C){if(typeof(A)!="string"){return}var B=document.getElementById(A);if((typeof(B)!="undefined")&&(B!=null)){ValidatorHookupControl(B,C)}else{C.isvalid=true;C.enabled=false}}function ValidatorHookupControl(C,D){if(typeof(C.tagName)!="string"){return}if(C.tagName!="INPUT"&&C.tagName!="TEXTAREA"&&C.tagName!="SELECT"){var B;for(B=0;B<C.childNodes.length;B++){ValidatorHookupControl(C.childNodes[B],D)}return}else{if(typeof(C.Validators)=="undefined"){C.Validators=new Array;var A;if(C.type=="radio"){A="onclick"}else{A="onchange";if(typeof(D.focusOnError)=="string"&&D.focusOnError=="t"){ValidatorHookupEvent(C,"onblur","ValidatedControlOnBlur(event); ")}}ValidatorHookupEvent(C,A,"ValidatorOnChange(event); ");if(C.type=="text"||C.type=="password"||C.type=="file"){ValidatorHookupEvent(C,"onkeypress","if (!ValidatedTextBoxOnKeyPress(event)) { event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); return false; } ")}}C.Validators[C.Validators.length]=D}}function ValidatorHookupEvent(control,eventType,functionPrefix){var ev;eval("ev = control."+eventType+";");if(typeof(ev)=="function"){ev=ev.toString();ev=ev.substring(ev.indexOf("{")+1,ev.lastIndexOf("}"))}else{ev=""}var func;if(navigator.appName.toLowerCase().indexOf("explorer")>-1){func=new Function(functionPrefix+" "+ev)}else{func=new Function("event",functionPrefix+" "+ev)}eval("control."+eventType+" = func;")}function ValidatorGetValue(B){var A;A=document.getElementById(B);if(typeof(A.value)=="string"){return A.value}return ValidatorGetValueRecursive(A)}function ValidatorGetValueRecursive(B){if(typeof(B.value)=="string"&&(B.type!="radio"||B.checked==true)){return B.value}var A,C;for(A=0;A<B.childNodes.length;A++){C=ValidatorGetValueRecursive(B.childNodes[A]);if(C!=""){return C}}return""}function Page_ClientValidate(A){Page_InvalidControlToBeFocused=null;if(typeof(Page_Validators)=="undefined"){return true}var B;for(B=0;B<Page_Validators.length;B++){ValidatorValidate(Page_Validators[B],A,null)}ValidatorUpdateIsValid();ValidationSummaryOnSubmit(A);Page_BlockSubmit=!Page_IsValid;return Page_IsValid}function ValidatorCommonOnSubmit(){Page_InvalidControlToBeFocused=null;var A=!Page_BlockSubmit;if((typeof(window.event)!="undefined")&&(window.event!=null)){window.event.returnValue=A}Page_BlockSubmit=false;return A}function ValidatorEnable(B,A){B.enabled=(A!=false);ValidatorValidate(B);ValidatorUpdateIsValid()}function ValidatorOnChange(C){if(!C){C=window.event}Page_InvalidControlToBeFocused=null;var A;if((typeof(C.srcElement)!="undefined")&&(C.srcElement!=null)){A=C.srcElement}else{A=C.target}var D;if(typeof(A.Validators)!="undefined"){D=A.Validators}else{if(A.tagName.toLowerCase()=="label"){A=document.getElementById(A.htmlFor);D=A.Validators}}var B;for(B=0;B<D.length;B++){ValidatorValidate(D[B],null,C)}ValidatorUpdateIsValid()}function ValidatedTextBoxOnKeyPress(A){if(A.keyCode==13){ValidatorOnChange(A);var B;if((typeof(A.srcElement)!="undefined")&&(A.srcElement!=null)){B=A.srcElement.Validators}else{B=A.target.Validators}return AllValidatorsValid(B)}return true}function ValidatedControlOnBlur(A){var B;if((typeof(A.srcElement)!="undefined")&&(A.srcElement!=null)){B=A.srcElement}else{B=A.target}if((typeof(B)!="undefined")&&(B!=null)&&(Page_InvalidControlToBeFocused==B)){B.focus();Page_InvalidControlToBeFocused=null}}function ValidatorValidate(C,A,B){C.isvalid=true;if((typeof(C.enabled)=="undefined"||C.enabled!=false)&&IsValidationGroupMatch(C,A)){if(typeof(C.evaluationfunction)=="function"){C.isvalid=C.evaluationfunction(C);if(!C.isvalid&&Page_InvalidControlToBeFocused==null&&typeof(C.focusOnError)=="string"&&C.focusOnError=="t"){ValidatorSetFocus(C,B)}}}ValidatorUpdateDisplay(C)}function ValidatorSetFocus(F,B){var E;if(typeof(F.controlhookup)=="string"){var A;if((typeof(B)!="undefined")&&(B!=null)){if((typeof(B.srcElement)!="undefined")&&(B.srcElement!=null)){A=B.srcElement}else{A=B.target}}if((typeof(A)!="undefined")&&(A!=null)&&(typeof(A.id)=="string")&&(A.id==F.controlhookup)){E=A}}if((typeof(E)=="undefined")||(E==null)){E=document.getElementById(F.controltovalidate)}if((typeof(E)!="undefined")&&(E!=null)&&(E.tagName.toLowerCase()!="table"||(typeof(B)=="undefined")||(B==null))&&((E.tagName.toLowerCase()!="input")||(E.type.toLowerCase()!="hidden"))&&(typeof(E.disabled)=="undefined"||E.disabled==null||E.disabled==false)&&(typeof(E.visible)=="undefined"||E.visible==null||E.visible!=false)&&(IsInVisibleContainer(E))){if(E.tagName.toLowerCase()=="table"&&(typeof(__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser)){var D=E.getElementsByTagName("input");var C=D[D.length-1];if(C!=null){E=C}}if(typeof(E.focus)!="undefined"&&E.focus!=null){E.focus();Page_InvalidControlToBeFocused=E}}}function IsInVisibleContainer(A){if(typeof(A.style)!="undefined"&&((typeof(A.style.display)!="undefined"&&A.style.display=="none")||(typeof(A.style.visibility)!="undefined"&&A.style.visibility=="hidden"))){return false}else{if(typeof(A.parentNode)!="undefined"&&A.parentNode!=null&&A.parentNode!=A){return IsInVisibleContainer(A.parentNode)}}return true}function IsValidationGroupMatch(B,A){if((typeof(A)=="undefined")||(A==null)){return true}var C="";if(typeof(B.validationGroup)=="string"){C=B.validationGroup}return(C==A)}function ValidatorOnLoad(){if(typeof(Page_Validators)=="undefined"){return}var i,val;for(i=0;i<Page_Validators.length;i++){val=Page_Validators[i];if(typeof(val.evaluationfunction)=="string"){eval("val.evaluationfunction = "+val.evaluationfunction+";")}if(typeof(val.isvalid)=="string"){if(val.isvalid=="False"){val.isvalid=false;Page_IsValid=false}else{val.isvalid=true}}else{val.isvalid=true}if(typeof(val.enabled)=="string"){val.enabled=(val.enabled!="False")}if(typeof(val.controltovalidate)=="string"){ValidatorHookupControlID(val.controltovalidate,val)}if(typeof(val.controlhookup)=="string"){ValidatorHookupControlID(val.controlhookup,val)}}Page_ValidationActive=true}function ValidatorConvert(F,J,R){function A(T){var S=R.cutoffyear%100;var U=R.cutoffyear-S;return((T>S)?(U-100+T):(U+T))}var D,E,I,C;if(J=="Integer"){C=/^\s*[-\+]?\d+\s*$/;if(F.match(C)==null){return null}D=parseInt(F,10);return(isNaN(D)?null:D)}else{if(J=="Double"){C=new RegExp("^\\s*([-\\+])?(\\d*)\\"+R.decimalchar+"?(\\d*)\\s*$");I=F.match(C);if(I==null){return null}if(I[2].length==0&&I[3].length==0){return null}E=(I[1]!=null?I[1]:"")+(I[2].length>0?I[2]:"0")+(I[3].length>0?"."+I[3]:"");D=parseFloat(E);return(isNaN(D)?null:D)}else{if(J=="Currency"){var Q=(R.digits>0);var L,H;var B=parseInt(R.groupsize,10);if(!isNaN(B)&&B>0){L="{1,"+B+"}";H="{"+B+"}"}else{L=H="+"}C=new RegExp("^\\s*([-\\+])?((\\d"+L+"(\\"+R.groupchar+"\\d"+H+")+)|\\d*)"+(Q?"\\"+R.decimalchar+"?(\\d{0,"+R.digits+"})":"")+"\\s*$");I=F.match(C);if(I==null){return null}if(I[2].length==0&&Q&&I[5].length==0){return null}E=(I[1]!=null?I[1]:"")+I[2].replace(new RegExp("(\\"+R.groupchar+")","g"),"")+((Q&&I[5].length>0)?"."+I[5]:"");D=parseFloat(E);return(isNaN(D)?null:D)}else{if(J=="Date"){var K=new RegExp("^\\s*((\\d{4})|(\\d{2}))([-/]|\\. ?)(\\d{1,2})\\4(\\d{1,2})\\s*$");I=F.match(K);var M,P,G;if(I!=null&&(I[2].length==4||R.dateorder=="ymd")){M=I[6];P=I[5];G=(I[2].length==4)?I[2]:A(parseInt(I[3],10))}else{if(R.dateorder=="ymd"){return null}var N=new RegExp("^\\s*(\\d{1,2})([-/]|\\. ?)(\\d{1,2})\\2((\\d{4})|(\\d{2}))\\s*$");I=F.match(N);if(I==null){return null}if(R.dateorder=="mdy"){M=I[3];P=I[1]}else{M=I[1];P=I[3]}G=(I[5].length==4)?I[5]:A(parseInt(I[6],10))}P-=1;var O=new Date(G,P,M);if(G<100){O.setFullYear(G)}return(typeof(O)=="object"&&G==O.getFullYear()&&P==O.getMonth()&&M==O.getDate())?O.valueOf():null}else{return F.toString()}}}}}function ValidatorCompare(D,C,B,G){var A=G.type;var F,E;if((F=ValidatorConvert(D,A,G))==null){return false}if(B=="DataTypeCheck"){return true}if((E=ValidatorConvert(C,A,G))==null){return true}switch(B){case"NotEqual":return(F!=E);case"GreaterThan":return(F>E);case"GreaterThanEqual":return(F>=E);case"LessThan":return(F<E);case"LessThanEqual":return(F<=E);default:return(F==E)}}function CompareValidatorEvaluateIsValid(D){var C=ValidatorGetValue(D.controltovalidate);if(ValidatorTrim(C).length==0){return true}var B="";if((typeof(D.controltocompare)!="string")||(typeof(document.getElementById(D.controltocompare))=="undefined")||(null==document.getElementById(D.controltocompare))){if(typeof(D.valuetocompare)=="string"){B=D.valuetocompare}}else{B=ValidatorGetValue(D.controltocompare)}var A="Equal";if(typeof(D.operator)=="string"){A=D.operator}return ValidatorCompare(C,B,A,D)}function CustomValidatorEvaluateIsValid(val){var value="";if(typeof(val.controltovalidate)=="string"){value=ValidatorGetValue(val.controltovalidate);if((ValidatorTrim(value).length==0)&&((typeof(val.validateemptytext)!="string")||(val.validateemptytext!="true"))){return true}}var args={Value:value,IsValid:true};if(typeof(val.clientvalidationfunction)=="string"){eval(val.clientvalidationfunction+"(val, args) ;")}return args.IsValid}function RegularExpressionValidatorEvaluateIsValid(D){var B=ValidatorGetValue(D.controltovalidate);if(ValidatorTrim(B).length==0){return true}var C=new RegExp(D.validationexpression);var A=C.exec(B);return(A!=null&&B==A[0])}function ValidatorTrim(B){var A=B.match(/^\s*(\S+(\s+\S+)*)\s*$/);return(A==null)?"":A[1]}function RequiredFieldValidatorEvaluateIsValid(A){return(ValidatorTrim(ValidatorGetValue(A.controltovalidate))!=ValidatorTrim(A.initialvalue))}function RangeValidatorEvaluateIsValid(B){var A=ValidatorGetValue(B.controltovalidate);if(ValidatorTrim(A).length==0){return true}return(ValidatorCompare(A,B.minimumvalue,"GreaterThanEqual",B)&&ValidatorCompare(A,B.maximumvalue,"LessThanEqual",B))}function ValidationSummaryOnSubmit(A){if(typeof(Page_ValidationSummaries)=="undefined"){return}var C,E,F;for(E=0;E<Page_ValidationSummaries.length;E++){C=Page_ValidationSummaries[E];C.style.display="none";if(!Page_IsValid&&IsValidationGroupMatch(C,A)){var D;if(C.showsummary!="False"){C.style.display="";if(typeof(C.displaymode)!="string"){C.displaymode="BulletList"}switch(C.displaymode){case"List":headerSep="<br>";first="";pre="";post="<br>";end="";break;case"BulletList":default:headerSep="";first="<ul>";pre="<li>";post="</li>";end="</ul>";break;case"SingleParagraph":headerSep=" ";first="";pre="";post=" ";end="<br>";break}F="";if(typeof(C.headertext)=="string"){F+=C.headertext+headerSep}F+=first;for(D=0;D<Page_Validators.length;D++){if(!Page_Validators[D].isvalid&&typeof(Page_Validators[D].errormessage)=="string"){F+=pre+Page_Validators[D].errormessage+post}}F+=end;C.innerHTML=F;window.scrollTo(0,0)}if(C.showmessagebox=="True"){F="";if(typeof(C.headertext)=="string"){F+=C.headertext+"\r\n"}var B=Page_Validators.length-1;for(D=0;D<=B;D++){if(!Page_Validators[D].isvalid&&typeof(Page_Validators[D].errormessage)=="string"){switch(C.displaymode){case"List":F+=Page_Validators[D].errormessage;if(D<B){F+="\r\n"}break;case"BulletList":default:F+="- "+Page_Validators[D].errormessage;if(D<B){F+="\r\n"}break;case"SingleParagraph":F+=Page_Validators[D].errormessage+" ";break}}}alert(F)}}}};