function formval(checko)
{
if (checko.firstname.value.length > 15 || checko.firstname.value.length == 0)
	{
	alert("First Name  is required \n 15 or less characters please");
	return false;
	}
if (checko.lastname.value.length > 20 || checko.lastname.value.length ==0)
	{
	alert("Last Name is required \n 20 characters or less");
	return false;
	}
if (checko.address.value.length >50 || checko.address.value.length ==0)
	{
	alert("Address is required \n 50 or less characters please");
	return false;
	}
if (checko.address2.value.length > 50)
	{
	alert("please restrain address to 50 or less characters");
	return false;
	}
if (checko.city.value.length >20 || checko.city.value.length ==0)
	{
	alert("City is required \n 20 or less characters please");
	return false;
	}
if (checko.state.value.length >2 || checko.state.value.length ==0)
	{
	alert("State is required \n use two character abreviation for state");
	return false;
	}
if (checko.zip.value.length > 5 || checko.zip.value.length == 0)
	{
	alert("Zip code is required \n 5 characters please");
	return false;
	}
if (checko.phone.value.length > 14 || checko.phone.value.length == 0)
	{
	alert("Phone is required \n 14 or less characters please");
	return false;
	}

if (checko.carreerLevel)
	{ if (checko.carreerLevel.value.length<=0)
		{
		alert("you must select a carreer level");
		return false;
		}
	}


if (checko.password1.value < checko.password2.value || checko.password1.value > checko.password2.value || checko.password1.value.length==0)
	{
	alert("the passwords you entered are either: \n\n not similar \n\n or\n\n left blank");
	return false;
	}



	var emailo= checko.email.value;
	var srch=/@/;
	var srch2=/\./;		

	alert(emailo.length);										//the string "@" you are searching for in email address
	
	var isin = srch.test(emailo);			//test the email  for "@" in variable srch
	var isin2 = srch2.test(emailo);			//test the email for '.'
	
	if(!isin||emailo.length<5||!isin2)				//check for a legnth at least of 5 and the @ symbol in the email address
		{	
			alert("Invalid Email Address");
			return false;
		}
	else
		return true;



 //return(checkemail(checko.email.value));

}

function checkemail(theEmail)
{	
	var emailo= checko.email.value;
	var srch=/@/;
	var srch2=/\./;		

	alert(emailo.length);										//the string "@" you are searching for in email address
	
	var isin = srch.test(emailo);			//test the email  for "@" in variable srch
	var isin2 = srch2.test(emailo);			//test the email for '.'
	
	if(!isin||emailo.length<5||!isin2)				//check for a legnth at least of 5 and the @ symbol in the email address
		{	
			alert("Invalid Email Address");
			return false;
		}
	else
		return true;
}

