
////////////////////Please leave this notice/////////////////////
//	Dynamic JS Menu 1.0					//
//	By Pat Libby (Libbypa@maine.rr.com)			//
//	http://dragonsbane1.topcities.com			//
//	It works only with IE5.0(++) and Netscape6.0(++)	//
//	Free to use!						//
////////////////////Last modified 01-31-2003/////////////////////
// Traducido al español y comentado por El Codigo		//
// http://www.elcodigo.net													//
/////////////////////////////////////////////////////////////////

//	Colores del menu
var tdColor="#365C83";		// color del texto de los elementos del menu
var tdBgColor="#f2f2f2";	// color de fondo de los elementos del menu
var hlColor="#f2f2f2";		// color texto cuando puntero encima
var hlBgColor="#3F6B97";	// color fondo cuando punetor encima
//	Los mismos valores deben estar en menuNav.css

/////////////////////////
// Definicion del menu //
/////////////////////////

// Ejeplo de armado de menu
// x - DESCRIPCION DE LA OPCION DEL MENU 
//td_X = "DESCRIPCION DE LA OPCION DEL MENU &nbsp;               "
//url_X = "URL de DESCRIPCION DE LA OPCION DEL MENU"
//	// SUBCATEGORIA DE LA OPCION DEL MENU
//	td_X_1 = "DESCRIPCION DE LA SUBCATEGORIA DE LA OPCION DEL MENU"
//	url_X_1 = "URL de la SUBCATEGORIA DE LA OPCION DEL MENU"
//		//SUBCATEGORIA DE LA SUBCATEGORIA DE LA OPCION DEL MENU
//		td_X_1_1 = "DESCRIPCIOIN DE LA SUBCATEGORIA DE LA SUBCATEGORIA DE LA OPCION DEL MENU"
//		url_X_1_1 = "URL de la SUBCATEGORIA DE LA SUBCATEGORIA DE LA OPCION DEL MENU"


// 1 - Institucional
td_1 = "Institucional &nbsp &nbsp                 "
url_1 = "Index.php"
	td_1_1 = "Historia, Cometidos y Funciones"
	url_1_1 = "HistoriaCometidosYFunciones.html"

	td_1_2 = "Organigrama"
	url_1_2 = "EstructuraInstitucionalSF.html"

	td_1_3 = "Guía Telefónica Dirección Nacional de Aduanas"
	url_1_3 = "GuiaTelefonica.php?Texto=&Nombre1=Seleccione un Valor"

	td_1_4 = "Mapa Aduanero"
	url_1_4 = "MapaAduanero.html"

//	Eliminado hasta nuevo aviso: 30/4/2007
//	td_1_5 = "Capacitación"
//	url_1_5 = "Capacitacion.html"
//
//	Eliminado hasta nuevo aviso: 10/5/2007
//	td_1_5 = "Relaciones Institucionales"
//	url_1_5 = "RelacionesInstitucionales.html"
//
	td_1_5 = "R.I.L.O."
	url_1_5 = "Rilo.html"


