function validatefrmInquiryTop()
	{
		
		var sqV=0;
		if(document.frmInquiryTop.Name.value=="")
		{
			document.getElementById("alertMsgname").innerHTML="&nbsp;Please Enter Your Name.";
			document.getElementById("alertMsgname").style.visibility="visible";
			return false;
		}
		
		if(document.frmInquiryTop.Email.value=="")
		{
			document.getElementById("alertMsgemail").innerHTML="&nbsp;Please Enter Your E-mail.";
			document.getElementById("alertMsgemail").style.visibility="visible";
			return false;
		}
		if(!isEmail(document.frmInquiryTop.Email.value))
  			{	 
  			document.getElementById("alertMsgemail").innerHTML="&nbsp;Please Enter Valid E-mail!";
			document.getElementById("alertMsgemail").style.visibility="visible";
			return false; 
	 		}
		
		if(document.frmInquiryTop.Mobile.value=="")
		{
			document.getElementById("alertMsgmobile").innerHTML="&nbsp;Please Enter Your Mobile Number.";
			document.getElementById("alertMsgmobile").style.visibility="visible";
			return false;
		}
		
		if(!ValidateNo(document.frmInquiryTop.Mobile.value," 1234567890,-/+"))
		{
			document.getElementById("alertMsgmobile").innerHTML="&nbsp;Please Enter Valid Mobile Number.";
			document.getElementById("alertMsgmobile").style.visibility="visible";
			return false;
		}
		
		if(document.frmInquiryTop.Mobile.value.length < 10)
		{
			document.getElementById("alertMsgmobile").innerHTML="&nbsp;Please Enter Valid Mobile Number.";
			document.getElementById("alertMsgmobile").style.visibility="visible";
			return false;
		}
		
		if(document.frmInquiryTop.Country.value=="")
		{
			document.getElementById("alertMsgcountry").innerHTML="&nbsp;Please Select Your Country.";
			document.getElementById("alertMsgcountry").style.visibility="visible";
			return false;
		}
		
		if(document.frmInquiryTop.Project.value=="")
		{
			document.getElementById("alertMsgrproject").innerHTML="&nbsp;Please select a project.";
			document.getElementById("alertMsgrproject").style.visibility="visible";
			return false;

}


if (document.frmInquiryTop.Time_to_call.value == "") {

    document.getElementById("alertTime_to_call").innerHTML = "&nbsp;Choose your option.";

    document.getElementById("alertTime_to_call").style.visibility = "visible";

    return false;

}
		
		var middle_coun="false";
		var coun=new Array();
		coun[0]="Bahrain";
		coun[1]="Cyprus";
		coun[2]="Egypt";
		coun[3]="Iran";
		coun[4]="Iraq";
		coun[5]="Israel";
		coun[6]="Jordan";
		coun[7]="Kuwait";
		coun[8]="Lebanon";
		coun[9]="Oman";
		coun[10]="Qatar";
		coun[11]="Saudi Arabia";
		coun[12]="Syria";
		coun[13]="Turkey";
		coun[14]="United Arab Emirates";
		coun[15]="Yemen";
		coun[16]="Angola";
		coun[17]="Algeria";
		coun[18]="Benin";
		coun[19]="Botswana";
		coun[20]="Burkina Faso";
		coun[21]="Burundi";
		coun[22]="Cameroon";
		coun[23]="Cape Verde";
		coun[24]="Chad";
		coun[25]="Congo";
		coun[26]="Djibouti";
		coun[27]="Egypt";
		coun[28]="Equatorial Guinea";
		coun[29]="Eritrea";
		coun[30]="Ethiopia";
		coun[31]="Gabon";
		coun[32]="Gambia";
		coun[33]="Ghana";
		coun[34]="Guinea";
		coun[35]="Kenya";
		coun[36]="Lesotho";
		coun[37]="Liberia";
		coun[38]="Madagascar";
		coun[39]="Malawi";
		coun[40]="Mali";
		coun[41]="Mauritania";
		coun[42]="Mauritius";
		coun[43]="Morocco";
		coun[44]="Mozambique";
		coun[45]="Namibia";
		coun[46]="Niger";
		coun[47]="Nigeria";
		coun[48]="Rwanda";
		coun[49]="Saint Helena";
		coun[50]="Senegal";
		coun[51]="Seychelles";
		coun[52]="Sierra Leone";
		coun[53]="Somalia";
		coun[54]="South Africa";
		coun[55]="Sudan";
		coun[56]="Swaziland";
		coun[57]="Tanzania";
		coun[58]="Togo";
		coun[59]="Tunisia";
		coun[60]="Uganda";
		coun[61]="Zambia";
		coun[62]="Zimbabwe";
		
		for (i=0;i<coun.length+1;i++)
		{
			if (document.frmInquiryTop.Country.value == coun[i])
			{
				middle_coun="true";
			}
		}

if (middle_coun=="false")
			{
				sqV=0;	
			}
			else
			{	
				sqV=1;
			}

	// alert(sqV);	
// sqV=1;
	if(sqV==1)
	{
		//document.getElementById('loaddivTop').innerHTML="<img border='0' src='images/loader.gif'>"
		//getValTop();		
	document.frmInquiryTop.submit();
	}
	
	if(sqV==0)
	{
		//document.frmInquiryTop.action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8";
		document.frmInquiryTop.submit();
	}
	
//	return true;		
	}
	
