function submitIt() {
    var theForm = document.forms["quote"];  
    if(validate()) {
        //document.form1.submit();
    } else {
        return false;
    };
};

function validate() {
    var theForm = document.forms["quote"];  
	
	  //First Name
    var strfN = document.form1.username.value;
    if (strfN == "")
    {
        alert("Please enter your username.");
        document.form1.username.focus();
        return false;
    };
	
	
	  
	
	 //Email
    var strEmail = document.form1.email.value;
    if (strEmail == "")
    {
        alert("Please enter your Email.");
        document.form1.email.focus();
        return false;
    }
    else if (!isEmail(strEmail))
    {
        alert("Please enter a valid Email.");
        document.form1.email.focus();
        return false;
    };
	
	//First Name
    var strfN = document.form1.password.value;
    if (strfN == "")
    {
        alert("Please enter your password.");
        document.form1.password.focus();
        return false;
    };
	
	//First Name
    var strfN = document.form1.passconf.value;
    if (strfN == "")
    {
        alert("Please confirm your password.");
        document.form1.passconf.focus();
        return false;
    };
	
	
	//First Name
    var pass = document.form1.password.value;
	var passC = document.form1.passconf.value;

    if (pass != passC)
    {
        alert("Your passwords do not match, please try again.");
		document.form1.password.value="";
		document.form1.passconf.value="";
        document.form1.password.focus();
        return false;
    };
	
	//First Name
    var strfN = document.form1.zip.value;
    if (strfN == "")
    {
        alert("Please enter your zip code.");
        document.form1.zip.focus();
        return false;
    };
	
	
		//First Name
    
    if (document.form1.agree.checked==false)
    {
        alert("Please agree to the terms and conditions.");
        document.form1.agree.focus();
        return false;
    };
	
	
	
	return true;
	
};

function isEmail(strEmail)
{
	var re = /^([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/
	return (re.test(strEmail));
};

