function MenuVenta(Idioma, Forma, Price){
  if(Idioma == 1)
  	var Texto = "";
  else
  	var Texto = "";
  //Compara = document.forms[Forma].Precio.value;
  //alert(Price);
  sub0=new Option(Texto,"0-100000000000000",ValidarSeleccion("0-100000000000000", Price));
  sub1=new Option("$500,000 - $1,000,000","500000-1000000", ValidarSeleccion("500000-1000000", Price));
  sub2=new Option("$1,000,001 - $2,000,000","1000001-2000000", ValidarSeleccion("1000001-2000000", Price));
  sub3=new Option("$2,000,001 - $3,000,000","2000001-3000000", ValidarSeleccion("2000001-3000000", Price));
  sub4=new Option("$3,000,001 - $4,000,000","3000001-4000000", ValidarSeleccion("3000001-4000000", Price));
  sub5=new Option("$4,000,001 - $5,000,000","4000001-5000000", ValidarSeleccion("4000001-5000000", Price));
  sub6=new Option("Mayor a $5,000,000","5000001-100000000000000", ValidarSeleccion("5000001-100000000000000", Price));
  /*document.forms[Forma].Precio.options[0]=sub0;
  document.forms[Forma].Precio.options[1]=sub1;
  document.forms[Forma].Precio.options[2]=sub2;
  document.forms[Forma].Precio.options[3]=sub3;
  document.forms[Forma].Precio.options[4]=sub4;
  document.forms[Forma].Precio.options[5]=sub5;
  document.forms[Forma].Precio.options[6]=sub6;*/
  document.forms.Buscar.Precio.options[0]=sub0;
  document.forms.Buscar.Precio.options[1]=sub1;
  document.forms.Buscar.Precio.options[2]=sub2;
  document.forms.Buscar.Precio.options[3]=sub3;
  document.forms.Buscar.Precio.options[4]=sub4;
  document.forms.Buscar.Precio.options[5]=sub5;
  document.forms.Buscar.Precio.options[6]=sub6;
  //alert(tab);
 }
 
function MenuRenta(Idioma, Forma, Price){
   if(Idioma == 1)
  	var Texto = "";
  else
  	var Texto = "";
  sub0=new Option(Texto,"0-100000000000000",ValidarSeleccion("0-100000000000000", Price));
  sub1=new Option("$5,000 - $10,000","5000-10000",ValidarSeleccion("5000-10000", Price));
  sub2=new Option("$10,001 - $20,000","10001-20000",ValidarSeleccion("10001-20000", Price));
  sub3=new Option("$20,001 - $30,000","20001-30000",ValidarSeleccion("20001-30000", Price));
  sub4=new Option("$30,001 - $40,000","30001-40000",ValidarSeleccion("30001-40000", Price));
  sub5=new Option("$40,001 - $50,000","40001-50000",ValidarSeleccion("40001-50000", Price));
  sub6=new Option("Mayor a $50,000","50001-100000000000000",ValidarSeleccion("50001-100000000000000", Price));
  document.forms.Buscar.Precio.options[0]=sub0;
  document.forms.Buscar.Precio.options[1]=sub1;
  document.forms.Buscar.Precio.options[2]=sub2;
  document.forms.Buscar.Precio.options[3]=sub3;
  document.forms.Buscar.Precio.options[4]=sub4;
  document.forms.Buscar.Precio.options[5]=sub5;
  document.forms.Buscar.Precio.options[6]=sub6;
  //alert(tab);
 }
 
 function combo(Idioma,Forma, Price){
   //alert(Forma);
  // var indice=document.forms[Forma].Operacion.selectedIndex;
  var indice=document.forms.Buscar.Operacion.selectedIndex;
   //alert(indice);
   if(indice==1) MenuVenta(Idioma,Forma, Price);
   if(indice==2) MenuRenta(Idioma,Forma, Price);
   //if(indice==3) menu3();
 } 
 
 function ValidarSeleccion(Cadena1, Cadena2){
	 if(Cadena1 == Cadena2)
	 	return "defaultSelected";
	else
		return "";
}
 
 
 function abreFoto(titulo, ruta)
{
   i1 = new Image;
   i1.src = ruta;
   html = '<html><head><title>'+titulo+'</title></head>';
   html += '<body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0>';
   html += '<center><img src="'+ruta+'" border=0 name="Foto" ';
   html += 'onLoad="window.resizeTo(document.Foto.width+10,document.Foto.height+45)">';
   html += '</center></body></html>';
   popupImage = window.open('','_blank','scrollbars=0,resizable=NO');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close();
}

 
