function show_locations (){
		country = $('profile_country_origin_id')
		locations = $('locations')
		province = $('profile_province_id')
		province_text = $('profile_province_text')
		
		town = $('profile_town_id')
		town_text = $('profile_localidad')
    
				
		if(country.value == '6'){
			locations.show()
			if(province){province.enable()}
			if(town){town.enable()}
			if(province_text){province_text.enable()}
			if(town_text){town_text.enable()}
	  } else {
			locations.hide()
			if(province){province.disable()}
			if(town){town.disable()}
			if(province_text){province_disabled.enable()}
			if(town_text){town_disabled.enable()}
	  }
	
}

function set_all_checkboxes (class_name, value){
	 
	 $$(".select_all").each(function (l){l.toggle();})
	 $$(class_name).each(function (c){c.checked=value;})
	 
}

function set_email_field_class(response){
  if(response == 'true' && $("user_email").getAttribute("class") == "general ancho_largo LV_valid_field"){
    $("user_email").setAttribute("class", "general ancho_largo LV_valid_field");
    $("check_email").innerHTML = "<span class='LV_valid'>Email Libre</span>"
  }else if($("user_email").getAttribute("class") == "general ancho_largo LV_valid_field"){
    $("user_email").setAttribute("class", "general ancho_largo LV_invalid_field");
    $("check_email").innerHTML = "<span class='LV_invalid'>Email ocupado</span>"
  }
}

