var menu_empresa  = new Array(
	new Array("Empresa","empresa/index.php",""),
	new Array("Equipo Directivo","empresa/equipo.php","")
);

var menu_productos = new Array(
	new Array("Productos","productos/index.php",""),
	new Array("GESTIÓN EMPRESARIAL","productos/gempresarial.php",""),
	new Array("ERP","productos/erp.php","subnivel"),
	new Array("CRM","productos/crm.php","subnivel"),
	new Array("HARDWARE","construccion/index.html",""),
	new Array("SISTEMAS","construccion/index.html",""),
	new Array("COMUNICACIONES","construccion/index.html",""),
	new Array("GESTION DE TIENDAS","construccion/index.html",""),
	new Array("E-COMMERCE","construccion/index.html",""),
	new Array("DESARROLLO","construccion/index.html","")
);

var menu_servicios = new Array(
	new Array("Servicios","construccion/index.html","")
/*	new Array("Aficionado Analógico","servicios/aficionado_analogico.php",""),
	new Array("Aficionado Digital","servicios/aficionado_digital.php",""),
	new Array("Profesional Analógico","servicios/profesional_analogico.php",""),
	new Array("Profesional Digital","servicios/profesional_digital.php",""),
	new Array("Almacen","servicios/almacen.php",""),
	new Array("Plantillas","servicios/plantillas/index.php",""),
	new Array("Bebes","servicios/plantillas/bebes/index.php","subnivel"),
	new Array("Bodas I","servicios/plantillas/bodas1/index.php","subnivel"),
	new Array("Bodas II","servicios/plantillas/bodas2/index.php","subnivel"),
	new Array("Bodas III","servicios/plantillas/bodas3/index.php","subnivel"),
	new Array("Bodas IV","servicios/plantillas/bodas4/index.php","subnivel"),
	new Array("Calendarios","servicios/plantillas/calendarios/index.php","subnivel"),
	new Array("Natalicios","servicios/plantillas/natalicios/index.php","subnivel"),
	new Array("Recodatorios (10x15)","servicios/plantillas/recordatorios1/index.php","subnivel"),
	new Array("Recodatorios (10x18)","servicios/plantillas/recordatorios2/index.php","subnivel")*/
);

var menu_referencias = new Array(
	new Array("Referencias","construccion/index.html","")
/*	new Array("OFERTA ESTRELLA","ofertas/oferta_estrella.php",""),
	new Array("OFERTAS JULIO 2005","ofertas/oferta_almacen.php",""),
	new Array("OFERTAS PRIMAVERA","ofertas/oferta_verano.php",""),
	new Array("OFERTA ORDER-IT","ofertas/oferta_orderit.php","")*/
);
/*var menu_plantillas = new Array(
	new Array("Plantillas","servicios/plantillas/index.php","")
);*/

/*var menu_reportajes = new Array(
	new Array("Reportajes","novedades/reportajes.php","")
);*/

var menu_descargas = new Array(
	new Array("Descargas","construccion/index.html","")
/*        new Array("Digital System","descargas/digsys.php",""),
        new Array("BEbook","descargas/BEbook.php",""),
        new Array("Manuales","descargas/manuales.php",""),
        new Array("Otros","descargas/otros.php","")*/
);

/*var menu_tarifas = new Array(
	new Array("Tarifas","tarifas/index.html",""),
	new Array("Aficionado Analógico","tarifas/aficionado_analogico.php",""),
	new Array("Aficionado Digital","tarifas/aficionado_digital.php",""),
	new Array("Profesional Analógico","tarifas/profesional_analogico.php",""),
	new Array("Profesional Digital","tarifas/profesional_digital.php",""),
	new Array("Almacen","tarifas/almacen.php","")
	
);*/




//menus inferiores
var menu_inicio = new Array(
	new Array("Inicio","","")
);
var menu_contactar = new Array(
	new Array("Contactar","contactar/index.php","")
);
var menu_mapa = new Array(
	new Array("Mapa del Sitio","mapa.php","")
);


