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 checkEmail(value){
	var chk = echeck(value);
	if (chk==false) {
		alert("Please enter a valid email address.");
		return false;
	}
	return true;
 }

function _checknews(f) {
	if (f.custLoc.selectedIndex==0) {
		alert("Please select a location.");
		return false;
	}
	var chk = echeck(f.custEmail.value);
	if (chk==false) {
		alert("Please enter a valid email address.");
		return false;
	}
	return true;
}

function _checksubscribe(f) {
	var chk = f["cm-fo-68320"];
	var selected = false;
	for (var i=0;i<=chk.length-1;i++){
		if (chk[i].checked==true) selected=true;
	}
	if (selected==false) {
		alert("Please select at least one location. Thank you.");
		return false;
	}else{
		return true;
	}
}