function muestraflash (){
	var cad;
	cad='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
		'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'+
		'width="506" height="437" id="flashhome" align="top">'+
		'<param name=movie value="home.swf">'+
		'<param name=loop value=true>'+
		'<param name=menu value=true>'+
		'<param name=quality value=best>'+
		'<param name=scale value=exactfit>'+
		'<param name=bgcolor value=#000000>'+
		'<embed src="home.swf" loop=false menu=false quality=best scale=exactfit bgcolor=#000000  width="506" height="437" align="top"'+
			'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'+
		'</embed>'+
    '</object>';
	write (cad);

}


function cargarmenu(sMP, sMS, iTipo){
 var oDTSuperior = document.getElementById("MenuSuperior").getElementsByTagName("dl")[0].getElementsByTagName("dt");
 var oDDSuperior = document.getElementById("MenuSuperior").getElementsByTagName("dl")[0].getElementsByTagName("dd");
 //Recorrido de la lista de puntos de menú secundario del portal
 //En un principio se ocultan, y se le añaden eventos para modificar la apariencia
 for(i=0;i<oDDSuperior.length;i++){

  //Si coincide con el menú activo
  if(sMP==oDDSuperior[i].id.split("-")[1]){

   //Se muestran los hijos del menú principal activo
   if (oDDSuperior[i].style.display == "block"){
	   oDDSuperior[i].style.display = "none";

	}else{
	   oDDSuperior[i].style.display = "block";    
	}

  } else {
	   if ((oDTSuperior[oDDSuperior[i].id.split("-")[1]-1].className!="menu_principal_s") && (oDTSuperior[oDDSuperior[i].id.split("-")[1]-1].className!="menu_principal_s2")){
			oDDSuperior[i].style.display = "none";
	   }
  }

 }

}

function cargarmenuseleccionado(sMP, sMS, iTipo){

//Obtención de los puntos principales y secundarios

 var oDTSuperior = document.getElementById("MenuSuperior").getElementsByTagName("dl")[0].getElementsByTagName("dt");
 var oDDSuperior = document.getElementById("MenuSuperior").getElementsByTagName("dl")[0].getElementsByTagName("dd");
 
 //Recorrido de la lista de puntos de menú secundario del portal
 //En un principio se ocultan, y se le añaden eventos para modificar la apariencia
 for(i=0;i<oDDSuperior.length;i++){

  //Si coincide con el menú activo
  if(sMP==oDDSuperior[i].id.split("-")[1]){

   //Se muestran los hijos del menú principal activo
	   if (iTipo==1){
		oDTSuperior[sMP-1].setAttribute('className', 'menu_principal_s');
	   }else{
			oDTSuperior[sMP-1].setAttribute('className', 'menu_principal_s2');
	   }
	   oDDSuperior[i].style.display = "block";


  } else {
		oDDSuperior[i].style.display = "none";
  }

 }

}
//Una vez hecho clic sobre un punto de menú principal,
//se tratan sus puntos de menú secundario. Portal.
function GestionarMenuSuperior(oPMP){

 var iPMP = oPMP.id.split("-")[1];
 var oDT = document.getElementById("MenuSuperior").getElementsByTagName("dl")[0].getElementsByTagName("dt");
 var oDD = document.getElementById("MenuSuperior").getElementsByTagName("dl")[0].getElementsByTagName("dd");

 oPMP.unselectable = "on";

 for(i=0;i<oDD.length;i++){
  iDD = oDD[i].id.split("-")[1];
  if(iDD==iPMP){
   // si pertenece al punto seleccionado: abrir puntos de menú
   oDT[iDD-1].setAttribute('className', 'menu_principal_s');
   oDD[i].style.display = "block";
  } else {
  // si no pertenece al punto seleccionado: cerrar puntos de menú
  oDD[i].style.display = "none";
  oDT[i].setAttribute('className', 'menu_principal');
  oDD[i].setAttribute('className', 'menu_secundario');
   
  }
 }

}

function cambiarFondoAColor(esto,sColor){
	esto.style.backgroundColor="#"+sColor;
}

function cambiarFondoABlanco(esto){
	esto.style.backgroundColor="#FFFFFF";
}



function cambiarimagen(esto,sImagen, sIdioma){
	esto.src= "imagenes/menu/"+sIdioma+"/"+sImagen+".gif";
}

