	   	function validEmail(Email) {
         invalidChars = " /:,;"

         if (Email == "") {                                              
                 return false
         }
         for (i=0; i<invalidChars.length; i++) { 
                 badChar = invalidChars.charAt(i)
                 if (Email.indexOf(badChar,0) > -1) {
                         return false
                 }
         }
         atPos = Email.indexOf("@",1)                  
         if (atPos == -1) {
                 return false
         }
         if (Email.indexOf("@",atPos+1) != -1) { 
                 return false
         }
         periodPos = Email.indexOf(".",atPos)
         if (periodPos == -1) {                                 
                 return false
         }
         if (periodPos+3 > Email.length) {              
                 return false
         }
         return true
       }


function pullBoth(pulldown_menu){

	var STATE = document.pulldown_menu.corporation_state.options[document.pulldown_menu.corporation_state.selectedIndex].value;
	var ENTITY = document.pulldown_menu.type_of_entity.options[document.pulldown_menu.type_of_entity.selectedIndex].value;
	if (STATE == "new_york" && ENTITY == "corporation")
		{window.location.href = "http://www.tristateincorporate.com/states/ny/corp/ny_corp_incorporator_info.html"}
	if (STATE == "new_york" && ENTITY == "llc")
		{window.location.href = 'http://www.tristateincorporate.com/states/ny/llc/ny_llc_organizer_info.html'};
	if (STATE == "new_jersey" && ENTITY == "corporation")
		{window.location.href = 'http://www.tristateincorporate.com/states/nj/corp/nj_corp_incorporator_info.html'};
	if (STATE == "new_jersey" && ENTITY == "llc")
		{window.location.href = 'http://www.tristateincorporate.com/states/nj/llc/nj_llc_organizer_info.html'};
	if (STATE == "connecticut" && ENTITY == "corporation")
		{window.location.href = 'http://www.tristateincorporate.com/states/conn/index.html'};
	if (STATE == "connecticut" && ENTITY == "llc")
		{window.location.href = 'http://www.tristateincorporate.com/states/conn/index.html'};
		
	if (STATE == "" && ENTITY == "") {alert("Please Select a State and an Entity")}
	if (STATE == "" && ENTITY != "") {alert("Please Select a State")}
	if (STATE != "" && ENTITY == "") {alert("Please Select an Entity")}

}


function pullLLC(llc_pulldown_menu){
	var LLCURL = document.llc_pulldown_menu.choose_state_for_llc.options[document.llc_pulldown_menu.choose_state_for_llc.selectedIndex].value;
	window.location.href = LLCURL;
}


