
var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

var i = 1;
linkset[1]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */

linkset[1]+='<div class="menuitems"><a href="../ender/mujer/index.php" target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'imgVideo_' + i + '\',\'\',\'video/en_construccion.gif\',1)"><img src="img/li.gif" width="0" height="0" border="0" hspace="0" >Web de Mujer</a></div>'
linkset[1]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[1]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '" src="video/igualdad_genero.gif" hspace="0" vspace="0" border="0"/>'
linkset[1]+='</td></tr></table>'
i++;

linkset[2]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */
linkset[2]+='<div class="menuitems"><a href="../ender/inmigracion/index.php" target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'imgVideo_' + i + '\',\'\',\'video/en_construccion.gif\',1)"><img src="img/li.gif" width="0" height="0" border="0" hspace="0" >Web de inmigración</a></div>'
linkset[2]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[2]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/politicas_sectoriales.gif" hspace="0" vspace="0" border="0"/>'
linkset[2]+='</td></tr></table>'
i++;

linkset[3]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */

linkset[3]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[3]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '" src="video/Accesibilidad_informacion_comunicacion.gif" hspace="0" vspace="0" border="0"/>'
linkset[3]+='</td></tr></table>'
i++;



linkset[4]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */
linkset[4]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[4]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/familias_miembros_sordos.gif" hspace="0" vspace="0" border="0"/>'
linkset[4]+='</td></tr></table>'
i++;

linkset[5]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */
linkset[5]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[5]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/educacion_personas_sordas.gif" hspace="0" vspace="0" border="0"/>'
linkset[5]+='</td></tr></table>'
i++;

linkset[6]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */
linkset[6]+='<div class="menuitems"><a href="formacion_empleo.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'imgVideo_' + i + '\',\'\',\'video/formacion_empleo.gif\',1)"><img src="img/li.gif" width="0" height="0" border="0" hspace="0" >Formación y empleo</a></div>'

linkset[6]+='<div class="menuitems"><a href="reforma_laboral.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'imgVideo_' + i + '\',\'\',\'video/en_construccion.gif\',1)"><img src="img/li.gif" width="0" height="0" border="0" hspace="0" >Reforma laboral</a></div>'
/* fin OPCIONES */
linkset[6]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[6]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/formacion_empleo.gif" hspace="0" vspace="0" border="0"/>'
linkset[6]+='</td></tr></table>'
i++;

linkset[7]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'

linkset[7]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[7]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/Movimiento_asociativo_personas_sordas.gif" hspace="0" vspace="0" border="0"/>'
linkset[7]+='</td></tr></table>'
i++;

linkset[8]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */
linkset[8]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[8]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/la_lengua_signos_espanola.gif" hspace="0" vspace="0" border="0"/>'
linkset[8]+='</td></tr></table>'
i++;


linkset[9]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */
linkset[9]+='</td><td class="celda_video" valign="top">'
/* VIDEO (imagen) */
linkset[9]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '"  src="video/cultura_sorda.gif" hspace="0" vspace="0" border="0"/>'
linkset[9]+='</td></tr></table>'
i++;

linkset[10]='<table class="tabla_popmenu"><tr><td align="left" valign="top">'
/* inicio OPCIONES */

linkset[10]+='<div class="menuitems"><a href="areas_trabajo.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'imgVideo_' + i + '\',\'\',\'video/cooperativo.gif\',1)"><img src="img/li.gif" width="0" height="0" border="0" hspace="0" >Áreas de trabajo corporativo</a></div>'

linkset[10]+='<div class="menuitems"><a href="login_irpf.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'imgVideo_' + i + '\',\'\',\'video/IRPF.gif\',1)"><img src="img/li.gif" width="0" height="0" border="0" hspace="0" >0,7 IRPF</a></div>'

linkset[10]+='</td><td class="celda_video" valign="top">'

/* VIDEO (imagen) */
linkset[10]+='<img name="imgVideo_' + i + '" id="imgVideo_' + i + '" src="video/cooperativo.gif" hspace="0" vspace="0" border="0"/>'
linkset[10]+='</td></tr></table>'
i++;


var rutacnse = "la_cnse/";

////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

//MARGENES DEL MENU
var margenLeftMenuIE = 170//espacio entre el boton y el menu
var margenBottomMenuIE = 116//espacio entre el el borde superrior de la celda y el menu
var margenLeftMenuMozzila = 160//espacio entre el boton y el menu
var margenBottomMenuMozzila = 117 // espacio entre el el borde superrior de la celda y el menu

//var diferenciaFilas = 101 //diferencia de altura entre las filas de la tabla (2 filas)
						 //o entre columnas, segun el diseño