function validarformulario(oFormulario){
	var p;
	for(var i=0;i<oFormulario.elements.length;i++){
		if (oFormulario.elements[i].name=="nombre"){
			/* Validar el remitente */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su nombre.");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="apellidos"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir sus apellidos.");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="nif"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su N.I.F.");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="direccion"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su direccion");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="poblacion"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su poblacion");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="cp"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su codigo postal");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="email"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su e-mail");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="telefono"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir su telefono");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="asunto"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir el asunto");
					oFormulario.elements[i].focus();
					return false;
			}
		}
		if (oFormulario.elements[i].name=="comentario"){
			/* Validar el texto del mensaje */
			if (oFormulario.elements[i].value==""){
					alert("Debe introducir el comentario");
					oFormulario.elements[i].focus();
					return false;
			}
		}
	}
	return true;
}


//Función para mostrar los contenidos de cada una de las óperas
function cargarContenido(idContenido){
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("contenidomenu").filters[0]){
			document.getElementById("contenidomenu").filters[0].Play();
			document.getElementById("contenidomenu").filters[0].Apply();
		}
	}
	if (idContenido==2){
		document.getElementById("celdacuerpo").height= "1000px";
	}
	else{
		document.getElementById("celdacuerpo").height= "100%";
	}
	for (i=1; i<=18; i++){
		if (i!=idContenido){
			if(document.getElementById("contenido"+i)){
				document.getElementById("contenido"+i).style.display="none";
				if(document.getElementById("lnkContenido"+i))
					document.getElementById("lnkContenido"+i).style.color="white";
			}
		}else{
			if(document.getElementById("contenido"+i)){
				document.getElementById("contenido"+idContenido).style.display="block";
				if(document.getElementById("lnkContenido"+idContenido)){
					document.getElementById("lnkContenido"+idContenido).style.color="#ea0a0f";
					document.getElementById("lnkContenido"+idContenido).blur();
				}
			}
		}
	}
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("contenidomenu").filters[0])
			document.getElementById("contenidomenu").filters[0].Play();
	}
	
	// destaca el punto de menú seleccionado
	
}

function cargarContenidoFoto(idContenido){
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("contenidomenu").filters[0]){
			document.getElementById("contenidomenu").filters[0].Play();
			document.getElementById("contenidomenu").filters[0].Apply();
		}
	}
	if (idContenido==2){
		document.getElementById("celdacuerpo").height= "1000px";
	}
	else{
		document.getElementById("celdacuerpo").height= "100%";
	}

	for (i=1; i<=8; i++){
		if (i!=idContenido){
			if(document.getElementById("contenido"+i))
				document.getElementById("contenido"+i).style.display="none";
		}else{
			document.getElementById("contenido"+idContenido).style.display="block";
		}
	}

	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("contenidomenu").filters[0])
			document.getElementById("contenidomenu").filters[0].Play();
	}
}

// Función para mostrar el currículum
function mostrarcv(idCv){
/*	alert("prueba");
	var aBody = document.getElementsByTagName("body");
	alert(aBody[0].width);*/
//	alert(document.style.width);
/*	alert(idCv);
	for (i=1; i<=14; i++){
		if (i!=idCv){
			alert("entro,"+i+" distinto de "+idCv);
			document.getElementById("cv"+i).style.display="none";
		}
	}*/
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("cv"+idCv).filters[0])
			document.getElementById("cv"+idCv).filters[0].Apply();
	}
	document.getElementById("cv"+idCv).style.display="block";
	document.getElementById("cv"+idCv).style.left=(window.screen.width/2)-150;
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("cv"+idCv).filters[0])
			document.getElementById("cv"+idCv).filters[0].Play();
	}
}

// Función para cerrar el currículum
function cerrarcv(idCv){
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("cv"+idCv).filters[0]){
			document.getElementById("cv"+idCv).filters[0].Apply();
			document.getElementById("cv"+idCv).filters[0].Play();
		}
	}
	document.getElementById("cv"+idCv).style.display="none";
}