function pullCorp(corp_pulldown_menu){
	var CORPURL = document.corp_pulldown_menu.choose_state_for_corp.options[document.corp_pulldown_menu.choose_state_for_corp.selectedIndex].value;
	window.location.href = CORPURL;
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=225,left = 550,top = 375');");
}


 function submitIt(Form) {


/**
Start Incoprporator Information
**/

	if (Form.Name) {
		if (Form.Name.value == ""){
			 alert("Please Enter Your Name");
			 Form.Name.focus();
			 return false;
		}
	}
	
	if (Form.Email) {
		if (Form.Email.value == ""){
			 alert("Please Enter Your Email Address");
			 Form.Email.focus();
			 return false;
		}
		
		if (!validEmail(Form.Email.value)) {
			alert("Please Enter a Valid Email Address")
			Form.Email.focus()
			Form.Email.select()
			return false;
		}
	}
	
	if (Form.Phone_Area_Code) {
		if (Form.Phone_Area_Code.value == ""){
			 alert("Please Enter the Area Code of Your Phone Number");
			 Form.Phone_Area_Code.focus();
			 return false;
	    }
	}
	
	if (Form.Phone_First_Three) {
		if (Form.Phone_First_Three.value == ""){
			 alert("Please Enter the First Three Digits of Your Phone Number");
			 Form.Phone_First_Three.focus();
			 return false;
	    }
	}
	
	if (Form.Phone_Last_Four) {
		if (Form.Phone_Last_Four.value == ""){
			 alert("Please Enter the Last Four Digits of Your Phone Number");
			 Form.Phone_Last_Four.focus();
			 return false;
	    }
	}

	if (Form.Incorporator_First_Name) {
		if (Form.Incorporator_First_Name.value == ""){
			 alert("Please Enter the Incorporator's First Name");
			 Form.Incorporator_First_Name.focus();
			 return false;
		}
	}
	
	if (Form.Incorporator_Last_Name) {
		if (Form.Incorporator_Last_Name.value == ""){
			 alert("Please Enter the Incorporator's Last Name");
			 Form.Incorporator_Last_Name.focus();
			 return false;
		}
	}
	
	if (Form.Incorporator_Email) {
		if (Form.Incorporator_Email.value == ""){
			 alert("Please Enter the Incorporator's Email Address");
			 Form.Incorporator_Email.focus();
			 return false;
		}
		
		if (!validEmail(Form.Incorporator_Email.value)) {
			alert("Please Enter a Valid Email Address")
			Form.Incorporator_Email.focus()
			Form.Incorporator_Email.select()
			return false;
		}
	}
	
	if (Form.Incorporator_Street_Address_1) {
		if (Form.Incorporator_Street_Address_1.value == ""){
			 alert("Please Enter the Incorporator's Street Address");
			 Form.Incorporator_Street_Address_1.focus();
			 return false;
	    }
	}
	
	if (Form.Incorporator_City) {
		if (Form.Incorporator_City.value == ""){
			 alert("Please Enter the Incorporator's City");
			 Form.Incorporator_City.focus();
			 return false;
	    }
	}
	
	if (Form.Incorporator_State) {
		if (Form.Incorporator_State.value == ""){
			 alert("Please Enter the Incorporator's State");
			 Form.Incorporator_State.focus();
			 return false;
	    }
	}
	
	if (Form.Incorporator_Zip_Code) {
		if (Form.Incorporator_Zip_Code.value == ""){
			 alert("Please Enter the Incorporator's Zip Code");
			 Form.Incorporator_Zip_Code.focus();
			 return false;
	    }
		
		if (Form.Incorporator_Zip_Code.value.length < 5) {
        	alert('Please Enter a Valid 5 Digit Zip Code');
			Form.Incorporator_Zip_Code.focus();
        	return false;
    	}
		
		var valid="0123456789"

    	for (var i=0; i<Form.Incorporator_Zip_Code.value.length; i++) {
        	if (valid.indexOf(Form.Incorporator_Zip_Code.value.charAt(i)) < 0) {
            	alert("Please Enter a Valid 5 Digit Zip Code");
				Form.Incorporator_Zip_Code.focus();
            	return false;
        	}
    	}
	}
	
	if (Form.Incorporator_County) {
		if (Form.Incorporator_County.value == ""){
			 alert("Please Enter the Incorporator's County");
			 Form.Incorporator_County.focus();
			 return false;
	    }
	}

/**
End Incoprporator Information
**/


/**
Start Organizer Information
**/
	
	if (Form.Organizer_First_Name) {
		if (Form.Organizer_First_Name.value == ""){
			 alert("Please Enter the Organizer's First Name");
			 Form.Organizer_First_Name.focus();
			 return false;
		}
	}
	
	if (Form.Organizer_Last_Name) {
		if (Form.Organizer_Last_Name.value == ""){
			 alert("Please Enter the Organizer's Last Name");
			 Form.Organizer_Last_Name.focus();
			 return false;
		}
	}

	if (Form.Organizer_Email) {
		if (Form.Organizer_Email.value == ""){
			 alert("Please Enter the Organizer's Email Address");
			 Form.Organizer_Email.focus();
			 return false;
		}
		
		if (!validEmail(Form.Organizer_Email.value)) {
			alert("Please Enter a Valid Email Address")
			Form.Organizer_Email.focus()
			Form.Organizer_Email.select()
			return false;
		}
	}
	
	if (Form.Organizer_Street_Address_1) {
		if (Form.Organizer_Street_Address_1.value == ""){
			 alert("Please Enter the Organizer's Street Address");
			 Form.Organizer_Street_Address_1.focus();
			 return false;
	    }
	}
	
	if (Form.Organizer_City) {
		if (Form.Organizer_City.value == ""){
			 alert("Please Enter the Organizer's City");
			 Form.Organizer_City.focus();
			 return false;
	    }
	}
	
	if (Form.Organizer_State) {
		if (Form.Organizer_State.value == ""){
			 alert("Please Enter the Organizer's State");
			 Form.Organizer_State.focus();
			 return false;
	    }
	}
	
	if (Form.Organizer_Zip_Code) {
		if (Form.Organizer_Zip_Code.value == ""){
			 alert("Please Enter the Organizer's Zip Code");
			 Form.Organizer_Zip_Code.focus();
			 return false;
	    }
		
		if (Form.Organizer_Zip_Code.value.length < 5) {
        	alert('Please Enter a Valid 5 Digit Zip Code');
			Form.Organizer_Zip_Code.focus();
        	return false;
    	}
		
		var valid="0123456789"

    	for (var i=0; i<Form.Organizer_Zip_Code.value.length; i++) {
        	if (valid.indexOf(Form.Organizer_Zip_Code.value.charAt(i)) < 0) {
            	alert("Please Enter a Valid 5 Digit Zip Code");
				Form.Organizer_Zip_Code.focus();
            	return false;
        	}
    	}
	}
	
	if (Form.Organizer_County) {
		if (Form.Organizer_County.value == ""){
			 alert("Please Enter the Organizer's County");
			 Form.Organizer_County.focus();
			 return false;
	    }
	}

/**
End Organizer Information
**/


/**
Corporation and LLC Information
**/
	
	if (Form.Corporation_First_Choice) {
		if (Form.Corporation_First_Choice.value == ""){
			 alert("Please Enter the Corporation's First Name Choice");
			 Form.Corporation_First_Choice.focus();
			 return false;
	    }
	}
	
	if (Form.Corporation_Second_Choice) {
		if (Form.Corporation_Second_Choice.value == ""){
			 alert("Please Enter the Corporation's Second Name Choice");
			 Form.Corporation_Second_Choice.focus();
			 return false;
	    }
	}
	
	if (Form.Corporation_Extension) {
		if (Form.Corporation_Extension.value == ""){
			 alert("Please Enter the Corporation's Extension");
			 Form.Corporation_Extension.focus();
			 return false;
	    }
	}
	
	if (Form.Corporation_Street_Address_1) {
		if (Form.Corporation_Street_Address_1.value == ""){
			 alert("Please Enter the Corporation's Street Address");
			 Form.Corporation_Street_Address_1.focus();
			 return false;
	    }
	}
	
	if (Form.Corporation_City) {
		if (Form.Corporation_City.value == ""){
			 alert("Please Enter the Corporation's City");
			 Form.Corporation_City.focus();
			 return false;
	    }
	}
	
	if (Form.Corporation_Zip_Code) {
		if (Form.Corporation_Zip_Code.value == ""){
			 alert("Please Enter the Corporation's Zip Code");
			 Form.Corporation_Zip_Code.focus();
			 return false;
	    }
		
		if (Form.Corporation_Zip_Code.value.length < 5) {
        	alert('Please Enter a Valid 5 Digit Zip Code');
			Form.Corporation_Zip_Code.focus();
        	return false;
    	}
		
		var valid="0123456789"

    	for (var i=0; i<Form.Corporation_Zip_Code.value.length; i++) {
        	if (valid.indexOf(Form.Corporation_Zip_Code.value.charAt(i)) < 0) {
            	alert("Please Enter a Valid 5 Digit Zip Code");
				Form.Corporation_Zip_Code.focus();
            	return false;
        	}
    	}
	}
	
	if (Form.Corporation_County) {
		if (Form.Corporation_County.value == ""){
			 alert("Please Enter the Corporation's County");
			 Form.Corporation_County.focus();
			 return false;
	    }
	}

	if (Form.BOD1_First_Name) {
		if (Form.BOD1_First_Name.value == ""){
			 alert("Please Enter at Least One Board of Director's First Name");
			 Form.BOD1_First_Name.focus();
			 return false;
	    }
	}

	if (Form.BOD1_Last_Name) {
		if (Form.BOD1_Last_Name.value == ""){
			 alert("Please Enter at Least One Board of Director's Last Name");
			 Form.BOD1_Last_Name.focus();
			 return false;
	    }
	}

	if (Form.BOD1_Street_Address_1) {
		if (Form.BOD1_Street_Address_1.value == ""){
			 alert("Please Enter at Least One Board of Director's Street Address");
			 Form.BOD1_Street_Address_1.focus();
			 return false;
	    }
	}

	if (Form.BOD1_City) {
		if (Form.BOD1_City.value == ""){
			 alert("Please Enter at Least One Board of Director's City");
			 Form.BOD1_City.focus();
			 return false;
	    }
	}

	if (Form.BOD1_State) {
		if (Form.BOD1_State.value == ""){
			 alert("Please Enter at Least One Board of Director's State");
			 Form.BOD1_State.focus();
			 return false;
	    }
	}

	if (Form.BOD1_Zip_Code) {
		if (Form.BOD1_Zip_Code) {
			if (Form.BOD1_Zip_Code.value == ""){
				 alert("Please Enter at Least One Board of Director's Zip Code");
				 Form.BOD1_Zip_Code.focus();
				 return false;
		    }
		}
		
		if (Form.BOD1_Zip_Code.value.length < 5) {
        	alert('Please Enter a Valid 5 Digit Zip Code!');
			Form.BOD1_Zip_Code.focus();
        	return false;
    	}
		
		var valid="0123456789"

    	for (var i=0; i<Form.BOD1_Zip_Code.value.length; i++) {
        	if (valid.indexOf(Form.BOD1_Zip_Code.value.charAt(i)) < 0) {
            	alert("Please Enter a Valid 5 Digit Zip Code!");
				Form.BOD1_Zip_Code.focus();
            	return false;
        	}
    	}
	}

/**
End Corporation Information
**/



/**
Start LLC Information
**/
		
	if (Form.LLC_First_Choice) {
		if (Form.LLC_First_Choice.value == ""){
			 alert("Please Enter the LLC's First Name Choice");
			 Form.LLC_First_Choice.focus();
			 return false;
	    }
	}
	
	if (Form.LLC_Second_Choice) {
		if (Form.LLC_Second_Choice.value == ""){
			 alert("Please Enter the LLCs Second Name Choice");
			 Form.LLC_Second_Choice.focus();
			 return false;
	    }
	}
	
	if (Form.LLC_Extension) {
		if (Form.LLC_Extension.value == ""){
			 alert("Please Enter the LLC's Extension");
			 Form.LLC_Extension.focus();
			 return false;
	    }
	}
	
	if (Form.LLC_Street_Address_1) {
		if (Form.LLC_Street_Address_1.value == ""){
			 alert("Please Enter the LLC's Street Address");
			 Form.LLC_Street_Address_1.focus();
			 return false;
	    }
	}
	
	if (Form.LLC_City) {
		if (Form.LLC_City.value == ""){
			 alert("Please Enter the LLC's City");
			 Form.LLC_City.focus();
			 return false;
	    }
	}
	
	if (Form.LLC_Zip_Code) {
		if (Form.LLC_Zip_Code.value == ""){
			 alert("Please Enter the LLC's Zip Code");
			 Form.LLC_Zip_Code.focus();
			 return false;
	    }
		
		if (Form.LLC_Zip_Code.value.length < 5) {
        	alert('Please Enter a Valid 5 Digit Zip Code');
			Form.LLC_Zip_Code.focus();
        	return false;
    	}
		
		var valid="0123456789"

    	for (var i=0; i<Form.LLC_Zip_Code.value.length; i++) {
        	if (valid.indexOf(Form.LLC_Zip_Code.value.charAt(i)) < 0) {
            	alert("Please Enter a Valid 5 Digit Zip Code");
				Form.LLC_Zip_Code.focus();
            	return false;
        	}
    	}
	}
	
	if (Form.LLC_County) {
		if (Form.LLC_County.value == ""){
			 alert("Please Enter the LLC's County");
			 Form.LLC_County.focus();
			 return false;
	    }
	}
	
	if (Form.LLC_Purpose) {
		if (Form.LLC_Purpose.value == "" || Form.LLC_Purpose.value == "0000"){
			 alert("Please Enter the LLC's Business Purpose");
			 Form.LLC_Purpose.focus();
			 return false;
	    }
	}

	if (Form.RA_First_Name) {
		if (Form.RA_First_Name.value == ""){
			 alert("Please Enter the Registered Agent's First Name");
			 Form.RA_First_Name.focus();
			 return false;
	    }
	}

	if (Form.RA_Last_Name) {
		if (Form.RA_Last_Name.value == ""){
			 alert("Please Enter the Registered Agent's Last Name");
			 Form.RA_Last_Name.focus();
			 return false;
	    }
	}

	if (Form.RA_Street_Address_1) {
		if (Form.RA_Street_Address_1.value == ""){
			 alert("Please Enter the Registered Agent's Street Address");
			 Form.RA_Street_Address_1.focus();
			 return false;
	    }
	}

	if (Form.RA_City) {
		if (Form.RA_City.value == ""){
			 alert("Please Enter the Registered Agent's City");
			 Form.RA_City.focus();
			 return false;
	    }
	}
	
	if (Form.RA_Zip_Code) {
		if (Form.RA_Zip_Code.value == ""){
			 alert("Please Enter the Registered Agent's Zip Code");
			 Form.RA_Zip_Code.focus();
			 return false;
	    }
		
		if (Form.RA_Zip_Code.value.length < 5) {
        	alert('Please Enter a Valid 5 Digit Zip Code');
			Form.RA_Zip_Code.focus();
        	return false;
    	}
		
		var valid="0123456789"

    	for (var i=0; i<Form.RA_Zip_Code.value.length; i++) {
        	if (valid.indexOf(Form.RA_Zip_Code.value.charAt(i)) < 0) {
            	alert("Please Enter a Valid 5 Digit Zip Code");
				Form.RA_Zip_Code.focus();
            	return false;
        	}
    	}
	}
	
/**
End LLC Information
**/



/**
Start Authorization Checkboxes
**/

	if (Form.Agree_Verification) {
		if (!Form.Agree_Verification.checked){
			 alert("You Cannot Continue Until You Verify the Information");
			 Form.Agree_Verification.focus();
			 return false;
	    }
	}
	
	if (Form.Agree_Terms_Disclaimer) {
		if (!Form.Agree_Terms_Disclaimer.checked){
			 alert("You Cannot Continue Until You Agree to the Statement Below by Checking the Box");
			 Form.Agree_Terms_Disclaimer.focus();
			 return false;
	    }
	}
	
	if (Form.Agree_Authorize) {
		if (!Form.Agree_Authorize.checked){
			 alert("You Cannot Continue Until You Agree to Both Statements by Checking Both Boxes");
			 Form.Agree_Authorize.focus();
			 return false;
	    }
	}

/**
End Authorization Checkboxes
**/
	
          return true
  }


 