var todos = new Array("Todos los menus",menu_empresa,menu_productos,menu_servicios,menu_referencias,menu_descargas,menu_contactar);
var menu = new Array("Menús superiores",menu_empresa,menu_productos,menu_servicios,menu_referencias,menu_descargas,menu_contactar);
var menu2 = new Array("Menús inferores",menu_inicio,menu_contactar,menu_mapa);



/**************************************************
 *			COMIENZA EL CÓDIGO, NO TOCAR!!!       *
 ***************************************************/

function escribe_cabecera(tipo){
	if(tipo=="grande"){
		datos="<table height='27'  border='0' cellpadding='2' cellspacing='1'><tr>\n";
		inicio=1;
		fin=menu.length-1;
		for(k=inicio;k<=fin;k++){		
			datos+="<td class='fazul' onmouseover=\"this.style.color='#35353e';this.style.backgroundColor='#FFFFFF';cambialink('link"+k+"','35353e')\" onmouseout=\"this.style.color='#FFFFFF';this.style.backgroundColor='#35353e';cambialink('link"+k+"','FFFFFF')\" onClick=\"window.location='"+url+menu[k][0][1]+"'\"><a class='menusup' id='link"+k+"'href='"+url+menu[k][0][1]+"' target='_self'>"+menu[k][0][0]+"</a></td>";
		}
		datos+="</tr>";
		datos+="</table>";
	}else{
		datos="<table height='27'  border='0' cellpadding='2' cellspacing='1'><tr><td>\n";
		datos+="<span class='menusup2' >\n";
		inicio=1;
		fin=menu2.length-1;
		for(k=inicio;k<=fin;k++){		
			datos+="[ <a class='menusup2' href='"+url+menu2[k][0][1]+"' target='_self'>"+menu2[k][0][0]+"</a> ] ";
		}
		datos+="</span></td></tr>";
		datos+="</table>";
	}
	return datos;

}

function cambialink(link2,color2){
	milink = document.getElementById(link2);
	milink.style.color='#'+color2;
}

function menulateral(pagina,milink,base){
	for(n=1;n<=todos.length-1;n++){
		mimenu=todos[n];
		for(k=0;k<=mimenu.length-1;k++){
			titulo=mimenu[k][1];
			if(titulo.lastIndexOf(pagina)!=-1){
				escribe_menulateral(n,milink,base);
				return
			}
		}
	}
}
function escribe_menulateral(n,milink,base){
	mimenu=todos[n];
	document.write("<table border='0' cellpadding='2' cellspacing='1'  width='98%' class='frojo' align='center'>\n");
	for(k=1;k<=mimenu.length-1;k++){
		if(mimenu[k][2]=="subnivel"){
			relleno="&nbsp;&nbsp;· ";
			clase="texton";
			txtlink="<a class='"+clase+"' href='"+base+mimenu[k][1]+"'>"+mimenu[k][0]+"</a>";
			document.write("<tr><td class='fblanco'><span class='"+clase+"'>"+relleno+txtlink+"</span></td></tr>");
		}else{
			//relleno="<img src='"+base+"images/item.gif' width='5' height='5' hspace='3' align='absmiddle'>";
			//clase="texton";
			document.write("<tr><td height='27' class='fazul' onmouseover=\"this.style.color='#35353e';this.style.backgroundColor='#FFFFFF';cambialink('linkl"+k+"','35353e')\" onmouseout=\"this.style.color='#FFFFFF';this.style.backgroundColor='#35353e';cambialink('linkl"+k+"','FFFFFF')\" onClick=\"window.location='"+base+mimenu[k][1]+"'\"><a class='menulat' id='linkl"+k+"'href='"+base+mimenu[k][1]+"' target='_self'>"+mimenu[k][0]+"</a></td></tr>");
		}
		/*if(mimenu[k][1]==milink){
			clase2="";
			txtlink=mimenu[k][0];
		}else{
			clase2="";
			txtlink="<a class='"+clase+"' href='"+base+mimenu[k][1]+"'>"+mimenu[k][0]+"</a>";
		}
		
		document.write("<tr> "+accion+" ><span class='menulat'>"+relleno+txtlink+"</span></td></tr>");
	*/
	}
	document.write("</table>");
}

