
function fnValidateForm()
{
	
	if(strFirstName.value == "")
	{
		alert("You must enter your First Name");
		document.getElementById("firstName").focus();
		return false;
	}

	if (strLastName.value == "")
	{
		alert("You must enter your Last Name");
		document.getElementById("lastName").focus();
		return false;
	}
	
	if (strEmail.value.indexOf("@") ==-1  || strEmail.value.indexOf(".")==-1)
	{
		window.alert("Please enter a valid Email Address");		
		document.getElementById("email").focus();
		return false;
	}
	
	if (strChkbox.checked == "")
	{
    alert("To receive your FREE Fat Loss Manual, you must subscribe to the Vital Fit eNewsletter");
	return false;
	}
/*	
	if (strChkbox.value == "")
	{
		alert("To receive your FREE Fat Loss Manual, you must subscribe to the Vital Fit eNewsletter");
		document.getElementById("chkbox").focus();
		return false;
	}
*/	
}

/*
function validate(chk){
  if (chk.checked == 1)
    alert("Thank You");
  else
    alert("You didn't check it! Let me check it for you.")
    chk.checked = 1; 
}
*/






	
/*	if (strStreet.value == "")
	{
		alert("You must enter your Street Name & Number");
		document.getElementById("street").focus();
		return false;
	}
	
	if (strSuburb.value == "")
	{
		alert("You must enter your Suburb");		
		document.getElementById("suburb").focus();
		return false;
	}
	
	if (strPostCode.value == "" || isNaN(strPostCode.value))
	{
		window.alert("Your Post Code is a four digit number");		
		document.getElementById("postCode").focus();
		return false;
	}
	
	if (strState.value == "")
	{
		window.alert("You must enter your State");		
		document.getElementById("state").focus();
		return false;
	}
	
	if (strContactNo.value == "" || isNaN(strContactNo.value))
	{
		window.alert("You must enter your Phone Number");		
		document.getElementById("contactNo").focus();
		return false;
	}
*/

	
/*
	if (strPassword.value == "")
	{
		window.alert("You must enter a Password");		
		document.getElementById("password").focus();
		return false;
	}
*/


//-------------------------------------------------------------------------------;

// create variable to submit data when button is clicked

	var strFirstName = document.getElementById("firstName");
	var strLastName = document.getElementById("lastName");

/*
	var strStreet = document.getElementById("street");
	var strSuburb = document.getElementById("suburb");
	var strPostCode = document.getElementById("postCode");
	var strState = document.getElementById("state");
	var strContactNo = document.getElementById("contactNo");
*/

	var strEmail = document.getElementById("email");
	var strChkbox = document.getElementById("chkbox");

/*
	var strPassword = document.getElementById("password");
*/

	var form1 = document.getElementById("signUpForm");
	

//-------------------------------------------------------------------------------;

// put cursor in first text box

	strFirstName.focus();

// use event handler to run function
	
	form1.onsubmit = fnValidateForm;
	
//-------------------------------------------------------------------------------;
	

