function popupWindow(url) { var windowFeatures ="menubar=no,scrollbars=no,location=yes,favorites=no,resizable=no,status=no,toolbar=no,directories=no"; var winLeft = (screen.width-300)/2; var winTop = (screen.height-(250+110))/2; var wideWindow = window.open(url,wideWindow, "left="+winLeft+",top="+ winTop+",height=250,width=300"+windowFeatures); } //Automatically generated by Xsite. //Developed by Matthew Delmarter. //Do not use without permission. function validate_form(form) { //Set the errors string variable var errors='' if (form.firstname.value == '') { errors += '- First Name is required\n';} if (form.lastname.value == '') { errors += '- Last Name is required\n';} if (form.email.value == '') { errors += '- Email is required\n';} //validate the email address if (form.email.value > '') { if (form.email.value.indexOf('@') < 1 || form.email.value.indexOf('http') >= 1 || form.email.value.indexOf('url') >= 1 ) { errors += '- The Email Address is not valid\n'; } } if (form.address1_type0.value == '') { errors += '- Please fill in your address\n';} if (form.city_type0.value == '') { errors += '- Please fill in your city\n';} if (form.comments.value == '') { errors += '- Message is required\n'; } //validate the email address if (form.comments.value > '') { if (form.comments.value.indexOf('@') > 1 ) { errors += '- The Text Area is not valid\n'; } } //Output the errors if (errors) { alert('The following error(s) occurred:\n\n' + errors); return (false); } }