/* isBlank(str) //Checks if the String is Blank isSpace(str) //Checks if the whole String is Space(s) isEmail(str) //Checks if the Email is valid or not isNumeric(str) // Checks whether the number is valid or not isOutOfRange(fieldvalue,lbound,ubound) // Checks whether the entered value is within range or not isEqual(x,y) //Checks whether the two strings or two numbers are equal iscontainsSpace(str) //Checks whether the String contains any space or not isShort(str) //Checks if the Password is less than 4 characters */ //***************************** function isBlank(x) { /* Function isBlank() */ if( x.length==0){ return true; } else{ return false; } } function isSpace(str) { /* Function isSpace() */ var i; var flag =""; for(i=0;istr.length;i++) { if(str.charAt(i) == " ") { flag =true; break; } else{ flag=false; continue; } } return(flag); } function isContains2ormoreDots(str) { /* Function isSpace() */ var i; var count =0 var flag =""; for(i=0;i= 1){ flag =false; continue; } else{ flag =true break; } } else{ flag=false; continue; } } return(flag); } function isRepeat(str) { /* Function isRepeat() */ var c=0; var i; for(i=0;i1) { return(true); } else { return(false); } } function isDot(str) { /* Function isDot() */ var c=0; var i; for(i=0;istr.length; i++){ if(letters.indexOf(str.charAt(i))==-1){ return false; } } return true; } function isvalidMailstr(str){ var letters="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._@ "; var i; for(i=0; i 0 ){ if( mailstr ="" || mailstr.indexOf('@',1) == -1 || mailstr.indexOf('.',1) == -1 || isRepeat(mailstr) || isSpace(mailstr) || isDot(mailstr) || mailstr.charAt(0) == " ") { flag =false; } else{ flag =true; } } else{ flag =false; } return flag; } function isNumeric(x){ str =x.toString() flag =""; for(i=0;i a || myval > b || isNaN(myval)) { flag=true; } else { flag=false; } return flag; } // func function isSymbol(str){ //Function isSymbol() //Used to Check whether a CheckBox is Checked or not var i; var s = str for(i=0;i "A" || s.charAt(i) > "z" ) { return(true); } } } return(false); } function checked(check) { //Function checked() //Used to Check whether a CheckBox is Checked or not var checkval = check; var flag=""; if(checkval == true) { flag = true; } else{ flag = false; } return flag; } function isShort(x){ //Function checked() //Used to Check if Password is less than 4 characters var myvalx = x; if(myvalx.length < 4) { return true; } else { return false; } } function isEqual(x,y) { //Function isEqual() //Used to Check whether a the two numbers are equal var myvalx = x; var myvaly = y; if(myvalx==myvaly) { return true; } else{ return false; } } //func //TrimLeft - Removes the white spaces from Left of the string function TrimLeft(czString) { var iLength = czString.length; for(var iI = 0; iI < czString.length; iI++) { if(czString.charAt(iI) != " ") break; iLength -= 1; } return czString.substr(iI, iLength); } //Trimright - Removes the white spaces from Right of the string function TrimRight(czString) { var iLength = czString.length; for(var iI = czString.length - 1; iI > 0; iI--) { if(czString.charAt(iI) != " ") break; iLength -= 1; } return czString.substr(0, iLength); } //Trim - Removes the white spaces from start or end of the string function Trim(czString) { return TrimLeft(TrimRight(czString)); } function isSelect(type) //check weather dropdown box selectedindex is 0 or not { if (type=='0'){ return true; } else{ return false; } } function isVDate(mon,year) //check weather month and year is less than current date { var curdate = new Date(); var mm = (curdate.getMonth() + 1); var yy = (curdate.getYear()); //alert("User Month:" + mon + " Current Month:" + mm ); //alert("User Year:" + year + " Current Year:" + yy ); if (year= 0 && n <= 9 || n == " ") { flag=true; } else{ flag=false; break; } } return flag; } function isTypeZero(x){ /*Function is used to check the drop down value is zero or not */ if(parseInt(x)==0) { return true; } else { return false; } } function isFloat(x){ //Function check for float and "." values str =x.toString() flag =""; for(i=0;i= 0 && n <= 9 || n == "." || n == " ") { flag=true; } else{ flag=false; break; } } return flag; }