// 2 - Resoluciones Aduaneras
td_2 = "Resoluciones Aduaneras &nbsp   &nbsp            "
url_2 = "Index.php"
	td_2_1 = "Comunicados Sectoriales"
	url_2_1 = ""
		td_2_1_1 = "2003"
		url_2_1_1 = "ComunicadosSectoriales.php?Ejercicio=2003&PublicaEnInternet=S"
		td_2_1_2 = "2004"
		url_2_1_2 = "ComunicadosSectoriales.php?Ejercicio=2004&PublicaEnInternet=S"
		td_2_1_3 = "2005"
		url_2_1_3 = "ComunicadosSectoriales.php?Ejercicio=2005&PublicaEnInternet=S"
		td_2_1_4 = "2006"
		url_2_1_4 = "ComunicadosSectoriales.php?Ejercicio=2006&PublicaEnInternet=S"
		td_2_1_5 = "2007"
		url_2_1_5 = "ComunicadosSectoriales.php?Ejercicio=2007&PublicaEnInternet=S"
		td_2_1_6 = "2008"
		url_2_1_6 = "ComunicadosSectoriales.php?Ejercicio=2008&PublicaEnInternet=S"
		td_2_1_7 = "2009"
		url_2_1_7 = "ComunicadosSectoriales.php?Ejercicio=2009&PublicaEnInternet=S"
		td_2_1_8 = "2010"
		url_2_1_8 = "ComunicadosSectoriales.php?Ejercicio=2010&PublicaEnInternet=S"
	td_2_2 = "Ordenes del Día"
	url_2_2 = ""
		td_2_2_1 = "2000"
		url_2_2_1 = "OrdenesDelDia.php?Ejercicio=2000"
		td_2_2_2 = "2001"
		url_2_2_2 = "OrdenesDelDia.php?Ejercicio=2001"
		td_2_2_3 = "2002"
		url_2_2_3 = "OrdenesDelDia.php?Ejercicio=2002"
		td_2_2_4 = "2003"
		url_2_2_4 = "OrdenesDelDia.php?Ejercicio=2003"
		td_2_2_5 = "2004"
		url_2_2_5 = "OrdenesDelDia.php?Ejercicio=2004"
		td_2_2_6 = "2005"
		url_2_2_6 = "OrdenesDelDia.php?Ejercicio=2005"
		td_2_2_7 = "2006"
		url_2_2_7 = "OrdenesDelDia.php?Ejercicio=2006"
		td_2_2_8 = "2007"
		url_2_2_8 = "OrdenesDelDia.php?Ejercicio=2007"
		td_2_2_9 = "2008"
		url_2_2_9 = "OrdenesDelDia.php?Ejercicio=2008"
		td_2_2_10 = "2009"
		url_2_2_10 = "OrdenesDelDia.php?Ejercicio=2009"
		td_2_2_11 = "2010"
		url_2_2_11 = "OrdenesDelDia.php?Ejercicio=2010"
// 3 - Normativa Aduanera
td_3 = "Normativa Aduanera &nbsp  &nbsp            "
url_3 = "Index.php"
	td_3_1 = "Normas Básicas"
	url_3_1 = "NormativaAduanera.php?Titulo=Normas Basicas&Tipo=NB"

	td_3_2 = "Normas Tributarias"
	url_3_2 = "NormativaAduanera.php?Titulo=Normas Tributarias&Tipo=NT"

	td_3_3 = "Régimenes Especiales"
	url_3_3 = "NormativaAduanera.php?Titulo=Regimenes Especiales&Tipo=RE"

	td_3_4 = "Normas MERCOSUR"
	url_3_4 = "NormativaAduanera.php?Titulo=Normas MERCOSUR&Tipo=ME"

//	td_3_5 = "Franquicias Aduaneras"
//	url_3_5 = "NormativaAduanera.php?Titulo=Franquicias Aduaneras&Tipo=FA"



// 4 - Gestión Aduanera
td_4 = "Gestión Aduanera &nbsp   &nbsp           "
url_4 = "Index.php"
	td_4_1 = "Multas y Reliquidaciones"
	url_4_1 = "Multas.php"

	td_4_2 = "Incautaciones"
	url_4_2 = "Incautaciones.php"

	td_4_3 = "Acuerdos y Convenios"
	url_4_3 = "Convenios.php"

//	td_4_4 = "Recaudaciones"
//	url_4_4 = "Recaudaciones.php"


// 5 - RR.PP.
td_5 = "Relaciones Públicas  &nbsp           "
url_5 = "DIFUSION.html"
	td_5_1 = "Difusión"
	url_5_1 = "DIFUSION.html"
