/////////////email function function seo_dircompare(arr) { for(i=0;i255) { alert("Destination IP address is invalid!") return false } } return true } var domainArray=domain.match(domainPat) if (domainArray==null) { alert("The domain name doesn't seem to be valid.") return false } var atomPat=new RegExp(atom,"g") var domArr=domain.match(atomPat) var len=domArr.length if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>4) { alert("The address must end in a valid domain, or two letter country.") return false } if (len<2) { var errStr="This address is missing a hostname!" alert(errStr) return false } return true; } function sbis_empty(sbstr) { sbnew_str=sbstr.replace(/^\s+|\s+$/g,""); if(sbnew_str.length >0) return (false); else return (true); } function seo_string(field_name,str,dirlist,dirchk) { dir_pat=RegExp("^("+dirlist.replace(/,/g,"|")+")$","i"); dir_str=dirlist.replace(/,/g,", "); //if(str.match(/^[^a-zA-Z]|[^a-zA-Z0-9_\-]|[^a-zA-Z]$/)) if(str.match(/[\.\/\?&\% ]/)) return (field_name+" must not contain \.\/\?&\% characters"); else if(dirchk==true && str.match(dir_pat) ) return ("This value of "+field_name+" is not allowed. Try appending /removing some characters to the value"); else return false; } function sbconvert_toseo(title,seo) { //a=title.value.replace(/^[^a-zA-Z]+/,""); //a=a.replace(/[^a-zA-Z0-9_\-]+/g,"_"); //a=a.replace(/[^a-zA-Z]+$/,""); a=title.value.replace(/[\.\/\?&\% ]+/g,"_"); seo.value=a; } function sbcurrency_js_format(amount) { sbseparator=','; sbdecimal_point='.'; amount=amount.toString().replace(/\./,sbdecimal_point); return(amount); } function isNaCurrency(amount) { if(amount=="" || amount.toString().match(/^[+\-]?[0-9]+[,\.]?[0-9]*$/)) return false; else return true; } function currency_calculation_format(value) { value=value.toString().replace(/,/,"."); value=value.toString().replace(/\./,"."); return value; } function sbempty_field(obj) { if(obj.value=="keywords" || obj.value=="zip code" || obj.value=="First Name" || obj.value=="Email" || obj.value=="Comment / Feedback") obj.value=""; }