function showmenu(idImg, which){
/*
	idImg : ID de la imagen correspondiente al menu
	which : el menu que se muestra : linkset[num_menu]
*/
	document.getElementById("popmenu").style.left= "0px"
	document.getElementById("popmenu").style.top= "0px"

	if (!document.all && !document.getElementById && !document.layers)
		return

	var left_bodycuerpo =(ie4)?document.getElementById("cuerpo").offsetLeft: 0
	var left_divtodo = document.getElementById("centrar_todo").offsetLeft
	var left_divcontendor = document.getElementById("contenedor").offsetLeft
	var left_divmenu = document.getElementById("contenedor_central").offsetLeft
	var left_divmenu2 = document.getElementById("menu_cabecera").offsetLeft
	var left_tablamenu = document.getElementById("tabla_navigation").offsetLeft
	var left_td = document.getElementById("td_"+idImg).offsetLeft
	
	//var left_img = document.getElementById(idImg).offsetLeft

	var top_bodycuerpo =(ie4)?document.getElementById("cuerpo").offsetTop: 0
	var top_divtodo = document.getElementById("centrar_todo").offsetTop
	var top_divcontendor = document.getElementById("contenedor").offsetTop
	var top_divmenu = document.getElementById("contenedor_central").offsetTop
	var top_divmenu2 = document.getElementById("menu_cabecera").offsetTop
	var top_tablamenu = document.getElementById("tabla_navigation").ooffsetTop
	var top_td = document.getElementById("td_"+idImg).offsetTop
	
	//var top_img = document.getElementById(idImg).offsetTop

//alert(left_bodycuerpo + "\n" + left_divtodo+ "\n" + left_divcontendor+ "\n"+ left_divmenu+ "\n" + left_divmenu2+ "\n" + left_tablamenu + "\n"+ left_td);
	var coordX = 0;
	var coordY = 0;

	if(ie4){
		coordX = left_divtodo + left_td + margenLeftMenuIE;
		coordY = top_divtodo + top_td + margenBottomMenuIE;
	}
	else{
		coordX = left_tablamenu + left_td + margenLeftMenuMozzila;
		coordY = top_td + margenBottomMenuMozzila;
	}

	clearhidemenu()
	
	menuobj=document.getElementById("popmenu");
	
	//which = crearTablaMenu(which);
	
	if (ie4||ns6)
	{
		menuobj.innerHTML=which
	}
	else{
		//menu1
		menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
		menuobj.document.close()
	}

	var x=(document.defaultView && document.defaultView.getComputedStyle) ?
        document.defaultView.getComputedStyle(menuobj,'').getPropertyValue("top") :
        menuobj.currentStyle ? menuobj.currentStyle.top : "";
 	var y=(document.defaultView && document.defaultView.getComputedStyle) ?
        document.defaultView.getComputedStyle(menuobj,'').getPropertyValue("left") :
        menuobj.currentStyle ? menuobj.currentStyle.left : "";
 	x= parseInt(x);
 	y= parseInt(y);

	menuobj.style.left= (coordX + x) + "px";
	menuobj.style.top= (coordY + y) + "px";
	
	menuobj.style.visibility="visible"

	return false
}//function showmenu

function contains_ns6(a, b) {
	//Determines if 1 element in contained in another- by Brainjar.com
	while (b.parentNode)
		if ((b = b.parentNode) == a)
			return true;
	return false;
}
	
function hidemenu(){
	if (window.menuobj)
	{
		menuobj.style.visibility=(ie4||ns6)? "hidden" : "hide"
		MM_swapImgRestore(); //OPCIONAL. script sustitucion de imagenes.
	}
}

function dynamichide(e){
	if (ie4 && (!menuobj.contains(e.toElement)))
		hidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		hidemenu()
}

function delayhidemenu(){
	if (ie4||ns6||ns4)
		delayhide=setTimeout("hidemenu()",0)
}

function clearhidemenu(){
	if (window.delayhide)
		clearTimeout(delayhide)
}

function highlightmenu(e,state){
	if (document.all)
		source_el=event.srcElement
	else if (document.getElementById)
		source_el=e.target
	if (source_el.className=="menuitems"){
		source_el.id=(state=="on")? "mouseoverstyle" : ""
	}
	else{
		while(source_el.id!="popmenu"){
			source_el=document.getElementById? source_el.parentNode : source_el.parentElement
			if (source_el.className=="menuitems"){
				source_el.id=(state=="on")? "mouseoverstyle" : ""
			}
		}
	}
}

function crearTablaMenu(links){
	var cad;
	cad = '<table class="popup_tabla_menu" border="0" cellpadding="0" cellspacing="0">';
	cad += '<tr>';
	cad += '<td  class="popup_celda_menu"></td>';
	cad += '<td id="popup_celda_sup" class="popup_celda_menu"></td>';
	cad += '<td></td>';
	cad += '</tr>';
	cad += '<tr>';
	cad += '<td class="popup_celda_menu"></td>';
	cad += '<td class="popup_celda_menu">';
	cad += links;
	cad += '</td>';
	cad += '<td id="popup_celda_dch_centro" class="popup_celda_menu"></td>';
	cad += '</tr>'
	cad += '<tr>';
	cad += ' <td class="popup_celda_menu"></td>';
	cad += '<td id="popup_celda_inf" class="popup_celda_menu"></td>'
	cad += '<td></td>'
	cad += '</tr>';
	cad += '</table>';

return cad;
}


if (ie4||ns6)
	document.onclick=hidemenu


