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))||(e.tagName.toLowerCase()=="span")){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,s){function a(t){var m=s.cutoffyear%100;var u=s.cutoffyear-m;return((t>m)?(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*)\\"+s.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 r=(s.digits>0);var l,h;var b=parseInt(s.groupsize,10);if(!isNaN(b)&&b>0){l="{1,"+b+"}";h="{"+b+"}"}else{l=h="+"}c=new RegExp("^\\s*([-\\+])?((\\d"+l+"(\\"+s.groupchar+"\\d"+h+")+)|\\d*)"+(r?"\\"+s.decimalchar+"?(\\d{0,"+s.digits+"})":"")+"\\s*$");i=f.match(c);if(i==null){return null}if(i[2].length==0&&r&&i[5].length==0){return null}e=(i[1]!=null?i[1]:"")+i[2].replace(new RegExp("(\\"+s.groupchar+")","g"),"")+((r&&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 n,q,g;if(i!=null&&(i[2].length==4||s.dateorder=="ymd")){n=i[6];q=i[5];g=(i[2].length==4)?i[2]:a(parseInt(i[3],10))}else{if(s.dateorder=="ymd"){return null}var o=new RegExp("^\\s*(\\d{1,2})([-/]|\\. ?)(\\d{1,2})(?:\\s|\\2)((\\d{4})|(\\d{2}))(?:\\s\u0433\\.)?\\s*$");i=f.match(o);if(i==null){return null}if(s.dateorder=="mdy"){n=i[3];q=i[1]}else{n=i[1];q=i[3]}g=(i[5].length==4)?i[5]:a(parseInt(i[6],10))}q-=1;var p=new Date(g,q,n);if(g<100){p.setFullYear(g)}return(typeof(p)=="object"&&g==p.getFullYear()&&q==p.getMonth()&&n==p.getDate())?p.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)}}}}if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};