function ValidateData(theForm) {
	//First Name
	if (theForm.First_Name.value.length < 1 ){
		alert("Please enter your first name.");
		theForm.First_Name.focus();
		return(false);
	}
	if (theForm.Last_Name.value.length < 1 ){
		alert("Please enter your last name.");
		theForm.Last_Name.focus();
		return(false);
	}
	if (theForm.Address.value.length < 1 ){
		alert("Please enter your address.");
		theForm.Address.focus();
		return(false);
	}
	if (theForm.City.value.length < 1 ){
		alert("Please enter your city.");
		theForm.City.focus();
		return(false);
	}
	if (theForm.Province.value.length < 1 ){
		alert("Please enter your province.");
		theForm.Province.focus();
		return(false);
	}
	if (theForm.Postal_Code.value.length < 1 ){
		alert("Please enter your postal code.");
		theForm.Postal_Code.focus();
		return(false);
	}
	if (theForm.Primary_Phone.value.length < 1 ){
		alert("Please enter your primary phone.");
		theForm.Primary_Phone.focus();
		return(false);
	}
	
	if (theForm.Email.value == "" || theForm.Email.value == null) {
        alert( "Please enter your email address." );
        theForm.Email.focus();
        return false ;
    }
	
	// test if valid email address, must have @ and .
	var checkEmail = "@.";
	var checkStr = theForm.Email.value;
	var EmailValid = false;
	var EmailAt = false;
	var EmailPeriod = false;
	
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkEmail.length;  j++)
		{
			if (ch == checkEmail.charAt(j) && ch == "@")
				EmailAt = true;
			if (ch == checkEmail.charAt(j) && ch == ".")
				EmailPeriod = true;
	  		if (EmailAt && EmailPeriod)
				break;
	  		if (j == checkEmail.length)
				break;
		}
	
	// if both the @ and . were in the string
	if (EmailAt && EmailPeriod)
	{
		EmailValid = true
		break;
	}
	}

	if (!EmailValid)
	{
		alert("The \"email\" field must contain an \"@\" and a \".\".");
		theForm.Email.focus();
		return false;
	}		
}
function convertUcase(obj) {
  var tmpStr1;
  var tmpStr2;
  var tmpStr;
  //get the string
  tmpStr1 = obj.value;
  //get first character
  tmpStr2 = tmpStr1.charAt(0);
  //convert it to uppercase
  tmpStr = tmpStr2.toUpperCase();
  //get string without first character
  tmpStr1 = tmpStr1.substring(1,tmpStr1.length);
  //put it all back together
  tmpStr2 = tmpStr + tmpStr1;
  //theForm.txtFullName.focus();
  //alert(tmpStr2);
  obj.value = tmpStr2;
  return(true);
}
function redirect(path)
 { 
  window.location = path
 }


