var idioma = $$('html').first().lang


function toggle_opinions(){
  $("opinions").toggle();
}

function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
}

document.observe("dom:loaded", function() {
  if($('content_language_selector') != undefined) {
    $('content_language_selector').select('input').each(function(checkbox){
      checkbox.observe(
      "change",
      function(){
        this.up('form').submit();
      }
    );
    });
  }
});