function echeck(str) {
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		return false
	}
	 if (str.indexOf(at,(lat+1))!=-1){
		return false
	 }
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		return false
	 }
	 if (str.indexOf(dot,(lat+2))==-1){
		return false
	 }
	 if (str.indexOf(" ")!=-1){
		return false
	 }
	 return true
}
function submitForm(){
	problem = false
	feedback =""
	if(document.forms[0].email.value != document.forms[0].emailC.value){
		 feedback += "The Email Address and Email Address confirmation do not match.\n"
		 problem = true
	}
	if (echeck(document.forms[0].email.value)==false){
		document.forms[0].email.value=""
		document.forms[0].email.focus()
		feedback += "That is not a correct email address.\n"
		problem = true
	}
	if (problem == false){
		document.forms[0].submit()
	}else{
		alert(feedback)
	}
}
function submitFormWithEnter(myfield,e)  
{  
   var keycode;  
   if (window.event)  
   {  
      keycode = window.event.keyCode;  
   }  
   else if (e)  
   {  
      keycode = e.which;  
   }  
   else  
   {  
      return true;  
   }  
  
   if (keycode == 13)  
   {  
      submitForm();  
      return false;  
   }  
   else  
   {  
      return true;  
   }  
}  