function validEmail(email) {

var invalidChars=" /:,;!#$%^&()+*"

if(email.length < 6) {
return false
}

for(i=0; i<invalidChars.length; i++) {
var badChar=invalidChars.charAt(i)
if(email.indexOf(badChar, 0) > -1) {
return false
}
}

var atPos=email.indexOf("@", 1)
if(atPos==-1) {
return false
}

if(email.indexOf("@", atPos+1) !=-1) {
return false
}

var periodPos=email.indexOf(".", atPos)
if(periodPos==-1) {
return false
}

if(atPos+1==periodPos) {
return false
}

if(periodPos+3>email.length) {
return false
}
return true
}

function validate(){
if (document.quote.project.value == ""){
alert('Please tell us about your project.');
document.quote.project.focus();
return (false);
}

if (document.quote.contactName.value == ""){
alert('Please enter your name.');
document.quote.contactName.focus();
return (false);
}

if (! validEmail(document.quote.email.value)){
alert('Invalid email address. Please enter a valid address.')
document.quote.email.value=""
document.quote.email.focus()
return (false)
}
return (true);
}


function validateReg(){
if (document.reg.recipName.value == ""){
alert('Please enter your name.');
document.reg.recipName.focus();
return (false);
}

if (! validEmail(document.reg.email.value)){
alert('Invalid email address. Please enter a valid address.')
document.reg.email.value=""
document.reg.email.focus()
return (false)
}
return (true);
}