function filter_cities(args){
//this code is gracias from:
//Author: Justin Whitford
//Source: www.evolt.org
var args1 = args.split("_");
var pattern = args1[1];

	if(document.getElementById('select_City')){
	var list = document.getElementById('select_City');
		 if (!list.bak){
			    /*
			    We're going to attach an array to the select object
			    where we'll keep a backup of the original dropdown list
			    */
			    list.bak = new Array();
			    for (n=0;n<list.length;n++){
			      list.bak[list.bak.length] = new Array(list[n].value, list[n].text);
			    }
			  }

  /*
  We're going to iterate through the backed up dropdown
  list. If an item matches, it is added to the list of
  matches. If not, then it is added to the list of non matches.
  */
  match = new Array();
  nomatch = new Array();
  
  for (n=0;n<list.bak.length;n++){
	var values = list.bak[n][0].split("_");
	var value = values[1];
	
    if(value==pattern){
      match[match.length] = new Array(list.bak[n][0], list.bak[n][1]);
    }else{
      nomatch[nomatch.length] = new Array(list.bak[n][0], list.bak[n][1]);
    }
  }

  /*
  Now we completely rewrite the dropdown list.
  First we write in the matches, then we write
  in the non matches
  */
  for (n=0;n<match.length;n++){
	if(!list[n+1]){
		var y=document.createElement('option');
		y.text=match[n][1];
		y.value=match[n][0];
		list.add(y,null);
	}
	else{
	    list[n+1].value = match[n][0];
	    list[n+1].text = match[n][1];
	}
  }
  
  for (n=0;n<nomatch.length+1;n++){
   list.remove(match.length+1);
  }

  /*
  Finally, we make the 1st item selected - this
  makes sure that the matching options are
  immediately apparent
  */
  list.selectedIndex=0;
}
	}

