// CHECK REGISTRATION
function SignupCheck(form) {
hasDot = form.email.value.indexOf(".");
hasAt = form.email.value.indexOf("@");

if (hasDot == -1 || hasAt == -1) {
	alert("Please enter your Email Address.");
	form.email.focus();
	form.email.select();
	return false;
}

//First Name Check
valcheck = form.fname;
if (valcheck.value == "") {
	alert("Please enter your First Name");
	valcheck.focus();
	valcheck.select();
	return false;
}

//Last Name Check			
valcheck = form.lname;
if (valcheck.value == "") {
	alert("Please enter your Last Name");
	valcheck.focus();
	valcheck.select();
	return false;
} 


//State Check			
valcheck = form.state;
if(valcheck.selectedIndex == -1 || valcheck.value == "") {
	alert("Please enter your State");
	valcheck.focus();
	return false;
}

//Zip Check	
valcheck = form.zip;
if (valcheck.value == "") {
	alert("Please enter your Zip Code");
	valcheck.focus();
	valcheck.select();
	return false;
}


//Birth Month			
valcheck = document.getElementById("bmonth");
if(valcheck.selectedIndex ==0) {
	alert("Please enter your Birth Month");
	return false;
}

//Birth Day				
valcheck = document.getElementById("bday");
if(valcheck.selectedIndex ==0) {
	alert("Please enter your Birth Day");
	return false;
}

//Birth Year				
valcheck = document.getElementById("byear");
if(valcheck.selectedIndex ==0) {
	alert("Please enter your Birth Year");
	return false;
}
 else {
	return true;
}
}

//EMAIL CHECK
function EmailCheck(form) {
hasDot = form.email.value.indexOf(".");
hasAt = form.email.value.indexOf("@");

if (hasDot == -1 || hasAt == -1) {
	alert("Please enter your Email Address.");
	form.email.focus();
	form.email.select();
	return false;
} else {
var thelink = 'signup.aspx?tbEmail=' + form.email.value;
   window.location.href= thelink;
return false;
}
}

// OPEN WINDOW
function openWin(url,name,popW,popH) {
w = screen.availWidth;
h = screen.availHeight;
leftPos = 5;
topPos = 5;
window.open(url,name,'width='+popW+',height='+popH+',scrollbars=no,toolbar=no,status=no,resizable=yes,top='+ topPos+',left='+leftPos);
}
