// Validate the form fields function validateIt(theForm){ if (!checkString(theForm.nom, "First Name")) return false; else { if (!isAlphabetic(stripWhitespace(theForm.nom.value))) { alert("First name must be alphabetic") return false; } if (!checkString(theForm.lnom, "Last Name")) return false; else if (!isAlphabetic(stripWhitespace(theForm.lnom.value))){ alert("Last name must be alphabetic") return false; } } if (!checkString(theForm.cnom, "Company Name")) { return false; } if (!checkEmail(theForm.em)) { return false; } if (!checkString(theForm.fon, "Phone number")) { return false; } if (!checkString(theForm.adr, "Address")) { return false; } if (!checkString(theForm.cty, "City")) { return false; } if (!checkString(theForm.cntry, "Country")) { return false; } return true; } function myNewWindow(url, winName) { var width="400", height="400"; var left = (screen.width/2) - width/2; var top = (screen.height/2) - height/2; var styleStr = 'scrollbars=1,resizable=1,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top; windowHandle = window.open(url,winName, styleStr); if (!windowHandle.opener) windowhandle.opener = self; return true; }