<!-- DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/) -->function echeck(str) {		var at="@"		var dot="."		var lat=str.indexOf(at)		var lstr=str.length		var ldot=str.indexOf(dot)		/* check for missing at */		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){			return false		}		/* check for missing dot */		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){			return false		}		/* check for multiple at */		if (str.indexOf(at,(lat+1))!=-1){			return false		}		/* check for at and dot side by side */		if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){			return false		}		/* check for dot AFTER at -- wouldn't compare of lat and ldot work better? */		if (str.indexOf(dot,(lat+2))==-1){			return false		}		/* check for any spaces */		if (str.indexOf(" ")!=-1){			return false		} 		return true						}function checkemail(toCheck){	if ((toCheck.value==null)||(toCheck.value=="")){		return true	}	if (echeck(toCheck.value)==false){	    alert("The address you entered is not a valid email address. If you do not have a valid email address, leave it blank.");/*		toCheck.focus();	this does not work for some reason *//*	    toCheck.value="";	this is rude */		return false;	}	return true }
