		extArray = new Array(".doc", ".pdf",".xls",".gif",".jpg");
		function LimitAttach(form, file) {
			allowSubmit = false;
			if (!file) return;
			while (file.indexOf("\\") != -1)
			file = file.slice(file.indexOf("\\") + 1);
			ext = file.slice(file.indexOf(".")).toLowerCase();
			
			for (var i = 0; i < extArray.length; i++) {
			if (extArray[i] == ext) { allowSubmit = true; break; }
			}
			if (allowSubmit) 
				return true;
			else
			{
				alert("El fichero no admite este tipo de fichero. Ficheros v�lidos  " 
					+ (extArray.join("  ")) + "\nPor favor, seleccione un nuevo tipo de fichero y env�elo otra vez. Gracias ");
				return false;
			}
		}
		
		
  function validar_curriculum(){
	if (!form1.NOMBRE.value)        
	{          
		alert ("Por favor, Introduzca su nombre .");
		return false;        
	}   

	if (!form1.fichero.value)        
	{          
		alert ("Por favor, adjunte su curriculum .");
		return false;		   
	} 	
	else
	{
		if (LimitAttach('form1',document.form1.fichero.value )==false)
			return false;	
	}
  
  }
  
  
  function ocultar_todas_curso(){
  	var aux;
  	
  	
  	if (navigator.appName=="Microsoft Internet Explorer") {
  		aux = document.getElementById('menu_profesor');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_acuerdos');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_banner');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_categoria');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_cursos');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_marquesina');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_novedad');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_opinion');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_prensa');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_usuarios_web');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_orla');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_oposicion');
  		aux.style.display = "none";
  		aux = document.getElementById('menu_testimonio_estatico');
  		aux.style.display = "none";
  	}else{
  		document.getElementById('menu_profesor').style.visibility = "hidden";
  		document.getElementById('menu_profesor').style.height = "0px;";
  		document.getElementById('menu_acuerdos').style.visibility = "hidden";
  		document.getElementById('menu_acuerdos').style.height = "0px;";
  		document.getElementById('menu_banner').style.visibility = "hidden";
  		document.getElementById('menu_banner').style.height = "0px;";
  		document.getElementById('menu_categoria').style.visibility = "hidden";
  		document.getElementById('menu_categoria').style.height = "0px;";
  		document.getElementById('menu_cursos').style.visibility = "hidden";
  		document.getElementById('menu_cursos').style.height = "0px;";
		document.getElementById('menu_marquesina').style.visibility = "hidden";
  		document.getElementById('menu_marquesina').style.height = "0px;";
  		document.getElementById('menu_novedad').style.visibility = "hidden";
  		document.getElementById('menu_novedad').style.height = "0px;";
  		document.getElementById('menu_opinion').style.visibility = "hidden";
  		document.getElementById('menu_opinion').style.height = "0px;";
		document.getElementById('menu_prensa').style.visibility = "hidden";
  		document.getElementById('menu_prensa').style.height = "0px;";
  		document.getElementById('menu_usuarios_web').style.visibility = "hidden";
  		document.getElementById('menu_usuarios_web').style.height = "0px;";
  		document.getElementById('menu_orla').style.height = "0px;";
  		document.getElementById('menu_orla').style.visibility = "hidden";
  		document.getElementById('menu_oposicion').style.height = "0px;";
  		document.getElementById('menu_oposicion').style.visibility = "hidden";
  		document.getElementById('menu_testimonio_estatico').style.visibility = "hidden";
  		document.getElementById('menu_testimonio_estatico').style.height = "0px;";
  	}
  }

  function ocultar_todas_extranet(){
  	
  	/*document.getElementById('menu_cursos').style.visibility = "hidden";
  	document.getElementById('menu_cursos').style.height = "0px;";
  	document.getElementById('menu_empresa').style.visibility = "hidden";
  	document.getElementById('menu_empresa').style.height = "0px;";
  	document.getElementById('menu_envio').style.visibility = "hidden";
  	document.getElementById('menu_envio').style.height = "0px;";
  	document.getElementById('menu_estadisticas').style.visibility = "hidden";
  	document.getElementById('menu_estadisticas').style.height = "0px;";
  	document.getElementById('menu_marquesina').style.visibility = "hidden";
  	document.getElementById('menu_marquesina').style.height = "0px;";
  	document.getElementById('menu_novedad').style.visibility = "hidden";
  	document.getElementById('menu_novedad').style.height = "0px;";
  	document.getElementById('menu_opinion').style.visibility = "hidden";
  	document.getElementById('menu_opinion').style.height = "0px;";
	document.getElementById('menu_prensa').style.visibility = "hidden";
  	document.getElementById('menu_prensa').style.height = "0px;";
  	document.getElementById('menu_ultima_hora').style.visibility = "hidden";
  	document.getElementById('menu_ultima_hora').style.height = "0px;";
  	document.getElementById('menu_ultima_hora_master').style.visibility = "hidden";
  	document.getElementById('menu_ultima_hora_master').style.height = "0px;";
  	document.getElementById('menu_usuarios_web').style.visibility = "hidden";
  	document.getElementById('menu_usuarios_web').style.height = "0px;";*/
  }

  function mostrar_capa(capa,n_elementos,tipo){
  	var altura;
  	altura = (n_elementos * 15);
  	/*	primero tengo que ocultar las demas y altura 0	*/
  	if(tipo=='curso')
  		ocultar_todas_curso()
  	else{
  		ocultar_todas_extranet();
  	}
  	/*	y ahora muestro esta	*/
  	if(navigator.appName=="Microsoft Internet Explorer"){
  		document.getElementById(capa).style.display = "block";
  	}else{
  		document.getElementById(capa).style.visibility = "visible";
  		document.getElementById(capa).style.height = altura+"px;";
  	}
  }

	function MM_findObj(n, d) { //v4.01
	  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 MM_validateForm() { //v4.0
	  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
	  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
	    if (val) { nm=val.name; if ((val=val.value)!="") {
	      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
	        if (p<1 || p==(val.length-1)) errors+='- '+nm+' debe tener una direcci�n de e-mail.\n';
	      } else if (test!='R') { num = parseFloat(val);
	        if (isNaN(val)) errors+='- '+nm+' debe ser un n�mero.\n';
	        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
	          min=test.substring(8,p); max=test.substring(p+1);
	          if (num<min || max<num) errors+='- '+nm+' debe ser un n�mero entre '+min+' y '+max+'.\n';
	    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' es obligatorio.\n'; }
	  } if (errors) alert('Han ocurrido los siguientes errores:\n'+errors);
	  document.MM_returnValue = (errors == '');
	}
