function MM_findObj (n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p); } if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function form_filtrado (idioma) {
  esc = MM_findObj('filtro');
  formulario = MM_findObj('formfiltro');
  
  for (i=0; i<esc.length; i++) {
  if (esc[i].checked) {
  	vale = esc[i].value;
  	break;
  }
  }
  
  formulario.action = 'index.php?id_cat='+vale+'&lg='+idioma;
  formulario.submit();
}

// para el menu de las unidades de producción
function cambia_menuup(cual,que) {
 if (que==0) {
	ac_cambiaTexto(mapa[cual], 'titulo_menuup');
 }
 else {
	ac_cambiaTexto('&nbsp;', 'titulo_menuup');
 }
}

function ac_getObjecto(obj) {
 	w3c = (document.getElementById) ? 1:0
 	ns4 = (document.layers) ? 1:0  //browser detect for NS4 & W3C standards
	if (w3c){
			var theObj = document.getElementById(obj);
	}else{
			if (ns4){
				var theObj = eval("document." + obj);
			}
	}			
	return theObj;
}

// cambia el texto en una capa.
function ac_cambiaTexto(text, divID) {
 	var content = text;
	var theObj = ac_getObjecto(divID);
	if (theObj) theObj.innerHTML = text;	
}

