function checkblank(a){if(typeof(a)=="object"){str_Value=a.value;}else{str_Value=a;}if(str_Value.length==0){int_Flag=0;}for(i=1;i<=str_Value.length;i++){if(str_Value.charAt(i-1)==" "){int_Flag=0;}else{int_Flag=1;break;}}if(int_Flag!=1){return false;}return true;}function checkspace(b){var a;if(typeof(b)=="object"){a=b.value;
}else{a=b;}for(count=0;count<a.length;count++){if(a.charAt(count)==" "){alert(_checkblank);return false;}}return true;}function checkspaceForExtjs(b){var a;if(typeof(b)=="object"){a=b.value;}else{a=b;}for(count=0;count<a.length;count++){if(a.charAt(count)==" "){return false;}}return true;}function checkmailspace(a){s_val=a;
for(count=0;count<s_val.length;count++){if(s_val.charAt(count)==" "){alert(_checkmailspace);return false;}}return true;}function checkcomma(b){var a;if(typeof(b)=="object"){a=b.value;}else{a=b;}len=a.length;if(a.indexOf(",")>-1){if(a.charAt(0)==","||a.charAt(len-1)==","){return false;}}return true;}function checkduplicate(d){s_val=(d.value);
var e=s_val.split(",");var b;var a;for(b=0;b<e.length;b++){for(a=b+1;a<e.length;a++){if(e[b]==e[a]){return false;}}}return true;}function checkduplicateValue(d){s_val=d;var e=s_val.split(",");var b;var a;for(b=0;b<e.length;b++){for(a=b+1;a<e.length;a++){if(e[b]==e[a]){return false;}}}return true;}function numKeyPress(){if(event.keyCode>=48&&event.keyCode<=57){return true;
}else{return false;}}function checknumber(f,h){if(typeof(h)=="object"){object_value=h.value;}else{object_value=h;}var a="";if(f=="+"){a=" .+0123456789";}else{a=" .+-0123456789";}var g=" .0123456789";var j;var e=false;var k=false;var b=false;j=a.indexOf(object_value.charAt(0));if(j==1){e=true;}else{if(j<1){return false;
}}for(var d=1;d<object_value.length;d++){j=g.indexOf(object_value.charAt(d));if(j<0){return false;}else{if(j==1){if(e){return false;}else{e=true;}}else{if(j==0){if(e||b){k=true;}}else{if(k){return false;}else{b=true;}}}}}return true;}function isNumber(f,k){var a="";if(f=="+"){a=" .+0123456789";}else{a=" .+-0123456789";
}var g=" .0123456789";var h;var e=false;var j=false;var b=false;h=a.indexOf(k.charAt(0));if(h==1){e=true;}else{if(h<1){return false;}}for(var d=1;d<k.length;d++){h=g.indexOf(k.charAt(d));if(h<0){return false;}else{if(h==1){if(e){return false;}else{e=true;}}else{if(h==0){if(e||b){j=true;}}else{if(j){return false;
}else{b=true;}}}}}return true;}function checkurl(d){var e=d.value;var b;var a;if(e.indexOf(".")==-1){return false;}else{b=e.lastIndexOf(".");a=e.length-1;if(b>=a){return false;}else{return true;}}}function checkfordecimal(b){var a="";if(typeof(b)=="object"){a=b.value;}else{a=b;}if(a.indexOf(".")>-1){alert(_checkfordecimal);
return false;}return true;}function checkspecial(d){obj_val=d.value;var b="	+-=~!@#%^&*()\"';";for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){alert(_checkspecial);return false;}}return true;}function checkspecial(d){obj_val=d;var b="	+-=~!@#$%^&*()\"';";for(var a=0;
a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){alert(_checkspecial);return false;}}return true;}function checkSpecial(d,b){obj_val=d;for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){alert(_checkspecial);return false;}}return true;
}function checkspecial(d,b){if(typeof(d)=="object"){obj_val=d.value;}else{obj_val=d;}for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){alert(_checkspecial);return false;}}return true;}function checkmailmobilespecial(f,e,b){var d=e;for(var a=0;a<d.length;a++){check_char=b.indexOf(d.charAt(a));
if(check_char>=0){if(f=="mail"){alert(_checkmailspecial);}else{alert(_checkmobilespecial);}return false;}}return true;}function checkspecialnomess(d,b){if(typeof(d)=="object"){obj_val=d.value;}else{obj_val=d;}for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){return false;
}}return true;}function clearformT(a){for(i=0;i<a.elements.length;i++){if(a[i].type=="text"){a[i].value="";}if(a[i].type=="password"){a[i].value="";}if(a[i].type=="radio"){a[i].checked=false;}}}function clearformTUserProfile(a){for(i=0;i<a.elements.length;i++){if(a[i].type=="text"){a[i].value="";}if(a[i].type=="password"){a[i].value="";
}if(a[i].type=="radio"){if(!a[i].name=="authentication"){a[i].checked=false;}}}}function checkCurrentDate(b,l,o){var h=b.substring(0,b.indexOf("/"));var j=b.substring(b.indexOf("/")+1);var r=j.substring(0,j.indexOf("/"));var m=j.substring(j.indexOf("/")+1);if(h<=9){h="0"+h;}if(r<=9){r="0"+r;}var b=m+h+r;
var e=l.substring(0,l.indexOf("/"));var k=l.substring(l.indexOf("/")+1);var n=k.substring(0,k.indexOf("/"));var g=k.substring(k.indexOf("/")+1);var s=g+e+n;var q=o.substring(0,o.indexOf("/"));var d=o.substring(o.indexOf("/")+1);var a=d.substring(0,d.indexOf("/"));var p=d.substring(d.indexOf("/")+1);var f=p+q+a;
if((s>b||f>b)){return true;}return false;}function checkdate(b,d){b=b.value;var e=b.split("-");d=d.value;assarray=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];dayarray=[31,29,31,30,31,30,31,31,30,31,30,31];count=0;flag=0;cmoncount=0;moncount=0;var a=d.indexOf("-");if(a==-1){alert(_checkdate);
return false;}else{dates=d.split("-");months=dates[1];months=months.toLowerCase();flag1=0;for(i=0;i<assarray.length;i++){if(assarray[i]==e[1]){cmonflag=i;break;}else{continue;}}for(i=0;i<assarray.length;i++){if(assarray[i]==months){flag=1;monflag=i;dayscheck=dayarray[count];break;}else{flag=0;continue;
}}if(flag!=1){flag1=1;alert(_checkmonth);return false;}days=dates[0];years=dates[2];leap=years%4;if(days>dayscheck||days<1){alert(_checkday);flag1=1;return false;}if(isNaN(days)){alert(_isNaN_day);flag1=1;return false;}if(isNaN(years)){alert(_isNaN_year);flag1=1;return false;}if(years<1997){alert(_isGreater_year);
flag1=1;return false;}if(months=="feb"&&leap==0&&days>29){alert(_isLeap_year);flag1=1;}if(months=="feb"&&leap>0&&days>28){alert(_isLeap_month);flag1=1;}}if(years>e[2]){alert(_checksal);return false;}else{if(years==e[2]&&monflag>cmonflag){alert(_checksal);return false;}else{if(years==e[2]&&monflag==cmonflag&&days>e[0]){alert(_checksal);
return false;}}}return true;}function check_decimal(a){num=a.value;numvals=num.split(".");if(!numvals[1]){return true;}if(numvals[1].length>2){alert(_check_decimal);return false;}return true;}function checkmultiplemailid(h){var j="";if(typeof(h)=="object"){j=h.value;}else{j=h;}var d=true;var b=j.split(",");
for(var f=0;f<b.length;f++){if(b[f]==""){d=false;return(d);}if(b[f].indexOf("@")>-1){if(!checkmailmobilespecial("mail",b[f],"`~!#$%^*()={}[]\\|?;\"'/<>")){d=false;return(d);}else{if(!checkmailspace(b[f])){d=false;return(d);}else{if(!checkmail(b[f],"@.")){d=false;return(d);}}}}else{if(!checkmailmobilespecial("mobile",b[f],"`~!@#$%^&*_={}[]:\\|?;\"'/<>.")){d=false;
return(d);}else{var e=b[f];var g="abcdefghijklmnoqrstuvwxyzABCDEFGHIJKLMNOQRSTUVWXYZ";for(var a=0;a<e.length;a++){check_char=g.indexOf(e.charAt(a));if(check_char>=0){alert(_checkmultiplemailid);d=false;return(d);}}}}}return(d);}function checkmail(f,e){obj_val=f;num=0;var a;for(var d=0;d<e.length;d++){check_char=obj_val.indexOf(e.charAt(d));
if(check_char<1){a=true;}}if(obj_val.charAt(check_char)=="."&&obj_val.charAt(--check_char)=="@"){a=true;}if(obj_val.charAt(0)=="."||obj_val.charAt(obj_val.length-1)=="."){a=true;}for(c=0;c<obj_val.length;c++){if(obj_val.charAt(c)=="@"){num++;}}if(num>1){a=true;}for(var b=0;b<obj_val.length;b++){if(obj_val.charAt(b)=="."&&obj_val.charAt(b+1)=="."){a=true;
}else{continue;}}if(a==true){alert(_checkmail);return false;}return true;}function checkmailid(f,e){if(typeof(f)=="object"){obj_val=f.value;}else{obj_val=f;}num=0;var a;for(var d=0;d<e.length;d++){check_char=obj_val.indexOf(e.charAt(d));if(check_char<1){a=true;}}if(obj_val.charAt(check_char)=="."&&obj_val.charAt(--check_char)=="@"){a=true;
}if(obj_val.charAt(0)=="."||obj_val.charAt(obj_val.length-1)=="."){a=true;}for(c=0;c<obj_val.length;c++){if(obj_val.charAt(c)=="@"){num++;}}if(num>1){a=true;}for(var b=0;b<obj_val.length;b++){if(obj_val.charAt(b)=="."&&obj_val.charAt(b+1)=="."){a=true;}else{continue;}}if(a==true){alert(_checkmail);return false;
}return true;}function validateIp(n){var q=n;var a=0;var g="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var b=false;var s=false;if(q.indexOf(":")>-1){b=true;}if(b){s=checkIPv6(q);return s;}else{for(var d=0;d<q.length;d++){check_char=g.indexOf(q.charAt(d));if(check_char>=0){alert(_checkAlpha);
return false;}}for(var h=0;h<q.length;h++){if(q.charAt(h)=="."&&q.charAt(h+1)=="."){alert(_checkIp);return false;}else{continue;}}for(var p=0;p<q.length;p++){if(q.charAt(p)=="."){a=a+1;}else{continue;}}if(a!=3){alert(_valIp);return false;}if(q.charAt(0)=="."||q.charAt(q.length-1)=="."){alert(_validateIp);
return false;}for(var o=0;o<q.length;o++){if(q.charAt(o)==" "){alert(_checkspaceIp);return false;}}var r="`~!@#$%^&*()-_+={}[]|\\:;\"'<>,?/";for(var h=0;h<q.length;h++){check_char=r.indexOf(q.charAt(h));if(check_char!=-1){alert(_checkspecial);return false;}}if(q.indexOf(".")>-1&&a>2){var f=q.split(".");
for(var e=0;e<f.length;e++){if(f[e]<0||f[e]>255){alert(_checknum);return false;}}}return true;}}function validateIpOrHName(o){var r=o;var a=0;var b=false;var d=false;var h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";if(r.indexOf(":")>-1){d=true;}if(d){result=checkIPv6(r);return result;}else{for(var e=0;
e<r.length;e++){check_char=h.indexOf(r.charAt(e));if(check_char>=0){b=true;}}if(!b){for(var n=0;n<r.length;n++){if(r.charAt(n)=="."&&r.charAt(n+1)=="."){alert(_checkIp);return false;}else{continue;}}for(var q=0;q<r.length;q++){if(r.charAt(q)=="."){a=a+1;}else{continue;}}if(a!=3){alert(_valIp);return false;
}if(r.charAt(0)=="."||r.charAt(r.length-1)=="."){alert(_validateIp);return false;}}for(var p=0;p<r.length;p++){if(r.charAt(p)==" "){alert(_checkspaceIp);return false;}}var s="`~!@#$%^&*()_+={}[]|\\:;\"'<>,?/";for(var n=0;n<r.length;n++){check_char=s.indexOf(r.charAt(n));if(check_char>=1){alert(_checkspecial);
return false;}}if(r.indexOf(".")>-1&&a>2){var g=r.split(".");for(var f=0;f<g.length;f++){if(g[f]<0||g[f]>255){alert(_checknum);return false;}}}return true;}}function checkTime(n,j,t,b,g,a){var t=t.value;var b=b.value;var g=g.value;var a=a.value;var v=t.length;if(v==1){t="0"+t;}var p=b.length;if(p==1){b="0"+b;
}var s=g.length;if(s==1){g="0"+g;}var o=a.length;if(o==1){a="0"+a;}var e=n.substring(0,n.indexOf("/"));var k=n.substring(n.indexOf("/")+1);var f=k.substring(0,k.indexOf("/"));var l=k.substring(k.indexOf("/")+1);var u=l+e+f+t+g;var q=j.substring(0,j.indexOf("/"));var h=j.substring(j.indexOf("/")+1);var r=h.substring(0,h.indexOf("/"));
var d=h.substring(h.indexOf("/")+1);var m=d+q+r+b+a;if(u>m||u==m){return false;}else{return true;}return true;}function checkExtTime(n,j,t,b,g,a){var t=t;var b=b;var g=g;var a=a;var v=t.length;if(v==1){t="0"+t;}var p=b.length;if(p==1){b="0"+b;}var s=g.length;if(s==1){g="0"+g;}var o=a.length;if(o==1){a="0"+a;
}var e=n.substring(0,n.indexOf("/"));var k=n.substring(n.indexOf("/")+1);var f=k.substring(0,k.indexOf("/"));var l=k.substring(k.indexOf("/")+1);var u=l+e+f+t+g;var q=j.substring(0,j.indexOf("/"));var h=j.substring(j.indexOf("/")+1);var r=h.substring(0,h.indexOf("/"));var d=h.substring(h.indexOf("/")+1);
var m=d+q+r+b+a;if(u>m||u==m){return false;}else{return true;}return true;}function checkUserValidityTime(n,j,t,b,g,a){var t=t;var b=b;var g=g;var a=a;var v=t.length;if(v==1){t="0"+t;}var p=b.length;if(p==1){b="0"+b;}var s=g.length;if(s==1){g="0"+g;}var o=a.length;if(o==1){a="0"+a;}var e=n.substring(0,n.indexOf("/"));
var k=n.substring(n.indexOf("/")+1);var f=k.substring(0,k.indexOf("/"));var l=k.substring(k.indexOf("/")+1);var u=l+e+f+t+g;var q=j.substring(0,j.indexOf("/"));var h=j.substring(j.indexOf("/")+1);var r=h.substring(0,h.indexOf("/"));var d=h.substring(h.indexOf("/")+1);var m=d+q+r+b+a;if(u>m||u==m){return false;
}else{return true;}return true;}function validateMailHost(e){var g=e;var a=0;var n="0123456789";var m="";var k=false;for(var h=0;h<g.length;h++){if(g.charAt(h)=="."){a=a+1;}else{continue;}}for(var f=0;f<g.length;f++){m=n.indexOf(g.charAt(f));if(m>=0){k=true;}else{k=false;}}if(k){if(a!=3){alert(_validateMailHost);
return false;}}else{if(a!=2){alert(_validateMailHost);return false;}}if(g.indexOf(".")>-1&&a>2){var d=g.split(".");for(var b=0;b<d.length;b++){if(d[b]<0||d[b]>255){alert(_checknum);return false;}}}return true;}function checkAlpha(a){var d="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var b=0;
b<a.length;b++){if(d.indexOf(a.charAt(b))>-1){return true;}}return false;}function checkDigit(a){var d="0123456789";for(var b=0;b<a.length;b++){if(d.indexOf(a.charAt(b))>-1){return true;}}return false;}function checkDots(a){var d=0;for(var b=0;b<a.length;b++){if(a.charAt(b)=="."){d++;}}if(d==3){return false;
}return true;}function isValidHostName(b){var a=false;if(checkDots(b)){if(checkDigit(b)){a=true;}else{if(checkAlpha(b)){a=true;}}}else{if(checkAlpha(b)){a=true;}else{a=false;}}return a;}function checkspecialpass(d){obj_val=d.value;var b="'\"}~|#";for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));
if(check_char>=0){alert(_checkspecial);return false;}}return true;}function checkSpecialpwd(d){obj_val=d.value;var b="'\"}~|";for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){alert(_checkspecial);return false;}}return true;}function checkForValidSpecial(a){var d="`!@%^&*()+={[]\\;<>,?/";
for(var b=0;b<a.length;b++){if(d.indexOf(a.charAt(b))>-1){return true;}}return false;}function checkForPassValidity(a){var b=a;if(b.indexOf(":")>-1){if(checkAlpha(b)||checkForValidSpecial(b)){return true;}alert(_checkForPassValidity);return false;}return true;}function checkloginpass(d){if(typeof(d)=="object"){obj_val=d.value;
}else{obj_val=d;}var b='"';for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){alert(_checkspecial);return false;}}return true;}function checkForNameWithEx(d){var b=d.length;var a=b-3;var e=d.substring(a,b+1);if(e=="_ex"){if(d.charAt(0)=="_"){return false;}else{return true;
}}else{return false;}}function checkForNameWithSuffix(d,e){if(d.charAt(0)=="_"){return false;}var b=d.length;var a=b-e.length;var f=d.substring(a);if(f==e){return true;}else{return false;}}function getPdf(d){var a="";if(location.protocol=="https:"){a="/final/blank.html";}var b=parent.openWindow(a,"SaveWindow","width=400,height=150,left=300,top=200,scrollbars=no,resizable=no");
b.document.write("<html>");b.document.write("<title>Downloading</title>");b.document.write("<frameset rows= '0%,0%,*' frameborter='NO' border='0' framespacing='0'>");b.document.write("<frame src='/final/servlet/com.eg.EgPdfController' frameborder=0 noresize scrolling=no name='Data'>");b.document.write("<frame src='/final/reporter/ErSaveStatus.jsp' frameborder=0 noresize scrolling=auto>");
b.document.write("<frame src='"+a+"' frameborder=0 noresize scrolling=auto name='statusPanel'>");b.document.write("</frameset>");b.document.write("</html>");b.frames[2].document.open("text/html","replace");b.frames[2].document.write("<html><head>");b.frames[2].document.write('<link rel="stylesheet" href="/final/admin/eg_styles/adminstyle_'+d+'.css" />');
b.frames[2].document.write('</head><body id="eg_morelight"><br><br><h4 align="center" style="font-family: Verdana,Arial; font-size: 15px; color: #000000;"><img src="/final/reporter/images/load_round.gif"><br><br>Downloading! Please wait...</h4></body></html>');b.frames[2].document.close();}function trim(d){d=d.toString();
var b=/[^\s].*[^\s]/;var a=d.match(b);return a;}function validateEmail(a){var d=/(([\+]?([0-9]){4,15})|([\_\#]?([a-zA-Z0-9]+[\ \_\.\-\&\#]?)*[a-zA-Z0-9])+)\@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]/g;if(a!=""){a=trim(a)+"";var b=a.match(d);if(b==null||b!=a){return false;}return true;
}else{return false;}}function validateSingleByte(b){for(var d=0;d<b.length;d++){var a=b.charCodeAt(d);if(a>255){return false;}}return true;}function commonValidations(b){var h=b;var g=".0123456789";for(var e=0;e<h.length;e++){if(h.charAt(e)=="."&&h.charAt(e+1)=="."){alert(_checkIp);return false;}else{continue;
}}if(h.charAt(0)=="."||h.charAt(h.length-1)=="."){alert(_validateHostDot);return false;}if(h.charAt(0)=="_"||h.charAt(h.length-1)=="_"){alert(_validateHostUScore);return false;}if(h.charAt(0)=="-"||h.charAt(h.length-1)=="-"){alert(_validateHostHypen);return false;}for(var f=0;f<h.length;f++){if(h.charAt(f)==" "||h.charAt(f)=="\t"){alert(_checkspaceIp);
return false;}}var d=true;for(var a=0;a<h.length;a++){check_char=g.indexOf(h.charAt(a));if(check_char==-1){d=false;break;}}if(d){return validateIpAddress(h);}return true;}function validateIpAddress(n){var r=n;var a=0;var s=".0123456789";var b=false;var f="ghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYZ";var p="`~!@#$^&*()-_+={}[]|\\;\"'<>,?";
if(r.indexOf(":")>-1){b=true;}if(b){for(var d=0;d<r.length;d++){check_char=f.indexOf(r.charAt(d));if(check_char>=0){alert(_checkAlpha);return false;}}for(var h=0;h<r.length;h++){check_char=p.indexOf(r.charAt(h));if(check_char!=-1){alert(_checkspecial);return false;}}}else{for(var h=0;h<r.length;h++){if(r.charAt(h)=="."&&r.charAt(h+1)=="."){alert(_checkIp);
return false;}else{continue;}}for(var q=0;q<r.length;q++){if(r.charAt(q)=="."){a=a+1;}else{continue;}}if(a!=3){alert(_valIp);return false;}if(r.charAt(0)=="."||r.charAt(r.length-1)=="."){alert(_validateIp);return false;}for(var o=0;o<r.length;o++){if(r.charAt(o)==" "){alert(_checkspaceIp);return false;
}}if(r.indexOf(".")>-1&&a>2){var g=r.split(".");for(var e=0;e<g.length;e++){if(g[e]<0||g[e]>255){alert(_checknum);return false;}}}for(var d=0;d<r.length;d++){check_char=s.indexOf(r.charAt(d));if(check_char==-1){alert(_valIp);return false;}}}return true;}function checkKeywords(e,b){var d;if(typeof(e)=="object"){d=e.value;
}else{d=e;}d=trim(d);d=d+"";d=d.toLowerCase();for(i=0;i<b.length;i++){var a=b[i].toLowerCase();if(a==d){return false;}}return true;}function replaceParam(b,d,h){var g="";var f=b.indexOf(d);if(f>-1){g=b.substring(0,f)+d;var e=b.substring(f+d.length,b.length);var a=e.indexOf("&");if(a>=0){e=e.substring(a,e.length);
}else{e="";}if(e.length==0){g+=h;}else{g+=h+e;}}else{g=b+d+h;}return g;}function checkDomain(j,g){var d=j.length;if(d==1&&j.indexOf(".")==0){return true;}if(j.indexOf("..")>-1){alert(_checkdots);return false;}else{if(j.indexOf(".")>-1){if(j.charAt(d-1)=="."){alert(_domainPeriod);return false;}}}var b=" !\"#$&()*+':;<=>?@[]^'{|}~";
if(g=="false"){b=b+",";}var a="0123456789";var h=0;for(var e=0;e<d;e++){var f=j.charAt(e);if(b.indexOf(f)>-1){alert(_checkspecial);return false;}else{if(a.indexOf(f)>-1){h=h+1;}}}if(h==d){alert(_aplhabets);return false;}else{return true;}}function nonNumeric(g){var e=g.length;var a="0123456789";var f=0;
for(var b=0;b<e;b++){var d=g.charAt(b);if(a.indexOf(d)>-1){f=f+1;}}if(f==e){alert(_aplhabets);return false;}else{return true;}}function checkNonNumericals(g){var a="0123456789";var f=0;var b=g.length;for(var d=0;d<b;d++){var e=g.charAt(d);if(a.indexOf(e)>-1){f=f+1;}}if(f==b){return false;}else{return true;
}}function checkIp(o){var s=o;var a=0;var n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var t="success";var b=false;var f="ghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYZ";var q="`~!@#$^&*()-_+={}[]|\\;\"'<>,?";if(s.indexOf(":")>-1){b=true;}if(b){for(var d=0;d<s.length;d++){check_char=f.indexOf(s.charAt(d));
if(check_char>=0){t="_checkAlpha";break;}}for(var h=0;h<s.length;h++){check_char=q.indexOf(s.charAt(h));if(check_char!=-1){t="_checkspecial";break;}}}else{for(var d=0;d<s.length;d++){check_char=n.indexOf(s.charAt(d));if(check_char>=0){t="_checkAlpha";break;}}for(var h=0;h<s.length;h++){if(s.charAt(h)=="."&&s.charAt(h+1)=="."){t="_checkIp";
break;}else{continue;}}for(var r=0;r<s.length;r++){if(s.charAt(r)=="."){a=a+1;}else{continue;}}if(a!=3){t="_valIp";}if(s.charAt(0)=="."||s.charAt(s.length-1)=="."){t="_validateIp";}for(var p=0;p<s.length;p++){if(s.charAt(p)==" "){t="_checkspaceIp";break;}}var u="`~!@#$%^&*()-_+={}[]|\\:;\"'<>,?/";for(var h=0;
h<s.length;h++){check_char=u.indexOf(s.charAt(h));if(check_char!=-1){t="_checkspecial";break;}}if(s.indexOf(".")>-1&&a>2){var g=s.split(".");for(var e=0;e<g.length;e++){if(g[e]<0||g[e]>255){t="_checknum";break;}}}}return t;}function checkSpecialChars(d,a){for(var b=0;b<d.length;b++){check_char=a.indexOf(d.charAt(b));
if(check_char>=0){return false;}}return true;}function trimStrValue(a){while(a.substring(0,1)==" "){a=a.substring(1,a.length);}while(a.substring(a.length-1,a.length)==" "){a=a.substring(0,a.length-1);}return a;}function checkNumbers(e){var a="0123456789";var f="false";for(var b=0;b<e.length;b++){var d=e.charAt(b);
if(a.indexOf(d)==-1){f="true";break;}}if(f=="true"){return false;}else{return true;}}function checkHyphenValue(d,e){if(d=="recordpattern"||d=="process"||d=="exclude"||d=="content"||d=="servicename"){return true;}var a=true;if(e.charAt(0)=="-"||e.charAt(e.length-1)=="-"){alert(_checkhyphen);a=false;}else{for(var b=0;
b<e.length;b++){if(e.charAt(b)=="-"){if(e.charAt(b+1)==" "||e.charAt(b-1)==" "){alert(_valhyphen);a=false;break;}}}}return a;}function checkNumberValue(f,h){object_value=h;var a="";if(f=="+"){a=" .+0123456789";}else{a=" .+-0123456789";}var g=" .0123456789";var j;var e=false;var k=false;var b=false;j=a.indexOf(object_value.charAt(0));
if(j==1){e=true;}else{if(j<1){return false;}}for(var d=1;d<object_value.length;d++){j=g.indexOf(object_value.charAt(d));if(j<0){return false;}else{if(j==1){if(e){return false;}else{e=true;}}else{if(j==0){if(e||b){k=true;}}else{if(k){return false;}else{b=true;}}}}}return true;}function checkDecimalValue(b){var a=b;
if(a.indexOf(".")>-1){alert(_checkfordecimal);return false;}return true;}function checkForAlphabets(f){var b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var a="false";for(var d=0;d<f.length;d++){var e=f.charAt(d);if(b.indexOf(e)==-1){a="true";break;}}if(a=="true"){return false;}else{return true;
}}function DDFreqCheck(f){var a="0123456789:";var g="false";var b="false";for(var d=0;d<f.length;d++){var e=f.charAt(d);if(a.indexOf(e)==-1){g="true";break;}if(b=="true"){if(e==":"){g="true";break;}}if(e==":"){b="true";}}if(g=="true"){return false;}else{if(f.indexOf(":")==-1||f.indexOf(":")==0||f.indexOf(":")==f.length-1){return false;
}else{return true;}}}function checkUrl(b){var a=/^(http|ftp|https)\:(\\\\|\/\/)([A-Za-z0-9]+(\.)*[A-Za-z0-9]*)+/;if(a.test(b)){return true;}else{return false;}}function checkFloatingNumbers(e){var a="0123456789.";var f="false";for(var b=0;b<e.length;b++){var d=e.charAt(b);if(a.indexOf(d)==-1){f="true";
break;}}if(f=="true"){return false;}else{return true;}}function checkCommaValue(a){if(a.indexOf(",")>-1){if(a.charAt(0)==","||a.charAt(a.length-1)==","){return false;}}return true;}function checkDotValue(a){var d=a;if(d.charAt(0)=="."||d.charAt(d.length-1)=="."){alert(_checkHost);return false;}else{for(var b=0;
b<d.length;b++){if(d.charAt(b)=="."&&d.charAt(b+1)=="."){alert(_checkdots);return false;}else{continue;}}}return true;}function processValueValidation(d){if(!checkSpecialChars(d,"`|<>~@#%^&\"'")){alert(_checkspecial);return false;}if((d.indexOf(",")>-1)||(d.indexOf(",")==-1)){var a=true;}while(d.indexOf(",")>-1){var e=d.substring(0,d.indexOf(","));
d=d.substring(d.indexOf(",")+1,d.length);var g=e.length;if(e.indexOf(":")==-1){alert(_processvalidation);return false;}else{if(e.charAt(0)==":"||e.charAt(g-1)==":"){alert(_processvalidation);return false;}}if(e.charAt(e.length-1)=="*"&&e.charAt(e.length-2)==":"){alert("Please enter in this format processName:processPattern.");
return false;}else{for(var f=0;f<e.length;f++){if(d.charAt(f)=="*"&&d.charAt(f+1)=="*"){alert(__checkprocessvalidation);return false;}}}}var b=d.length;if(d.indexOf(":")==-1){alert(_processvalidation);return false;}else{if(d.charAt(0)==":"||d.charAt(b-1)==":"){alert(_processvalidation);return false;}}if(d.charAt(d.length-1)=="*"&&d.charAt(d.length-2)==":"){alert("Please enter in this format processName:processPattern.");
return false;}else{for(var f=0;f<d.length;f++){if(d.charAt(f)=="*"&&d.charAt(f+1)=="*"){alert(__checkprocessvalidation);return false;}}}return true;}function icTestParamValidation(e,d,a){e=trimStrValue(e);d=trimStrValue(d);var g=e.toLowerCase();var j=d.toLowerCase();var o=true;if(a!="Snmp"&&a!="Custom"&&(g=="snmpport"||g=="snmpversion"||g=="snmpcommunity")){o=false;
}else{if(j==""){alert(_checkempty);o=false;}else{if(j=="$unconfigured"){alert(_tcKeyword);o=false;}else{if(g!="servicename"&&g!="snmpcommunity"&&g!="process"&&g!="targetdirs"&&g!="user"&&g!="admin_user"&&g!="esx_user"&&g!="object_name"&&j.indexOf("$")>-1){alert(_checkspecial);o=false;}else{if(g=="user"||g=="admin_user"||g=="esx_user"||g=="xen_user"||g=="xen_pool_user"||g=="console_user"||g=="username"||g=="userNames"||g=="proxyusername"||g=="hmc_user"){if(!checkSpecialChars(j,"@*+=|:;\"'<>/[]?,")){alert(_checkspecial);
o=false;}else{if(j.indexOf("..")>-1){alert(_checkdots);o=false;}else{if(j.indexOf("  ")>-1){alert(_checkSpaces);o=false;}}}}else{if(g=="domain"){if(!checkDomain(j,"false")){o=false;}}else{if(g=="snmpcommunity"){if(j.indexOf('"')>-1||j.indexOf("|")>-1){alert(_snmpcomma);o=false;}}else{if((g=="elapsed_time"||g=="webport")&&!checkNumbers(j)){alert(_checkfordecimal);
o=false;}else{if(g=="object_name"&&!checkSpecialChars(j,"`~!@%^&*()+=-{}[]|:;\"'<>?/\\")){alert(_checkforobjectname);o=false;}else{if((g=="database"||g=="instance")&&!checkSpecialChars(j,",")){alert(_checkspecial);o=false;}else{if(g=="packetsize"||g=="packetcount"||g=="timeout"||g=="webserverport"||g=="receiveport"||g=="adminport"||g=="targetport"||(g=="jmx_remote_port"&&j!="unconfigured")||g=="appport"||g=="connectorport"||g=="uploadsize"||g=="downloadsize"){if(!checkNumberValue("+",j)||j==0){alert(_checkInt);
o=false;}else{if(!checkDecimalValue(j)){o=false;}}}else{if(g=="snmpport"||g=="proxyport"){if(j!="none"){if(!checkNumberValue("+",j)||j==0){alert(_valInt);o=false;}else{if(!checkDecimalValue(j)){o=false;}}}}else{if(g=="port"){if(j!="null"){if(!checkNumberValue("+",j)||j==0){alert(_checkport);o=false;}else{if(j>99999){alert(_validatePort);
o=false;}else{if(!checkDecimalValue(j)){o=false;}}}}}else{if(g=="duration"){if(!checkNumberValue("+",j)){alert(_checkInt);o=false;}if(!checkDecimalValue(j)){o=false;}}else{if(g=="logtype"&&!checkForAlphabets(j.replace(/ /g,""))){alert(_alphabetsOnly);o=false;}else{if(g=="ddfreq"&&!DDFreqCheck(j)){alert(_validDDPattern);
o=false;}else{if(g=="fromid"||g=="toid"){var h=/([a-zA-Z0-9]+[\_\.]?)*[a-zA-Z0-9]\@[a-zA-Z0-9]+\.([a-zA-z0-9]{3}|[a-zA-z0-9]{2}\.[a-zA-z0-9]{2})/g;var p=j.match(h);if(p==null||p!=j){alert(_checkmail);o=false;}}else{if(g=="url"){if(j.indexOf(":")==-1){alert(_invalidUrl);o=false;}else{if(j.charAt(0)==","||j.charAt(j.length-1)==","||j.indexOf(",,")>-1){alert(_invalidUrl);
o=false;}else{if(!checkUrl(j)){alert(_invalidUrl);o=false;}}}}else{if(g=="websites"){if(!checkSpecialChars(j,"\\/?;:@&-+$|'<>\"")){alert(_invalidWebsite);o=false;}else{if(j.charAt(0)==","||j.charAt(j.length-1)==","||j.indexOf(",,")>-1){alert(_invalidWebsite);o=false;}}}else{if(g=="servername"||g=="server"){if(!checkSpecialChars(j,"`~!@#$%^&*()+={}[]|:;,\"'<>?/\\")){alert(_checkspecial);
o=false;}}else{if(g=="homedir"||g=="weblogicjarlocation"){if(!checkSpecialChars(j,"*?\"'<>|")){alert(_checkspecial);o=false;}}else{if(g=="version"){if(j!="none"){if(!checkFloatingNumbers(j)){alert(_invalidVersion);o=false;}else{if(j.indexOf("..")>-1){alert(_invalidVersion);o=false;}}}}else{if(g=="hmc_server"){if(!validateIp(j)){o=false;
}}else{if((g=="filepath"||g=="navisecclipath")&&!checkSpecialChars(j,'*?<>|"')){alert(_checkspecial);o=false;}else{if((g=="xen_ps_console_file_path"||g=="java_home"||g=="citrixhome")&&!checkSpecialChars(j,"`!#^&+={}[]|\"'<>?")){alert(_checkspecial);o=false;}else{if(g=="recordpattern"&&!checkSpecialChars(j,"`!#^&()+[]|'?")){alert(_checkspecial);
o=false;}else{if(g=="script"&&!checkSpecialChars(j,"`!#^&()+{}[]|\"'<>?")){alert(_checkspecial);o=false;}else{if((g=="hostd_patterns"||g=="messages_patterns")&&!checkSpecialChars(j,"`!#^&()+{}|\"'<>?")){alert(_checkspecial);o=false;}else{if(g=="proxyhost"||g=="targets"||g=="host"||g=="receivehost"||g=="eventhost"){if(g=="host"||g=="proxyhost"||g=="receivehost"||g=="eventhost"){var l="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var f="";var n=false;for(var b=0;b<j.length;b++){f=l.indexOf(j.charAt(b));if(f>=1){n=true;break;}}if(n){if(!checkspace(j)){o=false;}if(!checkDotValue(j)){o=false;}}else{if(!validateIp(j)){o=false;}}if(!checkSpecialChars(j,"`~!@#%^&*()+={}[]|\\;\"'<>,?/")||j.indexOf("$")>0){alert(_checkspecial);o=false;
}}else{if(g=="targets"&&!checkspace(j)){o=false;}else{if(!checkSpecialChars(j,"`~!@#%^&*()-+={}[]|\\;\"'<>,?")||j.indexOf("$")>0){alert(_checkspecial);o=false;}}}}else{if(g=="logfile"){if(!checkSpecialChars(j,"`~!#%^&*()+{}[]|;\"'<>?")||j.indexOf("$")>0){alert(_checkspecial);o=false;}}else{if(g=="process"){if(j.indexOf(":")==-1){if(j!="none"&&j!="(eg_runtime)"){var k=j.replace(/~/g,"");
if(!processValueValidation(k)){o=false;}}}}else{if(g=="pidfile"){if(!checkspace(j)){o=false;}else{if(j.toUpperCase()!="NONE"){if(!processValueValidation(j)){o=false;}}}}else{if(g=="content"){if(j.indexOf(":")==-1){alert(_contentvalidation);o=false;}}else{if(g=="search"){if(!checkSpecialChars(j,"`~!@#%^&*()+-{}[]|:;\"'<>?")||j.indexOf("$")>0){alert(_checkspecial);
o=false;}if(!checkCommaValue(j)){alert(_checkcomma);o=false;}}else{if(g=="senduser"){if(!checkSpecialChars(j,"*+=[]|:;\"'<>,/?")){alert(_checkspecial);o=false;}}else{if(g=="receiveuser"){if(!checkSpecialChars(j,"*+=[]|:;\"'<>,/?")){alert(_checkspecial);o=false;}}else{if(g=="eventsrc"){if(!checkSpecialChars(j,"`~!#%^&*()={}[]|\\:;\"'<>?/")||j.indexOf("$")>0){alert(_checkspecial);
o=false;}else{if(!checkCommaValue(j)){alert(_checkcomma);o=false;}}}else{if(g=="command"){if(!(j=="get"||j=="post")){alert(_checkMethod);o=false;}}else{if(g=="cmd"){if(!(j=="get"||j=="put")){alert(_valMethod);o=false;}}else{if(g=="protocol"){if(!(j=="imap"||j=="pop3")){alert(_validProtocol);o=false;}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return o;
}function validateHostField(d){if(d.indexOf(":")!=-1){return checkIPv6(d);}else{if(d.indexOf(".")==-1){return validateHName(d);}else{var b=d.split(".");var a=d.substring(0,d.indexOf("."));if(b.length==4&&checkNumbers(a)){return validateIpAddress(d);}else{return validateHName(d);}}}}function validateHName(h){var j=h;
var a=0;var b=false;var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";if(!validateSingleByte(j)){return false;}else{if(!commonValidations(j)){return false;}}var m="`~!@#$%^&*()+={}[]|\\:;\"'<>,?/";for(var g=0;g<j.length;g++){check_char=m.indexOf(j.charAt(g));if(check_char>=1){alert(_checkspecial);
return false;}}if(j.indexOf(".")!=-1){var f=j.split(".");for(var d=0;d<f.length;d++){if(d==0){if(checkNumbers(f[d])){alert(_checkNumberLabel);return false;}}if(f.length>3&&d==f.length-1){if(checkUnderscore(f[d])){alert(_checkspecial);return false;}}else{if(d==f.length-1){if(checkUnderscore(f[d])){alert(_checkspecial);
return false;}}}}}else{if(checkNumbers(j)){alert(_checkNumberLabel);return false;}}return true;}function checkIPv6(d){if(!checkspecialnomess(d,"`~!@#%^&*()+={}[]|\\;\"'<>,?")){alert(_checkspecial);return false;}if(!checkspace(d)){return false;}var m=/[\.]{2,}/;var j=/(^(\.){1,})|((\.){1,}$)/gi;var g=/(\.\:){1,}|(\:\.){1,}/;
if(d.match(m)!=null||d.match(g)!=null){alert(_chkIpv6);return false;}if(d.match(j)!=null){alert(_validateIp);return false;}var w=/[\:]{2,}/g;var s=d.match(w);if(s!=null&&s!="::"){alert(_doubleColon);return false;}var p=d.split(":");var t=p.length;t--;var n,h;h=d;if(p.length<=7&&d.indexOf(".")!=-1){var k=d.split(".");
var f=k.length;f--;n=d.substring((d.lastIndexOf(":")+1));h=d.substring(0,(d.lastIndexOf(":")));var b=/[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}((\/){1}[0-9]{1,3})*$/gi;regIp4Res=d.match(b);if(regIp4Res==null||regIp4Res!=n){alert(_valIp);return false;}if(h.indexOf(".")!=-1){alert(_checkIp);
return false;}if((f>3)||(f!=3)){alert(_valIp);return false;}var a=n.split("/");n=a[0];var v=n.split(".");for(var u=0;u<v.length;u++){if(v[u]<0||v[u]>255){alert(_checknum);return false;}}}else{if((t>7)||(s!="::")&&(t<7)){alert(_grpIpv6);return false;}}var a=h.split("/");h=a[0];var q="";var x=/^(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1}((\:){1,2}[a-z0-9]{0,4}){1,})|(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1})$/gi;
var r=h.match(x);x=/^[a-f0-9]{0,4}$/gi;if(h.indexOf(":")==-1){q=h.match(x);}if(((r==null)||(r!=h))&&(q!=h)){alert(_digitIpv6);return false;}var o=/(::){0,1}([a-f0-9(::)(\.)]*[\:]{1})+[a-f(::)(\.)0-9]*((\/){0,1}[0-9]{1,3})*/ig;var e=d.match(o);if(e==null||e!=d){alert(_validateIpv6);return false;}return true;
}function checkUnderscore(d){obj_val=d;var b="_";for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){return true;}}return false;}function checkDateTime(n,j,t,b,g,a){var v=t.length;if(v==1){t="0"+t;}var p=b.length;if(p==1){b="0"+b;}var s=g.length;if(s==1){g="0"+g;
}var o=a.length;if(o==1){a="0"+a;}var e=n.substring(0,n.indexOf("/"));var k=n.substring(n.indexOf("/")+1);var f=k.substring(0,k.indexOf("/"));var l=k.substring(k.indexOf("/")+1);var u=l+e+f+t+g;var q=j.substring(0,j.indexOf("/"));var h=j.substring(j.indexOf("/")+1);var r=h.substring(0,h.indexOf("/"));
var d=h.substring(h.indexOf("/")+1);var m=d+q+r+b+a;if(u>m||u==m){return false;}else{return true;}return true;}function commonValidationsExtjs(b){var l=b;var h="";var g=".0123456789";for(var e=0;e<l.length;e++){if(l.charAt(e)=="."&&l.charAt(e+1)=="."){h="1";return h;}else{continue;}}if(l.charAt(0)=="."||l.charAt(l.length-1)=="."){h="2";
return h;}if(l.charAt(0)=="_"||l.charAt(l.length-1)=="_"){h="3";return h;}if(l.charAt(0)=="-"||l.charAt(l.length-1)=="-"){h="4";return h;}for(var f=0;f<l.length;f++){if(l.charAt(f)==" "){h="5";return h;}}var d=true;for(var a=0;a<l.length;a++){check_char=g.indexOf(l.charAt(a));if(check_char==-1){d=false;
break;}}if(d){return validateIpAddressExtjs(l);}return"0";}function validateIpAddressExtjs(o){var s=o;var a=0;var b="";var t=".0123456789";var d=false;var g="ghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYZ";var q="`~!@#$^&*()-_+={}[]|\\;\"'<>,?";if(s.indexOf(":")>-1){d=true;}if(d){for(var e=0;e<s.length;e++){check_char=g.indexOf(s.charAt(e));
if(check_char>=0){b="6";return b;}}for(var n=0;n<s.length;n++){check_char=q.indexOf(s.charAt(n));if(check_char!=-1){b="7";return b;}}}else{for(var n=0;n<s.length;n++){if(s.charAt(n)=="."&&s.charAt(n+1)=="."){b="1";return b;}else{continue;}}for(var r=0;r<s.length;r++){if(s.charAt(r)=="."){a=a+1;}else{continue;
}}if(a!=3){b="8";return b;}if(s.charAt(0)=="."||s.charAt(s.length-1)=="."){b="9";return b;}for(var p=0;p<s.length;p++){if(s.charAt(p)==" "){b="5";return b;}}if(s.indexOf(".")>-1&&a>2){var h=s.split(".");for(var f=0;f<h.length;f++){if(h[f]<0||h[f]>255){b="10";return b;}}}for(var e=0;e<s.length;e++){check_char=t.indexOf(s.charAt(e));
if(check_char==-1){b="8";return b;}}}return"0";}function validateIpExtjs(o){var r=o;var a=0;var b="";var n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var d=false;var t=false;if(r.indexOf(":")>-1){d=true;}if(d){t=checkIPv6Extjs(r);return t;}else{for(var e=0;e<r.length;e++){check_char=n.indexOf(r.charAt(e));
if(check_char>=0){b="6";return b;}}for(var h=0;h<r.length;h++){if(r.charAt(h)=="."&&r.charAt(h+1)=="."){b="1";return b;}else{continue;}}for(var q=0;q<r.length;q++){if(r.charAt(q)=="."){a=a+1;}else{continue;}}if(a!=3){b="8";return b;}if(r.charAt(0)=="."||r.charAt(r.length-1)=="."){b="9";return b;}for(var p=0;
p<r.length;p++){if(r.charAt(p)==" "){b="5";return b;}}var s="`~!@#$%^&*()-_+={}[]|\\:;\"'<>,?/";for(var h=0;h<r.length;h++){check_char=s.indexOf(r.charAt(h));if(check_char!=-1){b="7";return b;}}if(r.indexOf(".")>-1&&a>2){var g=r.split(".");for(var f=0;f<g.length;f++){if(g[f]<0||g[f]>255){b="10";return b;
}}}}return"0";}function checkIPv6Extjs(d){var x="";if(!checkspecialnomess(d,"`~!@#%^&*()+={}[]|\\;\"'<>,?")){x="7";return x;}if(checkspaceExtjs(d)!="0"){x="17";return x;}var m=/[\.]{2,}/;var j=/(^(\.){1,})|((\.){1,}$)/gi;var g=/(\.\:){1,}|(\:\.){1,}/;if(d.match(m)!=null||d.match(g)!=null){x="11";return x;
}if(d.match(j)!=null){x="9";return x;}var w=/[\:]{2,}/g;var s=d.match(w);if(s!=null&&s!="::"){x="12";return x;}var p=d.split(":");var t=p.length;t--;var n,h;h=d;if(p.length<=7&&d.indexOf(".")!=-1){var k=d.split(".");var f=k.length;f--;n=d.substring((d.lastIndexOf(":")+1));h=d.substring(0,(d.lastIndexOf(":")));
var b=/[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}((\/){1}[0-9]{1,3})*$/gi;regIp4Res=d.match(b);if(regIp4Res==null||regIp4Res!=n){x="8";return x;}if(h.indexOf(".")!=-1){x="1";return x;}if((f>3)||(f!=3)){x="8";return x;}var a=n.split("/");n=a[0];var v=n.split(".");for(var u=0;u<v.length;
u++){if(v[u]<0||v[u]>255){x="10";return x;}}}else{if((t>7)||(s!="::")&&(t<7)){x="13";return x;}}var a=h.split("/");h=a[0];var q="";var y=/^(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1}((\:){1,2}[a-z0-9]{0,4}){1,})|(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1})$/gi;var r=h.match(y);y=/^[a-f0-9]{0,4}$/gi;
if(h.indexOf(":")==-1){q=h.match(y);}if(((r==null)||(r!=h))&&(q!=h)){x="14";return x;}var o=/(::){0,1}([a-f0-9(::)(\.)]*[\:]{1})+[a-f(::)(\.)0-9]*((\/){0,1}[0-9]{1,3})*/ig;var e=d.match(o);if(e==null||e!=d){x="15";return x;}return"0";}function validateHostFieldExtjs(d){if(d.indexOf(":")!=-1){return checkIPv6Extjs(d);
}else{if(d.indexOf(".")==-1){return validateHNameExtjs(d);}else{var b=d.split(".");var a=d.substring(0,d.indexOf("."));if(b.length==4&&checkNumbers(a)){return validateIpAddressExtjs(d);}else{return validateHNameExtjs(d);}}}return"0";}function validateHNameExtjs(j){var m=j;var a=0;var d="";var b=false;
var g="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";if(!validateSingleByte(m)){return false;}else{if(!commonValidationsExtjs(m)){return false;}}var n="`~!@#$%^&*()+={}[]|\\:;\"'<>,?/";for(var h=0;h<m.length;h++){check_char=n.indexOf(m.charAt(h));if(check_char>=1){d="7";return d;}}if(m.indexOf(".")!=-1){var f=m.split(".");
for(var e=0;e<f.length;e++){if(e==0){if(checkNumbers(f[e])){d="16";return d;}}if(f.length>3&&e==f.length-1){if(checkUnderscore(f[e])){d="7";return d;}}else{if(e==f.length-1){if(checkUnderscore(f[e])){d="7";return d;}}}}}else{if(checkNumbers(m)){d="16";return d;}}return"0";}function checkspecialExtjs(e){var b="";
obj_val=e.value;var d="	+-=~!@#%^&*()\"';";for(var a=0;a<obj_val.length;a++){check_char=d.indexOf(obj_val.charAt(a));if(check_char>=0){b="7";return b;}}return"0";}function checkspecialExtjs(e){var b="";obj_val=e;var d="+-=~!@#$%^&*()\"';";for(var a=0;a<obj_val.length;a++){check_char=d.indexOf(obj_val.charAt(a));
if(check_char>=0){b="7";return b;}}return"0";}function checkSpecialExtjs(e,d){var b="";obj_val=e;for(var a=0;a<obj_val.length;a++){check_char=d.indexOf(obj_val.charAt(a));if(check_char>=0){b="7";return b;}}return"0";}function checkSpecialExtjs(e,d){var b="";if(typeof(e)=="object"){obj_val=e.value;}else{obj_val=e;
}for(var a=0;a<obj_val.length;a++){check_char=d.indexOf(obj_val.charAt(a));if(check_char>=0){b="7";return b;}}return"0";}function checkspaceExtjs(d){var a="";var b;if(typeof(d)=="object"){b=d.value;}else{b=d;}for(count=0;count<b.length;count++){if(b.charAt(count)==" "||b.charAt(count)=="\t"){a="17";return a;
}}return"0";}function checkfordecimalExtjs(d){var b="";var a="";if(typeof(d)=="object"){a=d.value;}else{a=d;}if(a.indexOf(".")>-1){b="18";return b;}return"0";}function validateMailHostExtjs(f){var h=f;var a=0;var o="0123456789";var n="";var m=false;var b="";for(var k=0;k<h.length;k++){if(h.charAt(k)=="."){a=a+1;
}else{continue;}}for(var g=0;g<h.length;g++){n=o.indexOf(h.charAt(g));if(n>=0){m=true;}else{m=false;}}if(m){if(a!=3){b="19";return b;}}else{if(a!=2){b="19";return b;}}if(h.indexOf(".")>-1&&a>2){var e=h.split(".");for(var d=0;d<e.length;d++){if(e[d]<0||e[d]>255){b="10";return b;}}}return"0";}function icTestParamValidationExtJS(e,d,a){e=trimStrValue(e);
d=trimStrValue(d);var g=e.toLowerCase();var j=d.toLowerCase();var o=true;if(a!="Snmp"&&a!="Custom"&&(g=="snmpport"||g=="snmpversion"||g=="snmpcommunity")){o=false;}else{if(j==""){o=false;return"1";}else{if(j=="$unconfigured"){o=false;return"2";}else{if(g=="password"){if(!checkSpecialChars(j,",")){o=false;
return"3";}}else{if(g!="servicename"&&g!="snmpcommunity"&&g!="process"&&g!="targetdirs"&&g!="user"&&g!="admin_user"&&g!="esx_user"&&g!="object_name"&&j.indexOf("$")>-1){o=false;return"3";}else{if(g=="user"||g=="admin_user"||g=="esx_user"||g=="xen_user"||g=="xen_pool_user"||g=="console_user"||g=="username"||g=="userNames"||g=="proxyusername"||g=="hmc_user"){if(!checkSpecialChars(j,"@*+=|:;\"'<>/[]?,")){o=false;
return"3";}else{if(j.indexOf("..")>-1){o=false;return"5";}else{if(j.indexOf("  ")>-1){o=false;return"6";}}}}else{if(g=="domain"){if(!checkDomain(j,"false")){o=false;}}else{if(g=="snmpcommunity"){if(j.indexOf('"')>-1||j.indexOf("|")>-1){o=false;return"7";}}else{if((g=="elapsed_time"||g=="webport")&&!checkNumbers(j)){o=false;
return"8";}else{if(g=="object_name"&&!checkSpecialChars(j,"`~!@%^&*()+=-{}[]|:;\"'<>?/\\")){o=false;return"9";}else{if((g=="database"||g=="instance")&&!checkSpecialChars(j,",")){o=false;return"3";}else{if(g=="packetsize"||g=="packetcount"||g=="timeout"||g=="webserverport"||g=="receiveport"||g=="adminport"||g=="targetport"||(g=="jmx_remote_port"&&j!="unconfigured")||g=="appport"||g=="connectorport"||g=="uploadsize"||g=="downloadsize"){if(!checkNumberValue("+",j)||j==0){o=false;
return"11";}else{if(!checkDecimalValue(j)){o=false;}}}else{if(g=="snmpport"||g=="proxyport"){if(j!="none"){if(!checkNumberValue("+",j)||j==0){o=false;return"12";}else{if(!checkDecimalValue(j)){o=false;}}}}else{if(g=="port"){if(j!="null"){if(!checkNumberValue("+",j)||j==0){o=false;return"13";}else{if(j>99999){o=false;
return"14";}else{if(!checkDecimalValue(j)){o=false;}}}}}else{if(g=="duration"){if(!checkNumberValue("+",j)){o=false;return"11";}if(!checkDecimalValue(j)){o=false;}}else{if(g=="logtype"&&!checkForAlphabets(j.replace(/ /g,""))){o=false;return"16";}else{if(g=="ddfreq"&&!DDFreqCheck(j)){o=false;return"17";
}else{if(g=="fromid"||g=="toid"){var h=/([a-zA-Z0-9]+[\_\.]?)*[a-zA-Z0-9]\@[a-zA-Z0-9]+\.([a-zA-z0-9]{3}|[a-zA-z0-9]{2}\.[a-zA-z0-9]{2})/g;var p=j.match(h);if(p==null||p!=j){o=false;return"19";}}else{if(g=="url"){if(j.indexOf(":")==-1){o=false;return"20";}else{if(j.charAt(0)==","||j.charAt(j.length-1)==","||j.indexOf(",,")>-1){o=false;
return"20";}else{if(!checkUrl(j)){o=false;return"20";}}}}else{if(g=="websites"){if(!checkSpecialChars(j,"\\/?;:@&-+$|'<>\"")){o=false;return"21";}else{if(j.charAt(0)==","||j.charAt(j.length-1)==","||j.indexOf(",,")>-1){o=false;return"21";}}}else{if(g=="servername"||g=="server"){if(!checkSpecialChars(j,"`~!@#$%^&*()+={}[]|:;,\"'<>?/\\")){o=false;
return"3";}}else{if(g=="homedir"||g=="weblogicjarlocation"){if(!checkSpecialChars(j,"*?\"'<>|")){o=false;return"3";}}else{if(g=="version"){if(j!="none"){if(!checkFloatingNumbers(j)){o=false;return"22";}else{if(j.indexOf("..")>-1){o=false;return"22";}}}}else{if(g=="hmc_server"){if(!validateIp(j)){o=false;
}}else{if((g=="filepath"||g=="navisecclipath")&&!checkSpecialChars(j,'*?<>|"')){o=false;return"3";}else{if((g=="xen_ps_console_file_path"||g=="java_home"||g=="citrixhome")&&!checkSpecialChars(j,"`!#^&+={}[]|\"'<>?")){o=false;return"3";}else{if(g=="recordpattern"&&!checkSpecialChars(j,"`!#^&()+[]|'?")){o=false;
return"3";}else{if(g=="script"&&!checkSpecialChars(j,"`!#^&()+{}[]|\"'<>?")){o=false;return"3";}else{if((g=="hostd_patterns"||g=="messages_patterns")&&!checkSpecialChars(j,"`!#^&()+{}|\"'<>?")){o=false;return"3";}else{if(g=="proxyhost"||g=="targets"||g=="host"||g=="receivehost"||g=="eventhost"){if(g=="host"||g=="proxyhost"||g=="receivehost"||g=="eventhost"){var l="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var f="";var n=false;for(var b=0;b<j.length;b++){f=l.indexOf(j.charAt(b));if(f>=1){n=true;break;}}if(n){if(!checkspace(j)){o=false;}if(!checkDotValue(j)){o=false;}}else{if(!validateIp(j)){o=false;}}if(!checkSpecialChars(j,"`~!@#%^&*()+={}[]|\\;\"'<>,?/")||j.indexOf("$")>0){o=false;return"3";}}else{if(g=="targets"&&!checkspace(j)){o=false;
}else{if(!checkSpecialChars(j,"`~!@#%^&*()-+={}[]|\\;\"'<>,?")||j.indexOf("$")>0){o=false;return"3";}}}}else{if(g=="logfile"){if(!checkSpecialChars(j,"`~!#%^&*()+{}[]|;\"'<>?")||j.indexOf("$")>0){o=false;return"3";}}else{if(g=="process"){if(j.indexOf(":")==-1){if(j!="none"&&j!="(eg_runtime)"){var k=j.replace(/~/g,"");
if(!processValueValidation(k)){o=false;}}}}else{if(g=="pidfile"){if(!checkspace(j)){o=false;}else{if(j.toUpperCase()!="NONE"){if(!processValueValidation(j)){o=false;}}}}else{if(g=="content"){if(j.indexOf(":")==-1){o=false;return"23";}}else{if(g=="search"){if(!checkSpecialChars(j,"`~!@#%^&*()+-{}[]|:;\"'<>?")||j.indexOf("$")>0){o=false;
return"3";}if(!checkCommaValue(j)){o=false;return"24";}}else{if(g=="senduser"){if(!checkSpecialChars(j,"*+=[]|:;\"'<>,/?")){o=false;return"3";}}else{if(g=="receiveuser"){if(!checkSpecialChars(j,"*+=[]|:;\"'<>,/?")){o=false;return"3";}}else{if(g=="eventsrc"){if(!checkSpecialChars(j,"`~!#%^&*()={}[]|\\:;\"'<>?/")||j.indexOf("$")>0){o=false;
return"3";}else{if(!checkCommaValue(j)){o=false;return"24";}}}else{if(g=="command"){if(!(j=="get"||j=="post")){o=false;return"25";}}else{if(g=="cmd"){if(!(j=="get"||j=="put")){o=false;return"26";}}else{if(g=="protocol"){if(!(j=="imap"||j=="pop3")){o=false;return"27";}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return"0";
}