
	  function Cmbcounty_OnChange()
		  dim county
		  county=document.frmsearch.Cmbcounty.value
		  document.location.href("default.asp?county=" & county)
      end function
      
      function optChange()
      //document.write("ddd")
		  dim ptype
		  dim pval
		  ptype=document.frmsearch.opttype(1).checked 
		  if ptype=true then
		  	pval="rent"
		  end if
		  ptype=document.frmsearch.opttype(0).checked 
		  if ptype=true then
		  	pval="sale"
		  end if
		  document.location.href("default.asp?ptype=" & pval)
		  //city=document.frmsearch.Cmbcity1.value
		  //document.location.href("default.asp?ptype=" & pval & "&city=" & city)
      end function
      
      function CmbCity_OnChange()
		  'document.write("qqqqq")
		   dim ptype
		  dim pval
		  ptype=document.frmsearch.opttype(1).checked 
		  if ptype=true then
		  	pval="rent"
		  end if
		  ptype=document.frmsearch.opttype(0).checked 
		  if ptype=true then
		  	pval="sale"
		  end if		  
		  
		  dim county
		  dim city
		  county=document.frmsearch.Cmbcounty.value
		  city=document.frmsearch.CmbCity.value
		  document.location.href("default.asp?county=" & county & "&city=" & city & "&ptype=" & pval )
      end function
      
      function CmbTown_OnChange()
		  dim county
		  dim city
		  dim town
		  county=document.frmsearch.Cmbcounty.value
		  city=document.frmsearch.CmbCity.value
		  town=document.frmsearch.Cmbtown.value		  
		  dim ptype
		  dim pval
		  ptype=document.frmsearch.opttype(1).checked 
		  if ptype=true then
		  	pval="rent"
		  end if
		  ptype=document.frmsearch.opttype(0).checked 
		  if ptype=true then
		  	pval="sale"
		  end if		  
		  document.location.href("default.asp?county=" & county & "&city=" & city & "&town=" & town & "&ptype=" & pval)
      end function
      
       function CmbCode_OnChange()
		  dim county
		  dim city
		  dim town
		  county=document.frmsearch.Cmbcounty.value
		  city=document.frmsearch.CmbCity.value
		  'town=document.frmsearch.Cmbtown.value
		  code=document.frmsearch.CmbCode.value
		  
		  dim ptype
		  dim pval
		  ptype=document.frmsearch.opttype(1).checked 
		  if ptype=true then
		  	pval="rent"
		  end if
		  ptype=document.frmsearch.opttype(0).checked 
		  if ptype=true then
		  	pval="sale"
		  end if		  
		  document.location.href("default.asp?county=" & county & "&city=" & city & "&code=" & code & "&ptype=" & pval)
      end function    

