// JavaScript Document

var alturaCelda = 250;
var alturaScroll = 250;
var menuPralLI = "";
var menuPralA = "";
var menuSecLI = "";
var menuSecA = "";

/*
 * CAMBIAR EL FONDO DEL ELEMENTO ENFOCADO EN EL MENÚ PRINCIPAL
 */
 
function CambiaFondoLi(elementoLI, elementoA, nuevoColor) {
	document.getElementById("Menu1Opcion1").style.background = "#f0eff6";
	document.getElementById("Menu1Enlace1").style.color = "#4b5695";
	document.getElementById("Menu1Opcion2").style.background = "#f0eff6";
	document.getElementById("Menu1Enlace2").style.color = "#4b5695";
	document.getElementById("Menu1Opcion3").style.background = "#f0eff6";
	document.getElementById("Menu1Enlace3").style.color = "#4b5695";
	document.getElementById("Menu1Opcion4").style.background = "#f0eff6";
	document.getElementById("Menu1Enlace4").style.color = "#4b5695";
	document.getElementById("Menu1Opcion5").style.background = "#f0eff6";
	document.getElementById("Menu1Enlace5").style.color = "#4b5695";
	document.getElementById(elementoLI).style.background = nuevoColor;
	document.getElementById(elementoA).style.color = "#f0eff6";
}

/*
 * CAMBIAR EL FONDO DEL ELEMENTO ENFOCADO EN EL MENÚ SECUNDARIO.
 */

function CambiaFondoSubLi(elementoLI, elementoA) {
	if (document.getElementById("Menu2Opcion1")) document.getElementById("Menu2Opcion1").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace1")) document.getElementById("Menu2Enlace1").style.color = "#f0eff6";
	if (document.getElementById("Menu2Opcion2")) document.getElementById("Menu2Opcion2").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace2")) document.getElementById("Menu2Enlace2").style.color = "#f0eff6";
	if (document.getElementById("Menu2Opcion3")) document.getElementById("Menu2Opcion3").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace3")) document.getElementById("Menu2Enlace3").style.color = "#f0eff6";
	if (document.getElementById("Menu2Opcion4")) document.getElementById("Menu2Opcion4").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace4")) document.getElementById("Menu2Enlace4").style.color = "#f0eff6";
	if (document.getElementById("Menu2Opcion5")) document.getElementById("Menu2Opcion5").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace5")) document.getElementById("Menu2Enlace5").style.color = "#f0eff6";
	if (document.getElementById("Menu2Opcion6")) document.getElementById("Menu2Opcion6").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace6")) document.getElementById("Menu2Enlace6").style.color = "#f0eff6";
	if (document.getElementById("Menu2Opcion7")) document.getElementById("Menu2Opcion7").style.background = "#4b5695";
	if (document.getElementById("Menu2Enlace7")) document.getElementById("Menu2Enlace7").style.color = "#f0eff6";
	document.getElementById(elementoLI).style.background = "#f0eff6";
	document.getElementById(elementoA).style.color = "#4b5695";
}
function RestablecerFondoSubLi(elementoLI, elementoA) {
	document.getElementById(elementoLI).style.background = "#4b5695";
	document.getElementById(elementoA).style.color = "#f0eff6";
}

/*
 * SELECCIONAR EL MENU RECIBIDO COMO PARAMETRO.
 */

function SeleccionarMenu(menuPral, menuSec) {
	
	menuPralLI = "Menu1Opcion" + menuPral;
	menuPralA = "Menu1Enlace" + menuPral;
	document.getElementById(menuPralLI).style.background = "#4b5695";
	document.getElementById(menuPralA).style.color = "#f0eff6";
	if (menuSec != 0) {
		menuSecLI = "Menu2Opcion" + menuSec;
		menuSecA = "Menu2Enlace" + menuSec;
		document.getElementById(menuSecLI).style.background = "#f0eff6";
		document.getElementById(menuSecA).style.color = "#4b5695";
	}
}

/*
 * CAMBIAR EL TAMAÑO DE LA CELDA CON EL CONTENIDO.
 */
 
function RedimensionaCeldaContenido() {
	if (navigator.appName == "Netscape") 
		alturaCelda = document.body.offsetHeight - 299;
	else 
		alturaCelda = document.body.offsetHeight - 312;
	alturaScroll = alturaCelda - 20;
	document.getElementById("celdaContenido").height = alturaCelda;
	scrolldiv_setWidth(510);	// Setting total width of scrolling div
	scrolldiv_setHeight(alturaScroll);	// Setting total height of scrolling div
	scrolldiv_initScroll();	// Initialize javascript functions
	return;
}

/*
 * CAMBIAR EL CONTENIDO DE LA CAPA CON EL SUBMENÚ
 */

