<!-- Begin

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){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		return false
	}
	
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		return false
	}
	
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		 return false
	}
	
	if (str.indexOf(at,(lat+1))!=-1){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		 return false
	}
	
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		 return false
	}
	
	if (str.indexOf(dot,(lat+2))==-1){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		 return false
	}
	
	if (str.indexOf(" ")!=-1){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		 return false
	}
	
	return true					
}

function check_email(){
	var emailID=document.app01aformeng.email;
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		document.app01aformeng.email.focus()
	}
}

function check_email2() {
	var emailField1 = document.app01aformeng.email.value;
	var emailField2 = document.app01aformeng.email2.value;
	var err = 0;
	if (emailField1 == emailField2){
		err = 0;
	}
	else {
		alert("We cannot confirm the e-mail address you provided. Please re-enter your e-mail.");
		document.app01aformeng.email2.value=""
		document.app01aformeng.email2.focus()
	}
}
//  End -->

