
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 submitForm(){
	problem = false
	feedback =""
	if (signupForm.first.value.length == 0){
		feedback += "Please enter your First Name.\n"
		problem = true
	}
	if (signupForm.last.value.length == 0){
		feedback += "Please enter your Last Name.\n"
		problem = true
	}
	if (signupForm.email.value.length == 0){
		feedback += "Please enter your Email Address.\n"
		problem = true
	}
	if(signupForm.email.value != signupForm.emailC.value){
		 feedback += "The Email Address and Email Address confirmation do not match.\n"
		 problem = true
	}
	if (signupForm.password.value.length < 7){
		feedback += "Please enter a Password of at least 7 characters.\n"
		problem = true
	}
	if(signupForm.password.value != signupForm.passwordC.value){
		 feedback += "The Password and Password confirmation do not match.\n"
		 problem = true
	}
	if (echeck(signupForm.email.value)==false){
		signupForm.email.value=""
		signupForm.email.focus()
		feedback += "That is not a correct email address.\n"
		problem = true
	}
	if (signupForm.agree.checked == false){
		signupForm.agree.focus()
		feedback += "Please check the box to agree with the terms of service.\n"
		problem = true
	}
	if (signupForm.letters.value.length != 3){
		feedback += "Please enter the three letters you see.\n"
		problem = true
	}
	if (problem == false){
		signupForm.submit()
	}else{
		alert(feedback)
	}
}
function popupwindow(url,popupname,parameters){
	window.open(url,popupname,parameters);
}
$(document).ready(function(){
	var imgTracker = new Image();
	imgTracker.src = 'zmhp.gif?screensize=|' + $(window).width() + '|' + $(window).height() + '|';
});