function isEmail (emailIn){
	var isEmailOk = false;
	var filter = /^[a-zA-Z0-9][a-zA-Z0-9._-]*\@[a-zA-Z0-9-]+(\.[a-zA-Z][a-zA-Z-]+)+$/
	//  var filter = /^(([^<>()[\]\\.,;:\s@\”]+(\.[^<>()[\]\\.,;:\s@\”]+)*)|(\”.+\”))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

	if(emailIn.search(filter) != -1)
		isEmailOk = true;
	if(emailIn.indexOf("..") != -1)
		isEmailOk = false;
	if(emailIn.indexOf(".@") != -1)
		isEmailOk = false;

	return isEmailOk;
}

function ValidateNo( NumStr, String )
{
	for( var Idx = 0; Idx < NumStr.length; Idx ++ )
	{
		var Char = NumStr.charAt( Idx );
		var Match = false;
		for( var Idx1 = 0; Idx1 < String.length; Idx1 ++)
		{
			if( Char == String.charAt( Idx1 ) )
			Match = true;
		}
		if ( !Match )
		return false;
	}
	return true;
}

function OnSelect_GetBudget_sTop(){

    if (document.frmInquiryTop.Project.value == "The Villas - Gurgaon") {
        document.frmInquiryTop.Price.value = "Rs. 6.09 Crore onwards";
    }

    else if (document.frmInquiryTop.Project.value == "Exquisite - Gurgaon") {
        document.frmInquiryTop.Price.value = "Rs. 1.39 Crore onwards";
    }

    else if (document.frmInquiryTop.Project.value == "Harmony - Gurgaon") {
        document.frmInquiryTop.Price.value = "Rs. 1.53 Crore onwards";
    }

    else if (document.frmInquiryTop.Project.value == "UGCC Amber - Noida") {
        document.frmInquiryTop.Price.value = "Rs. 1.5 Crore onwards";
    }

    else if (document.frmInquiryTop.Project.value == "UGCC Burgundy - Noida") {
        document.frmInquiryTop.Price.value = "Rs. 3.3 Crore onwards";
    }


    else if (document.frmInquiryTop.Project.value == "Uniworld Gardens - Noida") {
        document.frmInquiryTop.Price.value = "Rs. 31.29 Lac onwards";
    }

  
else if (document.frmInquiryTop.Project.value == "Espace Premiere Nirvana Country 2- Gurgaon") {
    document.frmInquiryTop.Price.value = "Rs. 2.25 Crore onwards";
}


else if (document.frmInquiryTop.Project.value == "Unitech South Park - Gurgaon") {
    document.frmInquiryTop.Price.value = "Rs. 60 Lac onwards";
}

else if (document.frmInquiryTop.Project.value == "The Residences - Noida") {
    document.frmInquiryTop.Price.value = "Rs. 40.98 Lac onwards";
}


else if (document.frmInquiryTop.Project.value == "Executive Floors - Mohali") {
    document.frmInquiryTop.Price.value = "Rs.42.50 Lacs onwards";
}

}
