// JavaScript Document

var wwwroot="http://www.uv.mx/lectores/";
var tiempo;

function menu_principal() {
	///////// Generar Submenús - 2° Nivel ////////////
    document.write("<div id='SubMenuPrincipal' style='position:relative; left:0px; top:0px; width:700; height:1px; z-index:100;'>");
	
	/*******  Menú de NUESTRO PROGRAMA   *********/
		document.write("<div id='NuestroPrograma' style='position:absolute; left:16px; top:16px; width:120px; height:50px; z-index:101; visibility: hidden;' onmouseover=\"en_el_submenu('NuestroPrograma')\" onmouseout=\"oculta_submenu('NuestroPrograma')\">");
		document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "programa/lineamientos.html' class='Menu'>Lineamientos</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF'><a href='" + wwwroot + "programa/objetivos.html' class='Menu'>Objetivos</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF'><a href='" + wwwroot + "programa/estrategias.html' class='Menu'>Estrategias</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF'><a href='" + wwwroot + "programa/encuesta/resumen.html' class='Menu'>Encuesta</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");		
		document.write("<tr><td height='14'><img src='" + wwwroot + "images/inferior-submenu.png' width='100%' height='14' /></td></tr>");
		document.write("</table>");
		document.write("</div>");
		
	/*******  Menú de LECTURA   *********/
		document.write("<div id='Lectura' style='position:absolute; left:80px; top:16px; width:120px; height:50px; z-index:102; visibility: hidden;' onmouseover=\"en_el_submenu('Lectura')\" onmouseout=\"oculta_submenu('Lectura')\">");
		document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectura/bocado/cuento/index.html' class='Menu'>Bocado completo</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF'><a href='" + wwwroot + "lectura/probadita/index.html' class='Menu'>Una probadita</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF'><a href='" + wwwroot + "lectura/efemerides/index.html' class='Menu'>Efemérides</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td height='14'><img src='" + wwwroot  + "images/inferior-submenu.png' width='100%' height='14'></td></tr>");
		document.write("</table>");
		document.write("</div>");

	/*******  Menú de LECTORES   *********/
		document.write("<div id='Lectores' style='position:absolute; left:152px; top:16px; width:120px; height:50px; z-index:103; visibility: hidden;' onmouseover=\"en_el_submenu('Lectores')\" onmouseout=\"oculta_submenu('Lectores')\">");
		document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/juan josé.html' class='Menu'>Juan José A.</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/victor_aguilar.html' class='Menu'>Victor Aguilar</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/sor juana.html' class='Menu'>Sor Juana Inés</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/felipe garrido.html' class='Menu'>Felipe Garrido</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/Antonio Alatorre.html' class='Menu'>Antonio Alatorre</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/Relato.html' class='Menu'>Carlos Martínez</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/bibliotecas.html' class='Menu'>Adalberto Tejeda</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "lectores/yo_lector.html' class='Menu'>M. M. Ojeda</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td height='14'><img src='" + wwwroot + "images/inferior-submenu.png' width='100%' height='14'></td></tr>");
		document.write("</table>");
		document.write("</div>");

		document.write("<div id='Comite' style='position:absolute; left:216px; top:16px; width:120px; height:50px; z-index:104; visibility: hidden;' onmouseover=\"en_el_submenu('Comite')\" onmouseout=\"oculta_submenu('Comite')\">");
		document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
		document.write("<tr><td bgcolor='#FFFFFF' height='25' valign='bottom'><a href='" + wwwroot + "comite/sintesis/index.html' class='Menu'>Síntesis curricular</a></td></tr>");
		document.write("<tr><td height='2' bgcolor='#034694'></td></tr>");
		document.write("<tr><td height='14'><img src='" + wwwroot + "images/inferior-submenu.png' width='100%' height='14'></td></tr>");
		document.write("</table>");
		document.write("</div>");


	document.write("</div>");
}

function muestra_submenu(submenu_id) {
		clearTimeout(tiempo);
		oculta_todos_subm();
		document.getElementById(submenu_id).style.visibility="visible";
		submenuactual=submenu_id;
}

function en_el_submenu(submenu_id){
		clearTimeout(tiempo);
		document.getElementById(submenu_id).style.visibility="visible";
}

function oculta_submenu(submenu_id) {
		tiempo=setTimeout("o_submenu('" + submenu_id + "')",1000);
}

function o_submenu(submenu_id) {
		document.getElementById(submenu_id).style.visibility="hidden";
}

function oculta_todos_subm() {
	document.getElementById('NuestroPrograma').style.visibility="hidden"
	document.getElementById('Lectura').style.visibility="hidden"
	document.getElementById('Lectores').style.visibility="hidden"
	document.getElementById('Comite').style.visibility="hidden"
}


