/* Checking function : isEmail -- invalid email R -- cannot be empty S -- Please choose one of the XXX isTel -- XXX is not valid isNotOnlyNum -- XXX must not be a numbers only isNumLen -- XXX must be 1 -- 9 digits. isMaxLen -- XXX is maximum 8 characters. isLen -- XXX must be 6 characters. !=R -- XXX must be a number. inRange -- must contain a number between 1 and 9. notMatch -- compare with 3rd input parameter, is not match Match -- compare with 3rd input parameter, is match */ function trim(s) { if (s == null) { s = ''; } else { while (s.substring(0,1) == ' ') s = s.substring(1, s.length); while (s.substring(s.length-1,s.length) == ' ') s = s.substring(0, s.length-1); } return s; } function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p); } if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i test.substring(test.indexOf('isMaxLen')+8)) errors += '- ' + nm + ' is maximum '+test.substring(test.indexOf('isMaxLen')+8)+' characters.\n'; } else if (test.indexOf('isLen') != -1) { if (val.length != test.substring(test.indexOf('isLen')+5)) errors += '- ' + nm + ' must be '+test.substring(test.indexOf('isLen')+5)+' characters.\n'; } else if (test.indexOf('notMatch')!=-1) { if (isObjMatched(val, Rval)) errors += '- '+nm+' must not be the same.\n'; } else if (test.indexOf('Match')!=-1) { if (!isObjMatched(val, Rval)) errors += '- '+nm+' must be matched.\n'; } else if (test!='R') { if (isNaN(val)) errors+='- '+nm+' must be a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(test.indexOf('inRange')+7,p); max=test.substring(p+1); if (val= "0") && (c <= "9") || (c == "-") || (c == " ") || (c == "(") || (c == ")")); } function isLetter (c) { return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) ); } function isDigit (c) { return ((c >= "0") && (c <= "9")); } function isValidChar (c) { return ((c!="?")&&(c!=";")&&(c!="%")&&(c!="&")&&(c!="\\")&&(c!="/")&&(c!="!")&&(c!="<")&&(c!=">")); }