//Advanced Email Check credit-
//By JavaScript Kit (http://www.javascriptkit.com)
//Over 200+ free scripts here!
var testresults
function checkemail(){
var str=document.FeedbackForm.email.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (str.length==0){
  //null email address entered
	var r=confirm("You did not enter an email address.\n\nPress 'OK' to continue (send anonymously, no reply possible)\nor\nPress 'Cancel' to go back and enter your email")
  if (r==true)
    {
		//'OK' pressed, proceed anonymously
    testresults=true
    }
	else{
		//'Cancel' pressed, go back and re-enter email
		setFocus("email")
		testresults=false
		}
	}
else if (filter.test(str)){
	testresults=true
	}
else{
	alert("The email entered is an invalid address.\n\nPlease input a valid email address!")
	setFocus("email")
	testresults=false
	}
return (testresults)
}
 
function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}
