/*
	Created by		: Wesley Wong
	Created on		: OCT 18 2007
	Purpose			: Liftow Catalogue Faxback form
*/



// validating FAXBACK FORM

function validate_sellick_info()
{
	if(fax_form.contact_name.value == "")
	{
		alert("Please enter your Name");
		fax_form.contact_name.focus();
		return false;
	}
	
	if(fax_form.company_name.value == "")
	{
		alert("Please enter your Company Name");
		fax_form.company_name.focus();
		return false;
	}
	
	
	if(fax_form.company_address.value == "")
	{
		alert("Please enter your Address information");
		fax_form.company_address.focus();
		return false;
	}
	
	if(fax_form.company_city.value == "")
	{
		alert("Please enter your City/Town information");
		fax_form.company_city.focus();
		return false;
	}
	
	if(fax_form.company_province.value == "")
	{
		alert("Please enter your State/Province information");
		fax_form.company_province.focus();
		return false;
	}
	
	if(fax_form.company_postal.value == "")
	{
		alert("Please enter your Zip/Postal information");
		fax_form.company_postal.focus();
		return false;
	}
	

	if(fax_form.contact_phone.value == "")
	{
		alert("Please enter your Telephone Number information");
		fax_form.contact_phone.focus();
		return false;
	}
	
	//if(!fax_form.contact_phone.value.match(/^\d+$/))
	//{
		//alert("Please enter digits for the Telephone Number information");
		//fax_form.contact_phone.focus();
		//return false;
	//}
	
	
	
	if(fax_form.contact_email.value == "")
	{
		alert("Please enter your E-mail Address information");
		fax_form.contact_email.focus();
		return false;
	}
	
	var apos1 = fax_form.contact_email.value.indexOf("@");
	var dotpos1 = fax_form.contact_email.value.lastIndexOf(".");
	if (apos1<1 || dotpos1-apos1<2)
	{
		alert("Please enter a valid E-mail Address");
		fax_form.contact_email.focus();
		return false;
	}
	
	
	

	

	
	if (!fax_form.no_information.checked)
	{
		if(!fax_form.send_information.checked)
		{
		alert("Please indicate where or not you would like to have any additional information sent to you by Liftow Ltd.");
		return false;
		}
	}
	
	return (true);
}




