//----------------------------------------------------------------------------------------------------
//	Module Name:- Gat A Quote
//	File Name  :- quote.js
//	Create Date:- 20-MAY-2010
//	Intially Create By :- 
//	Update History:
//----------------------------------------------------------------------------------------------------
function quote_validate()
{
	with (document.frm_quote)
	{
		if (isEmpty(trim(txt_first_name.value)))
		{
			alert("Please enter your Name.");
			txt_first_name.focus();
			txt_first_name.select();
			return false;
		}
		
		if (isEmpty(trim(txt_emailid.value)))
		{
			alert("Please enter Email Address.");
			txt_emailid.focus();
			txt_emailid.select();
			return false;			
		}

		if (!sValidateMailAddress(trim(txt_emailid.value)))
		{
			alert("Please enter valid Email Address. Format: emailid@domainname.com");
			txt_emailid.select();
			txt_emailid.focus();
			return false;
		}

		if (isEmpty(trim(txt_phone.value)))
		{
			alert("Please enter Phone Number");
			txt_phone.focus();
			txt_phone.select();
			return false;			
		}

		if(isEmpty(trim(cbo_contact_mathod.value)))
		{
			alert("Please select Prefer Contact Method.");
			cbo_contact_mathod.focus();
			return false;
		}

		if (isEmpty(trim(ta_quote_details.value)))
		{
			alert("Please enter What type of website you need?");
			ta_quote_details.focus();
			ta_quote_details.select();
			return false;
		}
		if((ta_quote_details.value.length) > 2048)
		{
			alert("Maximum 2048 Character can be entered for website you need?.");
			ta_quote_details.select();
			ta_quote_details.focus();
			return false;
		}		
		
		if(isEmpty(trim(trim(txt_code.value))))
		{
			alert("Please enter Verification Code.");
			txt_code.select();
			txt_code.focus();
			return false;
		}

	}
	return true;
}

