// JavaScript Document

// Para mostrar los QTVR
function qtvr (nombre,ancho,alto)
{
	document.write("<embed src='"+nombre+".mov' width='"+ancho+"' height='"+alto+"' align='absmiddle' controller='TRUE' scale='TOFIT'>");
	document.write("</embed>");
}

// Para mostrar los ficheros flash activos
function muestra_flash (nombre,ancho,alto)
{
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+ancho+"' height='"+alto+"' id='"+nombre+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='sameDomain'>");
	document.write("<param name='movie' value='"+nombre+".swf'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='menu' value='false'>");
	//document.write("<param name='bgcolor' value='"+color+"'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<embed src='"+nombre+".swf' quality='high' wmode='transparent' width='"+ancho+"' height='"+alto+"' name='"+nombre+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</object>");
}

// Muestra la fecha formateada
function fecha()
{
	var mes = new Array ('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
	var dia = new Array ('Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado');
	var lafecha = new Date();
	var cadena = dia[lafecha.getDay()]+", "+lafecha.getDate()+" de "+mes[lafecha.getMonth()]+" de "+lafecha.getFullYear();
	return cadena;
}

// Cambia el estado de los botones con rollover
function cambia(imagen,estado)
{
	if (estado==1)
	{
		document.getElementById(imagen).src=eval(imagen+"_f2.src");
	}
	else
	{
		document.getElementById(imagen).src=eval(imagen+".src");
	}
}

// Funcion para abrir ventana al tamaño de pantalla
function abre_max(nombre)
{
	window.open(nombre,"","width="+screen.width+",height="+screen.height+",left=0,top=0,scrollbars=yes");
}

// Funcion para abrir una ventana centrada simple
function abre_simple(nombre,ancho,alto)
{
	window.open(nombre,"","width="+ancho+",height="+alto+",left="+(screen.width-ancho)/2+",top="+(screen.height-alto)/2);
}

// Funcion para abrir una ventana centrada que muestra una foto y un texto
function abre(nombre,ancho,alto,foto,texto)
{
	window.open(nombre+"?fichero='"+foto+"'"+"&pie='"+escape(texto)+"'","","width="+ancho+",height="+alto+",left="+(screen.width-ancho)/2+",top="+(screen.height-alto)/2);
}

// Funcion para abrir una ventana centrada que muestra una foto y un texto
function abre_reco(nombre,titulo,texto,enlace)
{
	window.open(nombre+"?pie=" + texto + "&titulo=" + titulo + "&enlace=" + enlace,"","width=350,height=313,left="+(screen.width-350)/2+",top="+(screen.height-313)/2);
}
