  function MM_openBrWindow(theURL,winName,features) { //v2.0
     window.open(theURL,winName,features);
   }
   
    function ListItem(nombre, id, catid){
    this.nombre = nombre;
    this.id = id;
    this.catid = catid;
  } 
  
   function ClearCountry(){
    var countries = document.getElementById('country');
    countries.options.length = 0;
  }
  
  function FilterCountry(){
    ClearCountry();
	var countries = document.getElementById('country');
	var regions = document.getElementById('region');
	var newoption = new Option('Select Country');
	newoption.value = "";
	countries.options[0] = newoption;
	j=1;
    for (i=0;i<country.length;i++){
      if (country[i].catid == regions.value){
        var newoption = new Option(country[i].nombre);
        countries.options[j] = newoption;
        countries.options[j].value = country[i].id; 
		j = j + 1;
      } 
    }    
  }
  
  function ClearState(){
    var states = document.getElementById('state');
    states.options.length = 0;
  }
  
  function FilterState(){
    ClearState();
	var states = document.getElementById('state');
	var countries = document.getElementById('country');
	var newoption = new Option('Select State');
	newoption.value = "";
	states.options[0] = newoption;
	j=1;
    for (i=0;i<state.length;i++){
      if (state[i].catid == countries.value){
        var newoption = new Option(state[i].nombre);
        states.options[j] = newoption;
        states.options[j].value = state[i].id; 
		j = j + 1;
      } 
    }    
  }
  
  function Clearfields(){
    var category = document.getElementById('field');
    category.options.length = 0;
  }
  
  function Filterfields(){
    Clearfields();
	var fields = document.getElementById('field');
	var category = document.getElementById('category');
	var newoption = new Option('Select Field');
	newoption.value = "";
	fields.options[0] = newoption;
	j=1;
    for (i=0;i<field_array.length;i++){
      if (field_array[i].catid == category.value){
        var newoption = new Option(field_array[i].nombre);
        fields.options[j] = newoption;
        fields.options[j].value = field_array[i].id; 
		j = j + 1;
      } 
    }    
  }