function validateSell(frm1,cbo3)
{
var rd = "none";   
 //this is to make sure he has selected atlease one trans  
	if (document.frmQuickSearch_Sell.chkSell.checked==false && document.frmQuickSearch_Sell.chkRent.checked==false)
	{
		alert("Please select Sell / Rent");						
		return (false);					   
	} 
	if(cbo3.options[cbo3.options.selectedIndex].value=="")
	{
		alert("Please select a Property Type");
		cbo3.selectedIndex=0
		cbo3.focus();
		return false;
	}
	if(document.frmQuickSearch_Sell.ncr.value=='')
	{	
			document.frmQuickSearch_Sell.ncr.value=''
	}
	if (document.frmQuickSearch_Sell.chkSell.checked == true)
	{
			rd = "3"
	}			
	if (document.frmQuickSearch_Sell.chkRent.checked == true)
	{
			rd = "4"
	}
	with(frm1)
	{
		method="post";
		if (parseInt(rd)=="0" || parseInt(rd)=="1")
		{			
			action="/search/qsearch.asp";
		}
		else if (parseInt(rd)=="3" || parseInt(rd)=="4")
		{	
			action="/register/pm_postproperty.asp?UserType=67f56g83i76kxy2&st=p1";
		}
		frm1.submit();
		return false;
	}
}



function validateBuy(frm1,cbo1,cbo3,cbo4)
{

	var rd = "none";
	//this is to make sure he has selected atlease one trans  
  	for(var i = 0; i < document.frmQuickSearch_Buy.rdBuyRent.length; i++) 
	{
		if (document.frmQuickSearch_Buy.rdBuyRent[0].checked==false && document.frmQuickSearch_Buy.rdBuyRent[1].checked==false)
		{
			document.frmQuickSearch_Buy.rdBuyRent[0].focus();
		 	alert("Please choose Buy, Rent");		 	
		 	return (false);
		}
	}
	if (cbo1.options[cbo1.options.selectedIndex].value=="")
	{  
		alert("Please select a City");
		cbo1.selectedIndex=0		
		cbo1.focus();
		return false;
	}
	
	if(cbo3.options[cbo3.options.selectedIndex].value=="")
	{
		alert("Please select a Property Type");
		cbo3.selectedIndex=0
		cbo3.focus();
		return false;
	}
	if(cbo4.selectedIndex==0)
	{
		alert("Please select a property category");
		cbo4.focus();
		return false;
	}
	
	for (var i = 0; i < 2 ; i++) 
	{
	     if (document.frmQuickSearch_Buy.rdBuyRent[i].checked==true)
	      {
				rd = document.frmQuickSearch_Buy.rdBuyRent[i].value
	      }
	}   
	for (var i = 0; i < 2 ; i++) 
	{
	     if (document.frmQuickSearch_Buy.rdBuyRent[i].checked==true)
	      {
				rd = document.frmQuickSearch_Buy.rdBuyRent[i].value
	      }
	}  
	with(frm1)
	{
		method="post";
		
		if (parseInt(rd)=="0" || parseInt(rd)=="1")
		{
			action="/search/qsearch.asp?StrCity="+cbo1.options[cbo1.options.selectedIndex].value;
		}	
		else if (parseInt(rd)=="3" || parseInt(rd)=="4")
		{		
			action="/Registration/PropertyForms/pm_propertytype_home.asp";		
		}		
		//frm1.submit();
		//return false;
	}
}