// JavaScript Document
	String.prototype.trim = function()
	{
		return this.replace(/^\s*(\b.*\b|)\s*$/, "$1");
	}
		function CheckEmail(email)
		{
			var match = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z0-9.-]{2,5}$/;
			if(match.test(email))
				{
					return true
				}
					else
				{
					return false
				}
		}
				function validate()
				{
					if (document.frm.need.selectedIndex < 1)
					{
						alert("Please Select your need type")
						document.frm.need.focus()
						return false;
					}
					if (document.frm.ptype.selectedIndex < 1)
					{
						alert("Please Select a Property type" )
						return false;
					}
					if (document.frm.budget.selectedIndex < 1)
					{
						alert("Please Select budget range" )
						return false;
					}
					if (document.frm.pno.value.trim()=="")
					{
						 alert("Please Enter Your Contect Number")
						 document.frm.pno.focus()
						 return false;
					}
					if (isNaN(document.frm.pno.value))
					{
						 alert("Number should be in degit")
						 document.frm.pno.focus()
						 return false;
					}
					if (document.frm.pno.value.length<6)
					{
						 alert("Invalid Number Enter Again")
						 document.frm.pno.focus()
						 return false;
					}
					if (document.frm.pno.value.length>12)
					{
						 alert("Enter Number is too Long")
						 document.frm.pno.focus()
						 return false;
					}
					if (document.frm.email.value.trim()=="")
					{
						alert("Please Enter Your Email Address")
						document.frm.email.focus()
						return false;
					}
					if(!CheckEmail(document.frm.email.value))
					{
						alert("Invalid Email entered")
						document.frm.email.focus()
						return false;
					}
					if (document.frm.detail.value.trim()=="")
					{
						alert("Please Enter Your Details" )
						document.frm.detail.focus()
						return false;
					}
				}