/* combines email validator script with required field validator script */function checkinput(toCheck) {	if ( checkemail(toCheck.mailfrom) ) {		if ( checkblanks(toCheck) ) {			return true;		}	}	return false; }/* 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.select();	/* highlight the bad field *//*		toCheck.value=""; */ /*	erase what they entered. I think this is rude. */		return false;	}	return true; }function checkblanks(form) {/*	alert('name: ' + toCheck.name); */	len = (form.length);	for (i = 0; i < len; i++) {		eName = form.elements[i].name;		eVal = form.elements[i].value;		if ((eName[0] == '*') && (eVal == '')) {			alert('All fields with an * next to them must be filled in.\n' + eName + ' is empty!');	    form.element[i].focus();	    return false;		}	}	return true;}