function mostrarteatro(idTeatro){
	for (i=1; i<=6; i++){
		if (i!=parseInt(idTeatro)){
			document.getElementById("teatro"+i).style.borderTop="0px";
			document.getElementById("teatro"+i).style.borderLeft="0px";
			document.getElementById("teatro"+i).style.borderRight="0px";
			switch(i){
				case 1:
					document.getElementById("teatro"+i).style.borderBottomColor="#282F30";
					break;
				case 2:
					document.getElementById("teatro"+i).style.borderBottomColor="#202627";
					break;
				case 3:
					document.getElementById("teatro"+i).style.borderBottomColor="#181D1D";
					break;
				case 4:
					document.getElementById("teatro"+i).style.borderBottomColor="#121515";
					break;
				case 5:
					document.getElementById("teatro"+i).style.borderBottomColor="#0B0D0D";
					break;
				case 6:
					document.getElementById("teatro"+i).style.borderBottomColor="#0B0D0D";
					break;
			}
			//document.getElementById("teatro"+i).style.borderBottomColor="transparent";
			document.getElementById("teatro"+i).style.borderStyle="solid";
		}else{
			document.getElementById("teatro"+i).style.borderTop="0px";
			document.getElementById("teatro"+i).style.borderLeft="0px";
			document.getElementById("teatro"+i).style.borderRight="0px";
			document.getElementById("teatro"+i).style.borderBottomColor="#A11000";
			document.getElementById("teatro"+i).style.borderStyle="solid";
		}
	}
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("textoteatro").filters[0]){
			document.getElementById("textoteatro").filters[0].Play();
			document.getElementById("textoteatro").filters[0].Apply();
		}
	}
	for (i=1; i<=6; i++){
		if (i!=idTeatro){
			document.getElementById("textoteatro"+i).style.display="none";
		}else{
			document.getElementById("textoteatro"+idTeatro).style.display="block";
		}
	}
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("textoteatro").filters[0])
			document.getElementById("textoteatro").filters[0].Play();
	}
}

function mostrarcoro(idCoro){
	for (i=1; i<=2; i++){
		if (i!=parseInt(idCoro)){
			document.getElementById("coro"+i).style.borderTop="0px";
			document.getElementById("coro"+i).style.borderLeft="0px";
			document.getElementById("coro"+i).style.borderRight="0px";
			document.getElementById("coro"+i).style.borderBottom="0px";
			//document.getElementById("teatro"+i).style.borderBottomColor="transparent";
			document.getElementById("coro"+i).style.borderStyle="solid";
		}else{
			document.getElementById("coro"+i).style.borderTop="0px";
			document.getElementById("coro"+i).style.borderLeft="0px";
			document.getElementById("coro"+i).style.borderRight="0px";
			document.getElementById("coro"+i).style.borderBottom="1px solid #A11000";
			//document.getElementById("coro"+i).style.borderStyle="solid";
		}
	}
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("textoteatro").filters[0]){
			document.getElementById("textoteatro").filters[0].Play();
			document.getElementById("textoteatro").filters[0].Apply();
		}
	}
	for (i=1; i<=2; i++){
		if (i!=idCoro){
			document.getElementById("textocoro"+i).style.display="none";
		}else{
			document.getElementById("textocoro"+idCoro).style.display="block";
		}
	}
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("textoteatro").filters[0])
			document.getElementById("textoteatro").filters[0].Play();
	}
}

// Función para mostrar el currículum
function mostrarfoto(idCv){
/*	alert("prueba");
	var aBody = document.getElementsByTagName("body");
	alert(aBody[0].width);*/
//	alert(document.style.width);

	for (i=1; i<=25; i++){
		if (i!=idCv && document.getElementById("foto"+i)){
			document.getElementById("foto"+i).style.display="none";
		}
	}
	
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("foto"+idCv).filters[0])
			document.getElementById("foto"+idCv).filters[0].Apply();
	}
	
	document.getElementById("foto"+idCv).style.display="block";
	document.getElementById("foto"+idCv).style.left=(window.screen.width/2)-150;
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("foto"+idCv).filters[0])
			document.getElementById("foto"+idCv).filters[0].Play();
	}
}

// Función para cerrar el currículum
function cerrarfoto(idCv){
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("foto"+idCv).filters[0]){
			document.getElementById("foto"+idCv).filters[0].Apply();
			document.getElementById("foto"+idCv).filters[0].Play();
		}
	}
	document.getElementById("foto"+idCv).style.display="none";
}

function mostrarmapateatro(){
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("teatrogrande").filters[0])
			document.getElementById("teatrogrande").filters[0].Apply();
	}
		if (document.getElementById("teatrogrande").style.display=="none"){
			document.getElementById("teatrogrande").style.left=(window.screen.width/2)-250;
			document.getElementById("teatrogrande").style.display="block";
		}else{
			document.getElementById("teatrogrande").style.display="none";
		}
	if (navigator.appName=="Microsoft Internet Explorer"){
		if(document.getElementById("teatrogrande").filters[0])
			document.getElementById("teatrogrande").filters[0].Play();
	}
}

function cerrarteatro(){
	document.getElementById("teatrogrande").style.display="none";
}