function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
  {alert(alerttxt);return false;}
else {return true;}
}
}

function validate_form(thisform)
{
	if (name1.value=="")
	{
		alert ("Please enter the at least one name");
		name1.focus();
		return false;
	}
	
		if (phone1.value=="")
	{
		alert ("Please enter your number");
		phone1.focus();
		return false;
	}
	
	if (name1.value.indexOf("+") > -1)
	{
		alert ("You cannot add plusses. Please only full names. If you need your friends to add their names then grab the code below and paste into your social networking bullitens, or siimply email them the link to this page.");
		name1.focus();
		return false;
	}
	

	
	
	if (validate_email(email1,"Please enter a valid e-mail address!")==false)
	{
		email1.focus();
		return false;	
	}
	
	if (terms.checked == false)
	{
		document.registerForm.terms.checked=false;
		alert ("Please Check if you have read the terms and conditions");
		return false;
	}
}
