
/* Initializes Dropdown Nav Buckets */
var dnavs = ["navSolutions","navProducts","navServices","navPartners"];


/*

Mozilla/Netscape browsers don't adjust the layer position 
fast enough before showing the dropdown nav layer, causing
a weird flash of the navigation dropdown at the left
of the screen.  This script positions the dropdowns onload
to avoid this problem.

*/

function initializeLayerPositions()

	{
		initRollovers();
		for (var i = 0; i < dnavs.length; i++) 
			{
				var layerName = dnavs[i];
				if (document.getElementById(layerName))
					{ document.getElementById(layerName).style.left = ((getAnchorPosition(layerName+'Link').x)-1) + 'px'; }
			}
	}



/* Defines arrays for the dropdown menus. */ 

var dnavSolutions = 
				[
					["Overview", "/productos/productos.htm"],
					["AESmartPhone", "/productos/aesmartphone/aesp.htm"],
					["Mouse Biometrico", "/productos/aefingerlock/idmouse.htm"],
					["AE PCLOCK", "/productos/aefingerlock/aepclock.htm"],
					["BioFlash High Security", "/productos/aebioalmacena/bioflash_hs.htm"],
					["BioFlash Hot Plug&Play", "/productos/aebioalmacena/bioflash_pp.htm"],
					["Bio Disco Duro Externo", "/productos/aebioalmacena/bio_dd.htm"],
					["Bio Centinela", "/productos/aedoorlock/bio_centinela.htm"],	
					["Bio Centinela Plus", "/productos/aedoorlock/bio_centinelaplus.htm"],
					["TeleSafe", "/productos/aetelesafe/telesafe.htm"],
					["CellSafe", "/productos/aetelesafe/cellsafe.htm"],
					["CellSafeSmart", "/productos/aetelesafe/cellsafesmart.htm"],
					["CellBlock", "/productos/aecontraspy/cellblock.htm"]
				];
				
var dnavProducts = 
				[
					["Overview", "/servicios/servicios.htm"],
					["Contra Espionaje", "/servicios/prevencion.htm"],
					["Tecnologia de Informacion", "/servicios/consultoria.htm"]					
				];
				
				
var dnavServices = 
				[
					["Overview", "/soluciones/soluciones.htm"],
					["Marketing & Estudios de Mercado", "/soluciones/marketing.htm"],
					["Seguridad de Datos", "/soluciones/segdatos.htm"],
					["Seguridad de Accesos", "/soluciones/segaccesos.htm"],
					["Seguridad en Telecomunicaciones", "/soluciones/segtelecom.htm"],
					["Asesoria y Consultoria", "/soluciones/asesoria.htm"]
				];
	
var dnavPartners = 
				[
					["Overview", "/empresa/empresa.htm"],
					["Mision y Valores", "/empresa/mision.htm"],
					["Clientes", "/empresa/clientes.htm"],
					["Alianzas Estrategicas", "/empresa/alianzas.htm"],
					["Partners", "/empresa/partners.htm"],
					["AE-X-Press", "/empresa/aexpress/aexpress.htm"],
					["Contacto", "/empresa/contacto.htm"]					
				];			
			
/* Writes out the dropdown nav layers */			
				
function writeNav(location){

	//alert(location);		
	
	if(document.getElementById)
		{
		for (var i = 0; i < dnavs.length; i++) 
			{
				var layerName = 'd'+dnavs[i];		
				document.write("<div id=\"" + dnavs[i] +"\" class=\"dropdownNav\"  onMouseOver=\"stopTime()\" onMouseOut=\"startTime();\"><ul>");		
				for (var f = 0; f < eval(layerName + '.length'); f++) 
					{
						var str = location;
						var lnk = eval(layerName + "[f][1]");
						var pos=str.indexOf(lnk);
						//alert(pos);
						if (pos>=0)	
							{ var cls = " class=\"active\" ";}
						else
							{ var cls = ""; }
						document.write("<li><a href=\"" + eval(layerName + "[f][1]") + "\"" + cls + ">" + eval(layerName + "[f][0]") + "</a></li>");
					}
					document.write("</ul></div>");
			}
		}
}