var emailexp = /^[a-z][a-z_0-9\-\.]+@[a-z_0-9\.\-]+\.[a-z]{2,3}$/i function validateEmail(str) { return emailexp.test(str) } var phoneexp = /^([0-9]{10}|[0-9]{9}|[0-9]{8})|([0-9]{2}|[0-9]{4})\s{1}+([0-9]{3}|[0-9]{4})\s{1}+([0-9]{3}|[0-9]{4})|([0-9]{2}|[0-9]{4}){1}+([0-9]{3}|[0-9]{4}){1}+([0-9]{3}|[0-9]{4})|([0-9]{2}|[0-9]{4})\s{1}+([0-9]{3}|[0-9]{4}){1}+([0-9]{3}|[0-9]{4})$/i function validatePhone(str) { return phoneexp.test(str) } function FormValidate(frmName) { var form = document.getElementById(frmName); var ans; ans = true; for (var i=0; i < form.elements.length; i++) { if (ans == true) { if (form[i].id == "name") { if (form[i].value == "") { alert("Please enter your name"); ans = false; form[i].focus(); } } } if (ans == true) { if (form[i].id == "Store") { if (form[i].value == "") { alert("You need to select the store closet to you"); ans = false; form[i].focus(); } } } if (ans == true) { if (form[i].id == "phone") { if (form[i].value == "") { alert("Please enter your contact telephone number"); ans = false; form[i].focus(); } if (ans == true) { if (validatePhone(form[i].value) == false) { alert("Phone number must contain numbers only.\nNumber groups can be separated by a single space only."); ans = false; form[i].focus(); } } } } if (ans == true) { if (form[i].id == "region") { if (form[i].value == "") { alert("Please enter your desired region / state"); ans = false; form[i].focus(); } } } if (ans == true) { if (form[i].id == "address") { if (form[i].value == "") { alert("Please enter your address"); ans = false; form[i].focus(); } } } if (ans == true) { if (form[i].id == "timeframe") { if (form[i].value == "") { alert("Please enter your expected timeframe for opening your business"); ans = false; form[i].focus(); } } } if (ans == true) { if (form[i].id == "email") { if (form[i].value == "") { alert("Please enter your Email Address"); ans = false; form[i].focus(); } if (ans == true) { if (validateEmail(form[i].value) == false) { alert("Email address invalid. \n Please enter a valid email address"); ans = false; form[i].focus(); } } } } } return ans; } // copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/ // Distribute this script freely, but keep this // notice with the code. var resetRolls = new Object(); function resetimage(src) { this.src=src; this.confirm=true; this.alt="Reset"; this.write=resetimage_write; } function resetimage_write() { document.write(''); document.write('' + this.alt + ''); } /* var ri = new resetimage("graphics/clear.jpg"); ri.write(); /* */