//		td_5_1_1 = "Archivo de Noticias"
//		url_5_1_1 = "RRPP_Archivo.php"
// Eliminado segun pedido de mail 11/7/2007
//		td_5_1_2 = "Comunicados de Prensa"
//		url_5_1_2 = "RRPP_Prensa.php"

	td_5_2 = "Estadísticas"
	url_5_2 = ""
		td_5_2_1 = "Información a Usuarios"
		url_5_2_1 = "RRPP_Estadisticas.php"
		td_5_2_2 = "Difusión y Prensa"
		url_5_2_2 = "DIFUSION_Estadistica.html"

	td_5_3 = "Opinión de Usuarios"
	url_5_3 = "mailto:info@aduanas.gub.uy"

	td_5_4 = "Contacto con RRPP"
	url_5_4 = "mailto:rrpp@aduanas.gub.uy"

	td_5_5 = "Archivo de Noticias"
	url_5_5 = ""
		td_5_5_1 = "2006"
		url_5_5_1 = "RRPP_Archivo.php?Ejercicio=2006"
		td_5_5_2 = "2007"
		url_5_5_2 = "RRPP_Archivo.php?Ejercicio=2007"
		td_5_5_3 = "2008"
		url_5_5_3 = "RRPP_Archivo.php?Ejercicio=2008"
		td_5_5_4 = "2009"
		url_5_5_4 = "RRPP_Archivo.php?Ejercicio=2009"
		td_5_5_5 = "2010"
		url_5_5_5 = "RRPP_Archivo.php?Ejercicio=2010"
// 6 - Informacion a Usuarios del sitio
td_6 = "Información a Usuarios &nbsp         "
url_6 = "PreguntasFrecuentes.php?Pregunta="
	td_6_1 = "Encomiendas"
	url_6_1 = "PreguntasFrecuentes.php?Pregunta=EN"

	td_6_2 = "Turistas y Viajeros"
	url_6_2 = "PreguntasFrecuentes.php?Pregunta=TU"

	td_6_3 = "Vehículos"
	url_6_3 = "PreguntasFrecuentes.php?Pregunta=VE"
	
	td_6_4 = "Procedimientos DUA"
	url_6_4 = ""
		td_6_4_1 = "Importación"
		url_6_4_1 = "FlujogramaImportaciones.html"
		td_6_4_2 = "Exportación"
		url_6_4_2 = "FlujogramaExportaciones.html"
		td_6_4_3 = "Tránsito"
		url_6_4_3 = "FlujogramaTransitos.html"

	td_6_5 = "Mudanza Uruguayos"
	url_6_5 = "PreguntasFrecuentes.php?Pregunta=MU"
	
// 7 - Enlaces de Interes
td_7 = "Enlaces de Interes &nbsp         "
url_7 = "Index.php"
	td_7_1 = "Estatales"
	url_7_1 = "EnlacesDeInteres.php?Tipo=ESTATALES"

	td_7_2 = "Otros"
	url_7_2 = "EnlacesDeInteres.php?Tipo=OTROS"

	td_7_3 = "Aduanas del Mundo"
	url_7_3 = "AduanasDelMundo.php"


///////NO SON NECESARIOS CAMBIOS A PARTIR DE AQUI/////////////////
var md=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
	clearTimeout(ti);
	td.style.backgroundColor=hlBgColor;
	td.style.color=hlColor;
	var i;
	var sT="";
	var tda=new Array();
	tda=td.id.split("_");
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		for(i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			if(tdo[i]!=tda[i]){
				document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sT).style.color=tdColor;
				if(document.getElementById("tbl"+sT)!=null)
					document.getElementById("tbl"+sT).style.visibility="hidden";
			}
		}			
	}
	oTd=td;
	sT="tbl";
	for(i=1;i<tda.length;i++)
		sT+="_"+tda[i];
	if(document.getElementById(sT)!=null)
		document.getElementById(sT).style.visibility="visible";

}

function clearMenu(){
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		var sT="";
		for(var i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sT).style.color=tdColor;
			if(document.getElementById("tbl"+sT)!=null)
				document.getElementById("tbl"+sT).style.visibility="hidden";
		}
		oTd=null;			
	}
}

function runMenu(strURL){
	location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
	tA=st.split("_");
	if(tA.length>2){
		tA=tA.slice(0,-1);
		tt=tA.join("_");
		return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px\">";
	}
	return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight-2)+"px;left:"+
		  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+5)+"px\">";
}


