function validateForm(){var _1=0;if(document.forms.length==2){_1=1;}var n;var _3;var _4;var _5;var _6;var _7;var _8;var _9;var _a;var _b;var _c;var _d;var _e;var _f;_d=false;_9="Only Numbers are allowed in - ";_a="Only Numbers are allowed in - ";_b="Invalid Characters in - ";errInv="Invalid - ";_c="Date is not valid in - ";errNum="Not a Valid Number - ";n=document.forms[_1].elements.length;for(var i=0;i<document.forms[_1].elements.length;i++){_3=document.forms[_1].elements[i].name;_3=_3.replace("ctl00$ContentPlaceHolder1$","");_8=document.forms[_1].elements[i].type;if(_8=="hidden"){continue;}if(_8.indexOf("select")>=0){document.forms[_1].elements[i].options[document.forms[_1].elements[i].selectedIndex].value=document.forms[_1].elements[i].options[document.forms[_1].elements[i].selectedIndex].value.replace("'","`");}else{RSQ_ctlValue=document.forms[_1].elements[i].value;RSQ_ctlValuename=document.forms[_1].elements[i].name;if(RSQ_ctlValuename!=""){var _11;_11="";if(RSQ_ctlValue!=""){for(var _12=0;_12<RSQ_ctlValue.length;_12++){_11=_11+RSQ_ctlValue.substring(_12,_12+1).replace("'","`");}}document.forms[_1].elements[i].value=_11;}}if(_3!=""){if(_3.indexOf(":Int")>=0){_4="Int";_5=_3.substring(_3.indexOf(":Int"),_3.indexOf(":Int")+1);_7=_3.substring(0,_3.indexOf(":Int"))+" - "+_3.substring(_3.indexOf(":Int")+5,_3.length);}else{_4=_3.substring(0,3);_5=_3.substring(3,4);_7=_3.substring(4,_3.length);}if(_3.indexOf(":_ctl")>=0){_4="Txt";var _13;if(_3.indexOf(":")!=_3.lastIndexOf(":")){_13=_3.indexOf(":");var _14=_3.substring(_13+1);_13=_3.indexOf(":")+_14.indexOf(":")+2;}else{_13=_3.indexOf(":");}var _15=_3.substring(_13);_4=_15.substring(0,3);_5=_15.substring(3,4);_7=_15.substring(4,_15.length);}else{_4=_3.substring(0,3);_5=_3.substring(3,4);_7=_3.substring(4,_3.length);}var _16;_16="";for(var sl=0;sl<_7.length;sl++){_16=_16+_7.substring(sl,sl+1).replace("_"," ");}_7=_16;_7="'"+_7+"'";if(_8.indexOf("select")>=0){if(document.forms[_1].elements[i].selectedIndex>=0){_6=document.forms[_1].elements[i].options[document.forms[_1].elements[i].selectedIndex].value;}}else{_6=document.forms[_1].elements[i].value;}_f="";_d=false;for(var sl=0;sl<_6.length;sl++){_e=_6.substring(sl,sl+1);if(_e!=" "){_d=true;_f=_f+_e;}else{if(_d){_f=_f+_e;}}}_6=_f;if(_8.indexOf("select")>=0){document.forms[_1].elements[i].options[document.forms[_1].elements[i].selectedIndex].value=_6;}else{document.forms[_1].elements[i].value=_6;}if((_5=="R")&&(_8!="hidden")){if(_6.length<=0){alert(_7+" is Required");document.forms[_1].elements[i].focus();return false;}}if(_6.length>0){switch(_4){case "Txa":if(!isTextOthers(_6)){alert(_b+_7);document.forms[_1].elements[i].focus();return false;}break;case "Txt":if(!isText(_6)){alert(_b+_7);document.forms[_1].elements[i].focus();return false;}break;case "Int":if(!isInteger(_6)){alert(_9+_7);document.forms[_1].elements[i].focus();return false;}break;case "Flt":if(!isFloat(_6)){alert(errNum+_7);document.forms[_1].elements[i].value="0";document.forms[_1].elements[i].focus();return false;}break;case "Neg":if(!isNegative(_6)){alert(errNum+_7);if(isNaN(document.forms[_1].elements[i].value)){return false;}else{break;}document.forms[_1].elements[i].value="0";document.forms[_1].elements[i].focus();return false;}break;case "AId":if(isPassword(_6)&&_6.length<3){alert("You must enter atleast 3 characters in - "+_7);document.forms[_1].elements[i].focus();return false;}if(!isPassword(_6)){alert("Only alphanumeric characters are allowed in - "+_7);document.forms[_1].elements[i].focus();return false;}break;case "Pwd":if(isPassword(_6)&&_6.length<3){alert("You must enter atleast 3 characters in - "+_7);document.forms[_1].elements[i].focus();return false;}if(!isPassword(_6)){alert("Only alphanumeric characters are allowed in - "+_7);document.forms[_1].elements[i].focus();return false;}break;case "Eml":if(!isEMail(_6)){alert(errInv+_7);document.forms[_1].elements[i].focus();return false;}break;case "Tel":if(!isTelephone(_6)){alert(_b+_7);document.forms[_1].elements[i].focus();return false;}break;case "Fax":if(!isFax(_6)){alert(_b+_7);document.forms[_1].elements[i].focus();return false;}break;case "Pin":if(!isPinCode(_6)){alert(_b+_7);document.forms[_1].elements[i].focus();return false;}break;case "Dat":if(_6.indexOf("-")==-1){if(!isDate(_6,"mm/dd/yyyy")){alert(_c+_7);document.forms[_1].elements[i].focus();return false;}}else{alert(_b+_7);document.forms[_1].elements[i].focus();return false;}break;case "Amt":if(!isAmount(_6,_7,document.forms[_1].elements[i].name)){document.forms[_1].elements[i].focus();return false;}break;case "URL":if(_6.substring(0,7).toUpperCase()!="HTTP://"){alert(_7+" should start with http://");document.forms[_1].elements[i].focus();return false;}break;case "Fld":if(!isFolderName(_6,_7)){document.forms[_1].elements[i].focus();return false;}break;case "Per":if(!isPercentage(_1,_6,i)){document.forms[_1].elements[i].focus();return false;}break;default:break;}}}}return true;}function isPercentage(_19,a,i){if(a.length!=0){z=a.length;for(m=0;m<=z;m++){if(a.charAt(0)==" "){a=a.substring(1,a.length);var y=a.length;if(y==0){alert("Percentage is required");document.forms[_19].elements[i].focus();return false;}}}if(isNaN(a)){alert("Sorry !! "+a+" is not a number !!");document.forms[_19].elements[i].focus();return false;}else{if(a.charAt(0)=="-"){alert("Sorry !! Negative numbers are not allowed !!");document.forms[_19].elements[i].focus();return false;}else{if(a.charAt(0)=="+"){alert("Sorry !! Special characters are not allowed !!");document.forms[_19].elements[i].focus();return false;}else{if(parseFloat(document.forms[_19].elements[i].value)>100){alert("Sorry !! Percentage cannot be greater than 100!!");document.forms[_19].elements[i].focus();return false;}else{if(a.indexOf(".")!=-1){var b=a.substring(a.indexOf(".")+1,a.length);if(b.length>2){alert("In the decimal part you have entered more than two digits!! \n                          Please round it !!");document.forms[_19].elements[i].focus();return false;}else{return true;}}else{return true;}}}}}}}function isAmount(_1e,_1f,_20){if(isNaN(_1e)==true){OpenPopupScreen(18);return false;}else{if(_1e.charAt(0)=="-"){OpenPopupScreen(18);return false;}else{if(_1e.charAt(0)=="+"){OpenPopupScreen(18);return false;}else{if(_1e.charAt(0)=="0"&&_1e.substring(0,_1e.indexOf(".")).length>1&&_1e.indexOf(".")!=-1){return true;}else{if(_1e.indexOf(".")!=-1){var b=_1e.substring(_1e.indexOf(".")+1,_1e.length);if(b.length>4){OpenPopupScreen(18);return false;}else{if(_20.charAt(3)=="R"&&parseFloat(_1e)<=0){OpenPopupScreen(18);return false;}else{return true;}}}else{if(_20.charAt(3)=="R"&&parseFloat(_1e)<=0){OpenPopupScreen(18);return false;}else{return true;}}}}}}}function isInteger(_22){var _23="0123456789";var _24;for(var i=0;i<_22.length;i++){_24=_22.substring(i,i+1);if(_23.indexOf(_24)==-1){return false;}}return true;}function isNegative(_26){var _27="-0123456789.";var _28;for(var i=0;i<_26.length;i++){_28=_26.substring(i,i+1);if(_27.indexOf(_28)==-1){return false;}}return true;}function isFloat(_2a){var _2b="0123456789.";var _2c;for(var i=0;i<_2a.length;i++){_2c=_2a.substring(i,i+1);if(_2b.indexOf(_2c)==-1){return false;}}if(isNaN(_2a)){return false;}return true;}function isTelephone(_2e){var _2f=" 0123456789-()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var _30;for(var i=0;i<_2e.length;i++){_30=_2e.substring(i,i+1);if(_2f.indexOf(_30)==-1){return false;}}if(_2e.substring(1)=="-"){return false;}return true;}function isPinCode(_32){var _33="0123456789-()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var _34;for(var i=0;i<_32.length;i++){_34=_32.substring(i,i+1);if(_33.indexOf(_34)==-1){return false;}}return true;}function isFax(_36){var _37=" 0123456789-()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var _38;for(var i=0;i<_36.length;i++){_38=_36.substring(i,i+1);if(_37.indexOf(_38)==-1){return false;}}return true;}function isFolderName(_3a,_3b){var _3c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var _3d;for(var i=0;i<_3a.length;i++){_3d=_3a.substring(i,i+1);if(_3c.indexOf(_3d)==-1){alert("Only alphanumeric characters are allowed in - "+_3b);return false;}}return true;}function isText(_3f){var _40="0123456789-abcdefghijklmnopqrstuvwxyz `~!%&@#$^&*()-_=+/{}[],.:;<>?\\ABCDEFGHIJKLMNOPQRSTUVWXYZ";var _41;for(var i=0;i<_3f.length;i++){_41=_3f.substring(i,i+1);if(_3f.charCodeAt(i)!=13&&_3f.charCodeAt(i)!=10){if(_40.indexOf(_41)==-1){return false;}}}return true;}function isTextOthers(_43){var _44="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ &,'";var _45;for(var i=0;i<_43.length;i++){_45=_43.substring(i,i+1);if(_43.charCodeAt(i)!=13&&_43.charCodeAt(i)!=10){if(_44.indexOf(_45)==-1){return false;}}}return true;}function isPassword(_47){var _48="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var _49;for(var i=0;i<_47.length;i++){_49=_47.substring(i,i+1);if(_48.indexOf(_49)==-1){return false;}}return true;}function isEMail(_4b){var _4c="0123456789-abcdefghijklmnopqrstuvwxyz_@.ABCDEFGHIJKLMNOPQRSTUVWXYZ";var _4d;var _4e;for(var i=0;i<_4b.length;i++){_4d=_4b.substring(i,i+1);if(_4c.indexOf(_4d)==-1){return false;}}_4e=_4b;if(_4e.indexOf("@")!=_4e.lastIndexOf("@")){return false;}if(_4e.indexOf("@")<=1||_4e.indexOf(".")<2||_4e.length<6){return false;}var _50=_4e.indexOf(".")-_4e.indexOf("@");if(_50==1){return false;}if((_4e.indexOf(".")-_4e.lastIndexOf("."))==-1){return false;}if((_4e.indexOf("@")-_4e.lastIndexOf("@"))!=0){return false;}if(_4e.length-(_4e.indexOf(".")+1)<=1){return false;}return true;}function isDate(_51,_52){var val=_51;var _54=/^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2,4})$/;var _55=val.match(_54);if(_55==null){return false;}if(_52.toLowerCase()=="dd/mm/yyyy"){month=_55[3];day=_55[1];}else{month=_55[1];day=_55[3];}year=_55[4];if(parseFloat(year)==0){return false;}if(month<1||month>12){return false;}if(day<1||day>31){return false;}if((month==4||month==6||month==9||month==11)&&day==31){return false;}if(month==2){var _56=(year%4==0&&(year%100!=0||year%400==0));if(day>29||(day==29&&!_56)){return false;}}if(year<1900){return false;}return true;}function TextareaLengthChecker(_57,_58,Max){var _5a=document.forms[0].elements[_58].value;if(_5a.length>Max){if(_58.substring(3,4)=="R"){alert(_58.substring(_58.indexOf("R")+1,_58.length)+"  "+"should not exceed"+" "+Max+" "+"Characters");document.forms[0].elements[_58].focus();return false;}else{alert(_58.substring(_58.indexOf("O")+1,_58.length)+" "+"should not exceed"+" "+Max+" "+"Characters");document.forms[0].elements[_58].focus();return false;}}else{return true;}}function doAdminSubmitCheckFromToDate(_5b,_5c,_5d){function RetSeldVal(_5e,_5f){return document.forms[_5e].elements[_5f].options[document.forms[_5e].elements[_5f].selectedIndex].value;}FromDay=RetSeldVal(_5b,"SelRFromDate");FromMonth=RetSeldVal(_5b,"SelRFromMonth");FromYear=RetSeldVal(_5b,"SelRFromYear");ToDay=RetSeldVal(_5b,"SelRToDate");ToMonth=RetSeldVal(_5b,"SelRToMonth");ToYear=RetSeldVal(_5b,"SelRToYear");var _60=new Date(_5d);var _61=new Date(FromMonth+"/"+FromDay+"/"+FromYear);var _62=new Date(ToMonth+"/"+ToDay+"/"+ToYear);var _63=_60.toGMTString();var _64=_61.toGMTString();var _65=_62.toGMTString();var _66=Date.parse(_63);var _67=Date.parse(_64);var _68=Date.parse(_65);function check4validatedate(day,_6a,_6b,_6c,_6d){var a="SelR"+_6c+"Date";var dd=0;if(_6a<1||_6a>12){alert("Invalid "+_6c+" Date");document.forms[_5b].elements[a].focus();dd=1;}if(day<1||day>31){alert("Invalid "+_6c+" Date");document.forms[_5b].elements[a].focus();dd=1;}if((_6a==4||_6a==6||_6a==9||_6a==11)&&day==31){alert("Invalid "+_6c+" Date");document.forms[_5b].elements[a].focus();dd=1;}if(_6a==2){var _70=(_6b%4==0&&(_6b%100!=0||_6b%400==0));if(day>29||(day==29&&!_70)){alert("Invalid "+_6c+" Date");document.forms[_5b].elements[a].focus();dd=1;}}if(dd==0){return true;}}var _71=check4validatedate(FromDay,FromMonth,FromYear,"From",_5b);var To=check4validatedate(ToDay,ToMonth,ToYear,"To",_5b);if(eval(_66-_67)<0&&!(!_71||!To)){alert("From date should be less than \n               OR             \n  equal to Current date");document.forms[_5b].SelRFromDate.focus();}else{if(eval(_66-_68)<0&&!(!_71||!To)){alert("To date should be less than \n               OR             \n  equal to Current date   ");document.forms[_5b].SelRToDate.focus();}else{if(!(!_71||!To)){if(eval(_68-_67)>=0){doAdminSubmit(_5b,_5c);}else{alert("From date should be less than \n               OR             \n  equal to To date");document.forms[_5b].SelRFromDate.focus();}}}}}function Check4Date(_73,_74,_75){_74=_74.replace("_"," ");var _76=new Date();var _77=_75;var _78=new Date(_77);var _79=document.forms[_73].elements[_74].value;var d2=_79.substring(0,_79.indexOf("/"));var m2=_79.substring(_79.indexOf("/")+1,_79.lastIndexOf("/"));var y2=_79.substring(_79.lastIndexOf("/")+1,_79.length);var _7d=m2+"/"+d2+"/"+y2;var _7e=new Date(_7d);var _7f=_78.toGMTString();var _80=_7e.toGMTString();var _81=Date.parse(_7f);var _82=Date.parse(_80);var _83=(_82-_81);if(eval(_83)>0){alert("Sorry !! Date sholud not be greater than the current date !!");document.forms[_73].elements[_74].focus();return false;}return true;}function maxpic(_84,_85,_86){var _87="directories=no,location=no,menubar=no,status=no";_87+=",titlebar=no,toolbar=no";var _88="scrollbars=yes,width="+_85+",height="+_86+",resizable=no";var _89=_87+" "+_88;newWin=open(_84,"myOptions",_89);}function OpenNormalWindow(_8a,_8b,_8c){newWin=open(_8a,"_blank","directories=yes,location=yes,menubar=yes,status=yes,titlebar=yes,toolbar=yes,width="+_8b+",height="+_8c+",left=0,top=0");}function Check4LessEqual2CurrDate(_8d,_8e,_8f){var _90=new Date();var _91=_8f;var _92=new Date(_91);var _93=document.forms[_8d].elements[_8e].value;var m2=_93.substring(0,_93.indexOf("/"));var d2=_93.substring(_93.indexOf("/")+1,_93.lastIndexOf("/"));var y2=_93.substring(_93.lastIndexOf("/")+1,_93.length);var _97=m2+"/"+d2+"/"+y2;var _98=new Date(_97);var _99=_92.toGMTString();var _9a=_98.toGMTString();var _9b=Date.parse(_99);var _9c=Date.parse(_9a);var _9d=(_9c-_9b);if(eval(_9d)>0){alert("Sorry !! "+_8e.substring(4,_8e.length).replace("_"," ")+" cannot be greater than the current date !!");document.forms[_8d].elements[_8e].focus();return false;}return true;}function Check4GreaterThanCurrDate(_9e,_9f,_a0){var _a1=new Date();var _a2=_a0;var _a3=new Date(_a2);var _a4=document.forms[_9e].elements[_9f].value;var m2=_a4.substring(0,_a4.indexOf("/"));var d2=_a4.substring(_a4.indexOf("/")+1,_a4.lastIndexOf("/"));var y2=_a4.substring(_a4.lastIndexOf("/")+1,_a4.length);var _a8=m2+"/"+d2+"/"+y2;var _a9=new Date(_a8);var _aa=_a3.toGMTString();var _ab=_a9.toGMTString();var _ac=Date.parse(_aa);var _ad=Date.parse(_ab);var _ae=(_ad-_ac);if(eval(_ae)<=0){alert("Sorry !! "+_9f.substring(4,_9f.length).replace("_"," ")+" should be greater than the current date !!");document.forms[_9e].elements[_9f].focus();return false;}return true;}function Check4GreaterThanCurrDate1(_af,_b0,_b1,_b2){var _b3=new Date();var _b4=_b1;var _b5=new Date(_b4);var _b6=document.forms[_af].elements[_b0].value;var m2=_b6.substring(0,_b6.indexOf("/"));var d2=_b6.substring(_b6.indexOf("/")+1,_b6.lastIndexOf("/"));var y2=_b6.substring(_b6.lastIndexOf("/")+1,_b6.length);if(_b2.toUpperCase()=="MM/DD/YYYY"){var _ba=m2+"/"+d2+"/"+y2;}else{if(_b2.toUpperCase()=="DD/MM/YYYY"){var _bb=d2+"/"+m2+"/"+y2;}}var _bc=new Date(_bb);var _bd=_b5.toGMTString();var _be=_bc.toGMTString();var _bf=Date.parse(_bd);var _c0=Date.parse(_be);var _c1=(_c0-_bf);if(eval(_c1)<=0){alert("Sorry !! "+_b0.substring(4,_b0.length).replace("_"," ")+" should be greater than the current date !!");document.forms[_af].elements[_b0].focus();return false;}return true;}function Check4GreaterThanEqual2CurrDate(_c2,_c3,_c4){var _c5=new Date();var _c6=_c4;var _c7=new Date(_c6);var _c8=document.forms[_c2].elements[_c3].value;var m2=_c8.substring(0,_c8.indexOf("/"));var d2=_c8.substring(_c8.indexOf("/")+1,_c8.lastIndexOf("/"));var y2=_c8.substring(_c8.lastIndexOf("/")+1,_c8.length);var _cc=m2+"/"+d2+"/"+y2;var _cd=new Date(_cc);var _ce=_c7.toGMTString();var _cf=_cd.toGMTString();var _d0=Date.parse(_ce);var _d1=Date.parse(_cf);var _d2=(_d1-_d0);if(eval(_d2)<0){alert("Sorry !! "+_c3.substring(4,_c3.length).replace("_"," ")+" should be greater than or equal to the current date !!");document.forms[_c2].elements[_c3].focus();return false;}return true;}function CheckClientDate(_d3,_d4,_d5){var _d6=new Date();var _d7=_d5;var _d8=new Date(_d7);var _d9=document.forms[_d3].elements[_d4].value;var d2=_d9.substring(0,_d9.indexOf("/"));var m2=_d9.substring(_d9.indexOf("/")+1,_d9.lastIndexOf("/"));var y2=_d9.substring(_d9.lastIndexOf("/")+1,_d9.length);var _dd=m2+"/"+d2+"/"+y2;var _de=new Date(_dd);var _df=_d8.toGMTString();var _e0=_de.toGMTString();var _e1=Date.parse(_df);var _e2=Date.parse(_e0);var _e3=(_e2-_e1);if(eval(_e3)<=0){alert("Sorry !! "+_d4.substring(4,_d4.length).replace("_"," ")+" should be greater than the current date !!");document.forms[_d3].elements[_d4].focus();return false;}return true;}function DateDiff(_e4,_e5,_e6){if(_e6.toUpperCase()=="DD/MM/YYYY"){var d1=_e4.split("/");var _e8=d1[1]+"/"+d1[0]+"/"+d1[2];var _e9=new Date(_e8);var d2=_e5.split("/");var _eb=d2[1]+"/"+d2[0]+"/"+d2[2];var _ec=new Date(_eb);}else{var _ed=new Date(_e4);var _ee=new Date(_e5);}var _ef=_ed.toGMTString();var _f0=_ee.toGMTString();var _f1=Date.parse(_ef);var _f2=Date.parse(_f0);var _f3=(_f1-_f2);return _f3;}function replace_(_f4){var _f5;_f5="";for(var sl=0;sl<_f4.length;sl++){_f5=_f5+_f4.substring(sl,sl+1).replace("_"," ");}return _f5;}function SetStatus(a){window.status=a;}var x1=0;var y1=0;var z1=140;var delay1=40;var text1="Pro-MATE Your Project Partner....";while(y1++<z1){text1=" "+text1;}function scroller1(){if(x1==text1.length){x1=0;}setTimeout("scroller1()",delay1);}scroller1();function Navigate(_f8,SBY,SN,_fb){if(document.forms[_fb].HdnOAction.value=="Search"){document.forms[_fb].HdnOAction.value="Search";}document.forms[_fb].HdnOStartRow.value=_f8;document.forms[_fb].HdnOSortNature.value=SN;document.forms[_fb].HdnOOrderBy.value=SBY;document.forms[_fb].submit();}function doSort(SBY,SN,_fe){if(document.forms[_fe].HdnOAction.value=="Search"){document.forms[_fe].HdnOAction.value="Search";}document.forms[_fe].HdnOSortNature.value=SN;document.forms[_fe].HdnOOrderBy.value=SBY;document.forms[_fe].submit();}function Datediff(D1){var _100=new Date();var d1=_100.getDate();var m1=_100.getMonth()+1;var y1=_100.getYear();var _104=m1+"/"+d1+"/"+y1;var _105=new Date(_104);var _106=D1;var d2=_106.substring(0,_106.indexOf("/"));var m2=_106.substring(_106.indexOf("/")+1,_106.lastIndexOf("/"));var y2=_106.substring(_106.lastIndexOf("/")+1,_106.length);if(y2.length<4){y2="20"+y2;}var _10a=d2+"/"+m2+"/"+y2;var _10b=new Date(_10a);var _10c=_105.toGMTString();var _10d=_10b.toGMTString();var _10e=Date.parse(_10c);var _10f=Date.parse(_10d);var diff=(_10f-_10e);if(eval(diff)>0){flag=1;return flag;}}function autoTab(_111,_112,_113,_114){var _115=_111;var _116=document.forms[_113].elements[_114];if(_116==null){_116=document.forms[1].elements[_114];}if(_111.value.length==_112){_116.focus();}}function countYears(_117,_118){var x=_117.split("/"),y=_118.split("/"),yrCount=0;var _11a=new Date(x[2],x[1]-1,x[0]);var _11b=new Date(y[2],y[1]-1,y[0]);while(addYr(_11a)<=_11b){_11a=addYr(_11a);yrCount++;}return yrCount;}function addYr(a){return new Date(check2k(1*a.getYear()+1),a.getMonth(),a.getDate());}function check2k(a){return (a<1900)?a-=-1900:a;}function DisplayAlert(_11e){var _11f;switch(_11e){case "1":_11f=confirm("Do you want to Save ?");return _11f;case "2":_11f=confirm("Do you want to Save Changes?");return _11f;case "3":_11f=confirm("Do you want to Delete ?");return _11f;case "4":alert("Fill the Row ");return;case "5":_11f=confirm("Do you want to Delete this Row?");return _11f;case "6":alert("Enter any Text to Search");return;case "7":alert("Collection Time and Departure Time cannot be same at the same Date");return;case "8":alert("Collection Time cannot be less than Departure Time at the same Date");return;case "9":alert("Enter the Data for Truck");return;case "10":alert("Departure Date Cannot be Greater than Collection Date");return;case "11":alert("To Date Should Be Greater Than Or Equal To From Date");return;case "12":alert("GST Percentage should be Less than 100 !");return;case "13":alert("Delivery Time Cannot be less than Collection Time");return;case "14":alert("From Date should be greater than or equal to Current Date !");return;case "15":alert("Select any Group !");return;case "16":alert("Description is Required");return;case "17":alert("Attribute is Required");return;case "18":alert("No of Subject should be less than Selected Subject");return;case "19":alert("Name is Required");return;case "20":alert("No of Subject cannot be blank");return;case "21":alert("Enter atleast one record");return;case "22":alert("Access denied for Addition/Modification");return;case "23":alert("Access denied");return;case "24":alert("Level Code should be 3 Characters");return;case "25":alert("Text Book is Required");return;case "26":alert("Course is Required");return;case "27":_11f=confirm("Do you want to remove students from this batch?..");return _11f;case "28":_11f=confirm("Are you sure to Admit the Student ?");return _11f;case "29":_11f=confirm("The related exam groups for this may also be deleted.Do you want to Delete ?");return _11f;case "30":alert("Section is Required");return;case "31":alert("Attendance Date Should not be greater than Current Date");return;case "32":alert("From Date Should not be greater than To  Date");return;case "33":alert("To Date Should not be greater than Current  Date");return;case "34":alert("Password does not match");return;case "35":alert("Old password is wrong");return;case "36":alert("Select atleast one Record to remove");return;case "37":alert("Old and New password are same");return;case "38":alert("Zero not allowed");return;case "39":alert("Choose a date between the Start year & End year!..");return;case "40":alert("Already Exists!..");return;case "41":_11f=confirm("Do you want to Remove?");return _11f;case "42":alert("'Facility Type' is Required");return;case "43":alert("Select a Facility Type to Add Facility");return;case "44":alert("Select/Add a Facility Type to Add Facility");return;case "45":alert("Please select any information and then save !!");return;case "46":alert("Select atleast one Document for the Student ! ! !");return;case "47":alert("Returned Date should be greater than Received Date");return;case "48":alert("Received Date is Required");return;case "49":alert("Remarks should not exceed 100 characters");return;case "50":alert("Check atleast one Student Add/Edit Activity");return;case "51":alert("Check atleast one Staff Add/Edit Activity");return;case "52":alert("Check atleast one Student for the Academic Year");return;case "53":alert("Address Field should not exceed 100 characters");return;case "54":alert("Select a Activity Type to add Activity");return;case "55":alert("Check atleast one Student to Add/Edit Scholarship !");return;case "56":alert("Number of Records per page should be greater than Zero!");return;case "57":alert("Date - Required");return;case "58":alert("Amount - Required");return;case "59":_11f=confirm("Scheduled Periods crosses Allocated periods, Want to Proceed ?");return _11f;case "60":alert("From Date Should not be greater than To Date");return;case "61":alert("Invalid Entry");return;case "62":alert("Value Required");return;case "63":alert("Select the ItemType");return;case "64":alert("Select atleast one Item !!!");return;case "65":alert("Access denied for Approve !!! ");return;case "66":alert("Date should not be greater than Current Date ! ");return;case "67":alert("Item Rate - Required !!! ");return;case "68":alert("Lead Time - Required !!! ");return;case "69":alert("Discount - Required !!! ");return;case "70":alert("As On Date - Required !!! ");return;case "71":_11f=confirm("Do you want Transfer ?");return _11f;case "72":_11f=confirm("Do you want to Approve ?");return _11f;case "73":_11f=confirm("Given Quantity is greater than Pending Quantity Do you want to Continue ?");return _11f;case "74":alert("Given Quantity is greater then Total Quantity!!! ");return;case "75":alert("Given Quantity is greater then Receipt Quantity!!! ");return;case "76":_11f=confirm("Facility has been already allocated to batch(s)\nWant to Share the facility ?");return _11f;case "77":alert("Access denied for Transfer !!! ");return;case "78":alert("Date should not be less than Purchase Order date !!! ");return;case "79":alert("Check atleast one Student Add/Edit Incentive");return;case "80":alert("Check atleast one Staff Add/Edit Incentive");return;case "81":alert("Event Date should be greater than or Equal to Current Date !");return;case "82":alert("Given Quantity is greater then Issued Quantity!!! ");return;case "83":alert("Check atleast one Student to Assign Document");return;case "84":alert("Exceeds Safety Stock");return;case "85":alert("Given Quantity is greater then Total Quantity!!! ");return;case "86":_11f=confirm("Do you want to Send Email ?");return _11f;case "87":alert("Application Date should be greater than Birth Date !");return;case "88":alert("Incentive Amount Should be greater than 0 !");return;case "89":alert("From Date Should not be Greater than Current Date !");return;case "90":alert("Scholarship Amount Should be greater than 0 !");return;case "91":alert("Description should not exceed 200 characters !");return;case "92":alert("Amount should be greater than 0 !");return;case "93":alert("Occupation Description should not exceed 250 characters !");return;case "94":alert("'First Name' or 'Last Name' or 'Student Id' is Required");return;case "95":alert("'Sponser Name' is Required");return;case "96":alert("Scholarship Amount is Required !");return;case "97":alert("Only Numbers are allowed in Amount");return;case "98":alert("Invalid Date of Birth");return;case "99":alert("'Number of Relatives' is Required");return;case "100":alert("'Number of Relatives' should be greater than 0");return;case "101":alert("Enter the Branch they study is Required");return;case "102":alert("Relative Branch should not exceed 50 characters");return;case "103":_11f=confirm("Do you want copy Fee Structures ?");return _11f;case "104":alert("Expiry Date should be greater than Current Date");case "105":_11f=confirm("Do you want Import Data?");return _11f;case "106":_11f=confirm("Do you want Transfer  Data?");return _11f;case "107":_11f=confirm("Do you want to Close ?");return _11f;}}function DoDelete(){if(DisplayAlert("3")){return true;}return false;}function TimeDiff(_120,_121){var _122,strTime2;var _123=_120.split(":");var _124=_123[1].substring(3,5);if(_124.toUpperCase()=="PM"){if(_123[0]==12){_122=(_123[0]*60)+parseInt(_123[1].substring(0,2));}else{_122=((_123[0]+12)*60)+parseInt(_123[1].substring(0,2));}}else{if(_123[0]==12){_122=parseInt(_123[1].substring(0,2));}else{_122=(_123[0]*60)+parseInt(_123[1].substring(0,2));}}var _125=_121.split(":");_124=_125[1].substring(3,5);if(_124.toUpperCase()=="PM"){if(_125[0]==12){strTime2=((_125[0])*60)+parseInt(_125[1].substring(0,2));}else{strTime2=((_125[0]+12)*60)+parseInt(_125[1].substring(0,2));}}else{if(_125[0]==12){strTime2=parseInt(_125[1].substring(0,2));}else{strTime2=(_125[0]*60)+parseInt(_125[1].substring(0,2));}}var _126=strTime2-_122;if((strTime2-_122)<0){return "0";}else{if((strTime2-_122)==0){return "1";}else{return "2";}}}