function zip(element) { var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890-"; var checkStr = element.value; var allValid = true; var decPoints = 0; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("The Zip Code field cannot contain characters like * ñ / : ! & ^. Please go back and update that field."); element.focus(); return (false); } return (true); } function social(element) { var checkOK = "1234567890"; var checkStr = element.value; var allValid = true; var decPoints = 0; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } var strCant = element.value; if ((element.name == "social_sec1" && strCant.length != 3) || (element.name == "social_sec2" && strCant.length != 2) || (element.name == "social_sec3" && strCant.length != 4)){ alert("You must provide the exact amount of numbers for your social security number. Example: xxx-xx-xxxx"); element.focus(); return false; } if (!allValid) { alert("Your Social Security can only contain numbers. Please go back and update that field."); element.focus(); return (false); } return (true); } function phone(element) { var checkOK = "1234567890-. ()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; var checkStr = element.value; var allValid = true; var decPoints = 0; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("The Phone Number field can only contain numbers. Please go back and update that field."); element.focus(); return (false); } return (true); } function name(element) { var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ- .áéíóúäëïöüàèìòùâêîôûçÇñÑÁÉÍÓÚÄËÏÖÜÀÈÌÒÙÂÊÎÔÛ"; var checkStr = element.value; var allValid = true; var decPoints = 0; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("The Name field cannot contain characters like * ñ / : ! & ^. Please go back and update that field."); element.focus(); return (false); } return (true); } /* orden.js compiled from X 4.0 with XC 0.28b. Distributed under GNU LGPL. For copyrights, license, documentation and more visit Cross-Browser.com */ var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xNN4,xUA=navigator.userAgent.toLowerCase(); if(window.opera) { var i=xUA.indexOf('opera'); if(i!=-1){var v=parseInt(xUA.charAt(i+6)); xOp7Up=v>=7;xOp6Dn=v<7; } }else if(navigator.vendor!='KDE' && document.all && xUA.indexOf('msie')!=-1){ xIE4Up=parseFloat(navigator.appVersion)>=4; xIE4=xUA.indexOf('msie 4')!=-1; xIE5=xUA.indexOf('msie 5')!=-1; }else if(document.layers){ xNN4=true; } xMac=xUA.indexOf('mac')!=-1; function xGetElementById(e) { if(typeof(e)!='string') return e; if(document.getElementById) e=document.getElementById(e); else if(document.all) e=document.all[e]; else e=null; return e; } function xInnerHtml(e,h) { if(!(e=xGetElementById(e)) || !xStr(e.innerHTML)) return null; var s = e.innerHTML; if (xStr(h)) { e.innerHTML = h; } return s; } function xStr(s) { for(var i=0; i