var dias=new Array("Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves ","Viernes","S&aacute;bado");
var meses=new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre");

function obten_fecha() {
	var mifecha=new Date()
	var ano=mifecha.getYear()
	if (ano < 1000)
		ano+=1900
	var dia=mifecha.getDay()
	var mes=mifecha.getMonth()
	var diam=mifecha.getDate()
	var cfecha="<div class='Fecha'>&nbsp;&nbsp;"+dias[dia]+" "+diam+" de "+meses[mes]+" de "+ano+"</div>"
    document.write(cfecha);
}


function lect_bocado() {
	document.write("<table width='173' border='0' cellspacing='0' cellpadding='0'>");
    document.write("<tr><td height='24' align='right'><a href='" + wwwroot + "lectura/bocado/cuento/index.html' class='Menu-izquierdo' onmouseover=\"MM_swapImage('flechaCuento','','" + wwwroot + "images/flechita-menu.png',1)\" onmouseout=\"MM_swapImgRestore()\">Cuento</a></td>");
    document.write("<td width='14' align='right'><img src='" + wwwroot + "images/trans.gif' id='flechaCuento'></td></tr>");
    document.write("<tr><td height='24' align='right'><a href='" + wwwroot + "lectura/bocado/ensayo/index.html' class='Menu-izquierdo' onmouseover=\"MM_swapImage('flechaEnsayo','','" + wwwroot + "images/flechita-menu.png',1)\" onmouseout=\"MM_swapImgRestore()\">Ensayo</a></td>");
    document.write("<td width='14' align='right'><img src='" + wwwroot + "images/trans.gif' id='flechaEnsayo'></td></tr>");
    document.write("<tr><td height='24' align='right'><a href='" + wwwroot + "lectura/bocado/poesia/index.html' class='Menu-izquierdo'onmouseover=\"MM_swapImage('flechaPoesia','','" + wwwroot + "images/flechita-menu.png',1)\" onmouseout=\"MM_swapImgRestore()\">Poes&iacute;a</a></td>");
    document.write("<td width='14' align='right'><img src='" + wwwroot + "images/trans.gif' id='flechaPoesia'></td></tr>");
    document.write("<tr><td height='24' align='right'><a href='" + wwwroot + "lectura/bocado/cronica/index.html' class='Menu-izquierdo'onmouseover=\"MM_swapImage('flechaCronica','','" + wwwroot + "images/flechita-menu.png',1)\" onmouseout=\"MM_swapImgRestore()\">Cr&oacute;nica</a></td>");
    document.write("<td width='14' align='right'><img src='" + wwwroot + "images/trans.gif' id='flechaCronica'></td></tr>");
    document.write("<tr><td height='24' align='right'><a href='" + wwwroot + "lectura/bocado/resena/index.html' class='Menu-izquierdo'onmouseover=\"MM_swapImage('flechaResena','','" + wwwroot + "images/flechita-menu.png',1)\" onmouseout=\"MM_swapImgRestore()\">Rese&ntilde;a</a></td>");
    document.write("<td width='14' align='right'><img src='" + wwwroot + "images/trans.gif' id='flechaResena'></td></tr></table>");
}

//Escribe el menú inferior que aparece en todas las páginas interiores
function menu_inferior() {
	document.write("<table width='550' border='0' cellspacing='0' cellpadding='0' align='center'><tr>");
    document.write("<td class='Pie-nombre'>Programa Universitario de Formaci&oacute;n de Lectores 2011</td></tr>");
    document.write("<tr><td>");
	
	document.write("<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>");
	document.write("<tr valign='top'>");
	document.write("<td><div align='center'><a href='" + wwwroot + "index.html' class='Menu-inferior'>Inicio</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "programa/lineamientos.html' class='Menu-inferior'>Nuestro programa</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "lectura/bocado/cuento/index.html' class='Menu-inferior'>Lectura</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "lectores/yo_lector.html' class='Menu-inferior'>Lectores</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "comite/sintesis/index.html' class='Menu-inferior'>Comité editorial</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");	
	document.write("<td><div align='center'><a href='" + wwwroot + "sitios/index.html' class='Menu-inferior'>Sitios de interés</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "foros/index.php' class='Menu-inferior' target='_blank'>Foro</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "blog/index.php' class='Menu-inferior' target='_blank'>Blog</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "novedades/index.html' class='Menu-inferior'>Novedades</a></div></td><td width='1'><div class='Separador-menu-inferior'></div></td>");
	document.write("<td><div align='center'><a href='" + wwwroot + "boletin/index.html' class='Menu-inferior'>Boletín</a></div></td>");
    document.write("</tr>");
    document.write("</table>");
	
	document.write("</td></tr></table>");
}


function actualizacion() {
	document.write("<div align='center' class='Actualizacion'>Última actualización:  26 de enero de 2012</div>");
}
