function Buscar(){
 lPath=window.location.href.replace(window.location.search,'');
 lWhere='';
  if (Object("inmIdPoblacion").value!='ALL' && Object("inmIdPoblacion").value!=''){
  if (lWhere!=''){ 
   lWhere=lWhere+" and inmIdPoblacion='"+Object("inmIdPoblacion").value.replace("'","''")+"'"; 
  }else{ 
   lWhere="inmIdPoblacion='"+Object("inmIdPoblacion").value.replace("'","''")+"'";}}
 if (Object("inmTipo").value!='ALL' && Object("inmTipo").value!=''){
  if (lWhere!=''){
   lWhere=lWhere+" and inmTipo='"+Object("inmTipo").value.replace("'","''")+"'"; 
  }else{
   lWhere="inmTipo='"+Object("inmTipo").value.replace("'","''")+"'";}}
 if (Object("segModo").value!='ALL' && Object("segModo").value!=''){
  if (lWhere!=''){
   lWhere=lWhere+" and segModo='"+Object("segModo").value.replace("'","''")+"'";
  }else{
   lWhere="segModo='"+Object("segModo").value.replace("'","''")+"'";}}
 if (Object("segPrecio_Desde").value!=''){
  if (lWhere!=''){
   lWhere=lWhere+" and segPrecio>="+Object("segPrecio_Desde").value; 
  }else{
   lWhere="segPrecio>="+Object("segPrecio_Desde").value;}}
 if (Object("segPrecio_Hasta").value!=''){
  if (lWhere!=''){
   lWhere=lWhere+" and segPrecio<="+Object("segPrecio_Hasta").value; 
  }else{
   lWhere="segPrecio<="+Object("segPrecio_Hasta").value;}}
 if (Object("inmHabitaciones_Desde").value!=''){
  if (lWhere!=''){
   lWhere=lWhere+" and indHabitaciones>="+Object("inmHabitaciones_Desde").value; 
  }else{
   lWhere="indHabitaciones>="+Object("inmHabitaciones_Desde").value;}}
 if (Object("inmHabitaciones_Hasta").value!=''){
  if (lWhere!=''){
   lWhere=lWhere+" and indHabitaciones<="+Object("inmHabitaciones_Hasta").value; 
  }else{
   lWhere="indHabitaciones<="+Object("inmHabitaciones_Hasta").value;}}
 if (lWhere==''){
  window.location=lPath+"?Tipo=Inmuebles&Where=inmId>=0";
 }else{
  window.location=lPath+"?Tipo=Inmuebles&Where="+lWhere;}}
