	
	//************************
	//1 - Check Contact info
	//************************/

function ContractorPre_onsubmit() 
{
	if (ContractorPre.Company_Name.value == "")
	{
		alert("Please Enter your Company Name");
		ContractorPre.Company_Name.focus();
		return false;
	}
	if (ContractorPre.Contact_Name.value == "")
	{
		alert("Please Enter Contact Name");
		ContractorPre.Contact_Name.focus();
		return false;
	}
	if (ContractorPre.Position.value == "")
	{
		alert("Please Enter Your Position with the Company");
		ContractorPre.Position.focus();
		return false;
	}
	
	if (ContractorPre.Street_Address.value == "")
	{
		alert("Please Enter Your Company's Street Address");
		ContractorPre.Street_Address.focus();
		return false;
	}
	
	if (ContractorPre.City_Office.value == "")
	{
		alert("Please Enter Your City");
		ContractorPre.City_Office.focus();
		return false;
	}
	
	
	//********************************
	//  Check Drop Down Province List
	//********************************/
	if (ContractorPre.Province.value == "0")
	{
		alert("Please Select Your Province");
		ContractorPre.Province.focus();
		return false;
	}
	
	
	
	
	//************************
	//   Postal Code
	//************************/
	if (ContractorPre.Postal_Code.value == "")
	{
		alert("Please Enter your Postal Code");
		ContractorPre.Postal_Code.focus();
		return false;
	}
	
	
	
	//************************
	//Check Phone Number
	//************************/	
	
	if (ContractorPre.Phone_Number.value == "")
	{
		alert("Please Enter Your Telephone Number Like This: \n(123) 555-1212");
		ContractorPre.Phone_Number.focus();
		return false;
	}
	
	var checkOK = "1234567890- ()";
	var checkStr = ContractorPre.Phone_Number.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}
	if (!allValid)
	{
		alert("Phone Numbers can only contain numbers, brackets and dashes");
		ContractorPre.Phone_Number.focus();
		return (false);
	}			
	
	
	//************************
	//Check Email Address
	//************************/	
	
	if 
	(
		(ContractorPre.Email_Address.value == "") ||(ContractorPre.Email_Address.value.indexOf('@') == -1) || (ContractorPre.Email_Address.value.indexOf('.') == -1)
	) 
	{
		alert("Please Enter a Valid Email Address like: \n'someone@somewhere.com'");
		ContractorPre.Email_Address.focus();
		return false;
	}


	//********************************************
	//Check Insurance Requirements
	//*********************************************/	
	
	{
	myOption = -1;
	for (i=0; i<ContractorPre.Insurance_Requirements.length; i++) {
	if (ContractorPre.Insurance_Requirements[i].checked) {
	myOption = i;
	}
	}
	if (myOption == -1) {
	alert("Please Select if You Meet Insurance Requirements: \nYes or No");
	return false;
	}
	}




	//********************************************
	//Check WCB Requirements
	//*********************************************/	
	
	{
	myOption = -1;
	for (i=0; i<ContractorPre.WCB_Requirements.length; i++) {
	if (ContractorPre.WCB_Requirements[i].checked) {
	myOption = i;
	}
	}
	if (myOption == -1) {
	alert("Please Select if You Meet WCB Requirements: \nYes or No");
	return false;
	}
	}

	
	//************************
	// Reference 1 Company Name
	//************************/
	if (ContractorPre.Ref1_Company_Name.value == "")
	{
		alert("Please Enter Reference #1's Company Name");
		ContractorPre.Ref1_Company_Name.focus();
		return false;
	}	
	//************************
	// Reference 1 Contact Name
	//************************/
	if (ContractorPre.Ref1_Contact_Name.value == "")
	{
		alert("Please Enter Reference #1's Contact Name");
		ContractorPre.Ref1_Contact_Name.focus();
		return false;
	}	
	//************************
	//Reference 1 Phone Number
	//************************/	
	
	if (ContractorPre.Ref1_Phone_Number.value == "")
	{
		alert("Please Enter Reference #1's Telephone Number Like This: \n(123) 555-1212");
		ContractorPre.Ref1_Phone_Number.focus();
		return false;
	}
	
	var checkOK = "1234567890- ()";
	var checkStr = ContractorPre.Ref1_Phone_Number.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}
	if (!allValid)
	{
		alert("Phone Numbers can only contain numbers, brackets and dashes");
		ContractorPre.Ref1_Phone_Number.focus();
		return (false);
	}			
	//************************
	// Reference 1 Details
	//************************/
	if (ContractorPre.Ref1_Details.value == "")
	{
		alert("Reference #1 Incomplete \n \nPlease Describe The Type of Work You Did, \nand the Duration of Your Contract For Reference #1.");
		ContractorPre.Ref1_Details.focus();
		return false;
	}



	
	//************************
	// Reference 2 Company Name
	//************************/
	if (ContractorPre.Ref2_Company_Name.value == "")
	{
		alert("We Require 3 References  \n \nPlease Enter Reference #2's Company Name");
		ContractorPre.Ref2_Company_Name.focus();
		return false;
	}	
	//************************
	// Reference 2 Contact Name
	//************************/
	if (ContractorPre.Ref2_Contact_Name.value == "")
	{
		alert("We Require 3 References  \n \nPlease Enter Reference #2's Contact Name");
		ContractorPre.Ref2_Contact_Name.focus();
		return false;
	}	
	//************************
	//Reference 2 Phone Number
	//************************/	
	
	if (ContractorPre.Ref2_Phone_Number.value == "")
	{
		alert("Please Enter Reference #2's Telephone Number Like This: \n(123) 555-1212");
		ContractorPre.Ref2_Phone_Number.focus();
		return false;
	}
	
	var checkOK = "1234567890- ()";
	var checkStr = ContractorPre.Ref2_Phone_Number.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}
	if (!allValid)
	{
		alert("Phone Numbers can only contain numbers, brackets and dashes");
		ContractorPre.Ref2_Phone_Number.focus();
		return (false);
	}			
	//************************
	// Reference 2 Details
	//************************/
	if (ContractorPre.Ref2_Details.value == "")
	{
		alert("We Require 3 References  \n \nReference #2 Incomplete \n \nPlease Describe The Type of Work You Did, \nand the Duration of Your Contract For Reference #2.");
		ContractorPre.Ref2_Details.focus();
		return false;
	}



	
	//************************
	// Reference 3 Company Name
	//************************/
	if (ContractorPre.Ref3_Company_Name.value == "")
	{
		alert("We Require 3 References  \n \nPlease Enter Reference #3's Company Name");
		ContractorPre.Ref3_Company_Name.focus();
		return false;
	}	
	//************************
	// Reference 2 Contact Name
	//************************/
	if (ContractorPre.Ref3_Contact_Name.value == "")
	{
		alert("Please Enter Reference #3's Contact Name");
		ContractorPre.Ref3_Contact_Name.focus();
		return false;
	}	
	//************************
	//Reference 2 Phone Number
	//************************/	
	
	if (ContractorPre.Ref3_Phone_Number.value == "")
	{
		alert("Please Enter Reference #3's Telephone Number Like This: \n(123) 555-1212");
		ContractorPre.Ref3_Phone_Number.focus();
		return false;
	}
	
	var checkOK = "1234567890- ()";
	var checkStr = ContractorPre.Ref3_Phone_Number.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}
	if (!allValid)
	{
		alert("Phone Numbers can only contain numbers, brackets and dashes");
		ContractorPre.Ref3_Phone_Number.focus();
		return (false);
	}			
	//************************
	// Reference 3 Details
	//************************/
	if (ContractorPre.Ref3_Details.value == "")
	{
		alert("We Require 3 References  \n \nReference #3 Incomplete \n \nPlease Describe The Type of Work You Did, \nand the Duration of Your Contract For Reference #3.");
		ContractorPre.Ref3_Details.focus();
		return false;
	}



	
	//********************************************
	// City CheckBoxes
	//*********************************************/	
	
		
	{
	myOption = -1;
	for (i=0; i<ContractorPre.City.length; i++) {
	if (ContractorPre.City[i].checked) {
	myOption = i;
	}
	}
	if (myOption == -1) {
	alert("Please Specify at least 1 City Where You Can Work.");
	return false;
	}
	}
	
		
		
	
	//********************************************
	// What type of work do you do?
	//*********************************************/	
	
		
	{
	myOption = -1;
	for (i=0; i<ContractorPre.Type.length; i++) {
	if (ContractorPre.Type[i].checked) {
	myOption = i;
	}
	}
	if (myOption == -1) {
	alert("Please Select at Least 1 Type of Work That You Provide. \n \nOr Specify Another Type.");
	return false;
	}
	}
	
	
	if (confirm("You are about to submit your information to Boardwalk. \n\n Your inquiry CANNOT contain any of these characters: \n < > { } [ ] ! * & + / \ ' % ^ = \n\nClick OK if you are sure."))
	{
		return(true);
	}
	else 
	{
		return (false);
	}
}


