function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function validEmail(email) {
	invalidChars = " /:,;"
	
	if (email == "") {// cannot be empty
				return false
	}
	for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
	badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) > -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)			// there must be one "@" symbol
		if (atPos == -1) {
			return false
		}
		if (email.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
			return false
		}
	periodPos = email.indexOf(".",atPos)
		if (periodPos == -1) {			// and at least one "." after the "@"
			return false
		}
		if (periodPos+3 > email.length)	{	// must be at least 2 characters after the "."
			return false
		}
	return true
}

	

//this goes in the validation function....
		

function validateMe() {
	var myName = document.form1.name;
	var myPhone = document.form1.phone;
	var myEmail = document.form1.email;
	var myZip = document.form1.zip;
	
	if (myName.value == ""){
		alert("Please enter your name.");
		myName.focus();
		return false;
		}		
	if (myZip.value == "" || isNaN(myZip.value) || myZip.value.length < 5){
		alert("Please enter a valid zip code.");
		myZip.focus();
		myZip.select();
		return false;
		}		
	if (myPhone.value == "" || !(myPhone.value.indexOf('-'))){
		alert("Please enter your phone number.");
		myPhone.focus();
		myPhone.select();
		return false;
		}
	//if (myEmail.value == ""){
		//alert("Please enter your e-mail address.");
		//myEmail.focus();
		//return false;
		//}
	if (!validEmail(myEmail.value)) {
	alert("Please enter a valid e-mail address")
	myEmail.focus()
	myEmail.select()
	return false
	}
	}