function PintarSubmenu1() {
	var texto;

	texto = "<ul>\n";
	texto += "<li id=\"Menu2Opcion1\"><a id=\"Menu2Enlace1\" href=\"asertia_quienes_somos.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\">Qui&eacute;nes Somos</a></li>\n";
	texto += "<li id=\"Menu2Opcion2\"><a id=\"Menu2Enlace2\" href=\"asertia_nuestro_valor.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\">Nuestro Valor</a></li>\n";
	texto += "<li id=\"Menu2Opcion3\"><a id=\"Menu2Enlace3\" href=\"asertia_ventajas.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\">Ventajas</a></li>\n";
	texto += "<li id=\"Menu2Opcion4\"><a id=\"Menu2Enlace4\" href=\"asertia_metodologia.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\">Metodolog&iacute;a</a></li>\n";
	texto += "<li id=\"Menu2Opcion5\"><a id=\"Menu2Enlace5\" href=\"asertia_garantia_calidad.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\">Garant&iacute;a de Calidad</a></li>\n";
	texto += "<li id=\"Menu2Opcion6\">D&oacute;nde estamos\n";
	texto += "	<ul>\n";
	texto += "	<li id=\"Menu2Opcion7\"><a id=\"Menu2Enlace7\" href=\"asertia_donde_central.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion7', 'Menu2Enlace7');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion7', 'Menu2Enlace7');\">Central</a></li>\n";
	texto += "	<li id=\"Menu2Opcion8\"><a id=\"Menu2Enlace8\" href=\"asertia_donde_delegaciones.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion8', 'Menu2Enlace8');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion8', 'Menu2Enlace8');\">Delegaciones Comerciales</a></li>\n";
	texto += "	</ul>\n";
	texto += "</li>\n";
	texto += "</ul>\n";
	document.getElementById("banda2menu2capa").innerHTML = texto;
	return;
}
function PintarSubmenu2() {
	var texto;

	texto = "<ul>";
	texto += "<li id=\"Menu2Opcion1\"><a id=\"Menu2Enlace1\" href=\"Servicios_servicios_administrativos.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\">Servicios Administrativos</a></li>";
	texto += "<li id=\"Menu2Opcion2\"><a id=\"Menu2Enlace2\" href=\"Servicios_Servicios_auxiliares.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\">Servicios Auxiliares</a></li>";
	texto += "<li id=\"Menu2Opcion3\"><a id=\"Menu2Enlace3\" href=\"Servicios_Outsourcing_tecnico.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\">Outsourcing T&eacute;cnico</a></li>";
	texto += "<li id=\"Menu2Opcion4\"><a id=\"Menu2Enlace4\" href=\"Servicios_Call_center.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\">Call Center</a></li>";
	texto += "<li id=\"Menu2Opcion5\"><a id=\"Menu2Enlace5\" href=\"Servicios_Task_force.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\">Task Force</a></li>";
	texto += "<li id=\"Menu2Opcion6\"><a id=\"Menu2Enlace6\" href=\"Servicios_Outsourcing.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion6', 'Menu2Enlace6');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion6', 'Menu2Enlace6');\">Outsourcing de RR.HH.</a></li>";
	texto += "</ul>";
	document.getElementById("banda2menu2capa").innerHTML = texto;
	return;
}
function PintarSubmenu3() {
	var texto;

	texto = "<ul>";
	texto += "<li id=\"Menu2Opcion1\"><a id=\"Menu2Enlace1\" href=\"Empleo_Trabajar.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\">Trabajar en Asertia</a></li>";
	texto += "<li id=\"Menu2Opcion2\"><a id=\"Menu2Enlace2\" href=\"Empleo_Ofertas.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\">Ofertas de Trabajo</a></li>";
	texto += "</ul>";
	document.getElementById("banda2menu2capa").innerHTML = texto;
	return;
}
function PintarSubmenu4() {
	var texto;

	texto = "<ul>";
	texto += "<li id=\"Menu2Opcion1\"><a id=\"Menu2Enlace1\" href=\"Trabajadores_contacto.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\">Tu Contacto en Asertia</a></li>";
<!--	texto += "<li id=\"Menu2Opcion2\"><a id=\"Menu2Enlace2\" href=\"Trabajadores_Partes.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\">Partes</a></li>";-->
	texto += "<li id=\"Menu2Opcion3\"><a id=\"Menu2Enlace3\" href=\"Trabajadores_Que_hacer_cuando.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\">Qu&eacute; Hacer Cuando...</a></li>";
	texto += "<li id=\"Menu2Opcion4\"><a id=\"Menu2Enlace4\" href=\"Trabajadores_Derechos_y_obligaciones_trabajador.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\">Derechos y Obligaciones de los Trabajadores</a></li>";
	texto += "<li id=\"Menu2Opcion5\"><a id=\"Menu2Enlace5\" href=\"Trabajadores_Derechos_y_obligaciones_prevencion.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\">Derechos y Deberes en Materia de Prevenci&oacute;n de Riesgos</a></li>";
	texto += "</ul>";
	document.getElementById("banda2menu2capa").innerHTML = texto;
	return;
}
function PintarSubmenu5() {
	var texto;

	texto = "<ul>";
	texto += "<li id=\"Menu2Opcion1\"><a id=\"Menu2Enlace1\" href=\"Grupo_LaCompania.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion1', 'Menu2Enlace1');\">La Compa&ntilde;&iacute;a</a></li>";
	texto += "<li id=\"Menu2Opcion2\"><a id=\"Menu2Enlace2\" href=\"Grupo_Personas_y_equipos.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion2', 'Menu2Enlace2');\">Personas y Equipos</a></li>";
	texto += "<li id=\"Menu2Opcion3\"><a id=\"Menu2Enlace3\" href=\"Grupo_Empresas.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion3', 'Menu2Enlace3');\">Empresas del Grupo</a></li>";
	texto += "<li id=\"Menu2Opcion4\"><a id=\"Menu2Enlace4\" href=\"Grupo_Nuestro_valor.asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion4', 'Menu2Enlace4');\">Nuestro Valor</a></li>";
	texto += "<li id=\"Menu2Opcion5\"><a id=\"Menu2Enlace5\" href=\"Grupo_Trabajar .asp\" onmouseover=\"CambiaFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\" onmouseout=\"RestablecerFondoSubLi('Menu2Opcion5', 'Menu2Enlace5');\">Trabajar en el Grupo Attempora</a></li>";
	texto += "</ul>";
	document.getElementById("banda2menu2capa").innerHTML = texto;
	return;
}

