var anMenu = 150 
var totalMen = 10 
var imaflecha = 'url(flechitaazul.gif)' //<-- ruta de la imagen de flecha
function tunMen(tex,enl,dest,subOp,an)
{ this.tex = tex; this.enl = enl; this.dest = dest; this.subOp = subOp; this.an = an; }

/* Configurar las opciones aquí  opcion (nombre, http://www.forosdelweb.com/, null (_blank), numero de subopciones, ancho)*/
Op_0 = new tunMen('Inicio',"http://www.colegiodeeconomistaslapaz-bolivia.com/ingreso.php",null,0,100)

Op_1 = new tunMen('Historia',null,null,3,100)
	Op_1_0 = new tunMen('Historia Economica',"http://www.colegiodeeconomistaslapaz-bolivia.com/historia.php",null,0,100)
	Op_1_1 = new tunMen('Galeria',"http://www.colegiodeeconomistaslapaz-bolivia.com/galeria.php",null,0,100)
	Op_1_2 = new tunMen('Nóbel',"http://www.colegiodeeconomistaslapaz-bolivia.com/nobel.php",null,0,100)

Op_2 = new tunMen('Noticias y Eventos',null,null,2,100)
	Op_2_0 = new tunMen('Noticias',"http://www.colegiodeeconomistaslapaz-bolivia.com/noticias.php",null,0,150)
	Op_2_1 = new tunMen('Eventos',"http://www.colegiodeeconomistaslapaz-bolivia.com/construccion.php",null,0)

Op_3 = new tunMen('Estatutos Reglamentos y Normas',null,null,3,120)
	Op_3_0 = new tunMen('Estatutos',"http://www.colegiodeeconomistaslapaz-bolivia.com/estatutos.php",null,0,100)
	Op_3_1 = new tunMen('Reglamentos',"http://www.colegiodeeconomistaslapaz-bolivia.com/reglamentos.php",null,0,100)
	Op_3_2 = new tunMen(' Normas',"http://www.colegiodeeconomistaslapaz-bolivia.com/normas.php",null,0,100)

Op_4 = new tunMen('Asuntos Judiciales',null,null,2,150)
	Op_4_0 = new tunMen('Juzgados',"http://www.colegiodeeconomistaslapaz-bolivia.com/juzgado.php",null,0,100)
	Op_4_1 = new tunMen('Tribunal de Honor',"http://www.colegiodeeconomistaslapaz-bolivia.com/tribunal.php",null,0,100)

Op_5 = new tunMen('Convenios',null,null,4,150)
	Op_5_0 = new tunMen('Universidades',"http://www.colegiodeeconomistaslapaz-bolivia.com/universidad.php",null,0,100)
	Op_5_1 = new tunMen('Cámaras',"http://www.colegiodeeconomistaslapaz-bolivia.com/camaras.php",null,0,100)
	Op_5_2 = new tunMen('Institutos',"http://www.colegiodeeconomistaslapaz-bolivia.com/construccion.php",null,0,100)
	Op_5_3 = new tunMen('Organizaciones Nacionales e Internacionales',"http://www.colegiodeeconomistaslapaz-bolivia.com/orgnalinte.php",null,0,100)


Op_6 = new tunMen('Análisis e Informe Económicos',null,null,4,150)
	Op_6_0 = new tunMen('Análisis ',"http://www.colegiodeeconomistaslapaz-bolivia.com/analisis.php",null,0,100)
	Op_6_1 = new tunMen('Informe Económico',"http://www.colegiodeeconomistaslapaz-bolivia.com/construccion.php",null,0,100)
	Op_6_2 = new tunMen('Informe internacional',"http://www.colegiodeeconomistaslapaz-bolivia.com/construccion.php",null,0,100)
	Op_6_3 = new tunMen('Informe en General',"http://www.colegiodeeconomistaslapaz-bolivia.com/construccion.php",null,0,100)

Op_7 = new tunMen('Requisitos de Inscripcion',"http://www.colegiodeeconomistaslapaz-bolivia.com/inscripcion.php",null,0,150)

Op_8 = new tunMen('Reseña Historica',"http://www.colegiodeeconomistaslapaz-bolivia.com/resenahisto.php",null,0,150)

Op_9 = new tunMen('Boletínes',null,null,3,150)
	Op_9_0 = new tunMen('Boletín Informativo',"http://www.colegiodeeconomistaslapaz-bolivia.com/boletin_inf.php",null,0,150)
	Op_9_1 = new tunMen('Boletín Económico',"http://www.colegiodeeconomistaslapaz-bolivia.com/boletineco.php",null,0,150)
	Op_9_2 = new tunMen('Memorias',"http://www.colegiodeeconomistaslapaz-bolivia.com/construccion.php",null,0,150)
/* Fin de configuración.   No tocar a partir de aquí */
var tunIex=navigator.appName=="Microsoft Internet Explorer"?true:false;
if(tunIex && navigator.userAgent.indexOf('Opera')>=0){tunIex = false}
var Opera = navigator.userAgent.indexOf('Opera')>=0 ? true : false;
var manita = tunIex ? 'hand' : 'pointer'
var subOps = new Array()
function construye(){
cajaMenu = document.createElement('ul')
cajaMenu.style.width = anMenu + "px"
cajaMenu.style.zIndex = 1
cajaMenu.style.marginLeft = 0
cajaMenu.style.paddingLeft = 0
document.getElementById('e').appendChild(cajaMenu)
for(m=0; m < totalMen; m++){
	opchon = eval('Op_'+m)
	boton = document.createElement('li')
	boton.style.marginLeft = 0
	boton.style.paddingLeft = 0
	boton.style.listStyleType = 'none'
	boton.style.position = 'relative'
	boton.style.zIndex = (100 - m)
	boton.className = 'botones'
	boton.style.cursor = manita
	boton.id = 'op_' + m
	if(opchon.enl){
		lin = document.createElement('a')
		lin.className = 'enlacesmenu'
		lin.href = opchon.enl
		if(opchon.dest){	lin.target = opchon.dest	}
	boton.appendChild(lin)
	lin.appendChild(document.createTextNode(opchon.tex))
	}
	else{	boton.appendChild(document.createTextNode(opchon.tex))
	}
	boton.onmouseover = function(){		mostrar(this)		}
	boton.onmouseout=function(){	ocultar(this)		}
	cajaMenu.appendChild(boton)
	if(opchon.subOp > 0 ){
		espan = document.createElement('span')
		espan.style.position = 'absolute'
		espan.style.right = 0
		boton.style.backgroundImage = imaflecha
		boton.style.backgroundPosition = 'center right'
		boton.style.backgroundRepeat = 'no-repeat'
		espan.className = 'espan'
		boton.appendChild(espan)
		subOps[subOps.length] = boton.id.replace(/o/,"O")
		}
	}
if(subOps.length >0){subMes()}
}
function subMes(){
lar = subOps.length
for(t=0;t<subOps.length;t++){
	opc =eval(subOps[t])
	for(v=0;v<opc.subOp;v++){
		if(eval(subOps[t] + "_" + v + ".subOp") >0){
			subOps[subOps.length] = subOps[t] + "_" + v
			}
		}
	}
construyeSub()
}
function construyeSub(){
for(y=0; y<subOps.length;y++){
opchon = eval(subOps[y])
capa = document.createElement('ul')
capa.className = 'subMe'
capa.style.width = opchon.an + "px"
capa.style.visibility = 'hidden'
capa.style.position = 'absolute'
capa.style.marginLeft = 0
capa.style.paddingLeft = 0
document.getElementById(subOps[y].toLowerCase()).firstChild.nextSibling.appendChild(capa)
	for(s=0;s < opchon.subOp; s++){
		sopchon = eval(subOps[y] + "_" + s)
		opc = document.createElement('li')
		opc.style.marginLeft = 0
		opc.style.paddingLeft = 0
		opc.style.listStyleType = 'none'
		opc.className = 'botones'
		opc.id = subOps[y].toLowerCase() + "_" + s
		if(sopchon.enl){
			lin = document.createElement('a')
			lin.className = 'enlacesmenu'
			lin.href = sopchon.enl
			if(sopchon.dest){
				lin.target = sopchon.dest
			}
		opc.appendChild(lin)
		lin.appendChild(document.createTextNode(sopchon.tex))
		}
		else{
			opc.appendChild(document.createTextNode(sopchon.tex))
		}
		capa.appendChild(opc)
		opc.style.cursor = manita
		opc.onmouseover = function(){	mostrar(this)	}
		opc.onmouseout=function(){	ocultar(this)	}
		if(sopchon.subOp > 0 ){
			espan = document.createElement('span')
			espan.style.position = 'absolute'
			espan.style.right = 0
			opc.style.backgroundImage = imaflecha
			opc.style.backgroundPosition = 'center right'
			opc.style.backgroundRepeat = 'no-repeat'
			espan.className = 'espan'
			opc.appendChild(espan)
			}
		}
	}
}
function mostrar(cual){
if(Opera || (document.styleSheets.length > 0 && !document.styleSheets[0].disabled)){
	if(tunIex){cual.className = 'botonesHover'}
	if(cual.childNodes.length > 1){
		cual.firstChild.nextSibling.firstChild.style.visibility = 'visible'
		}
	}
}
function ocultar(cual){
	if(Opera || (document.styleSheets.length > 0 && !document.styleSheets[0].disabled)){
	if(tunIex){cual.className = 'botones'}
		if(cual.childNodes.length > 1){
		cual.firstChild.nextSibling.firstChild.style.visibility = 'hidden'
		}
	}
}
function enlace(cual){
enla = eval('O' + cual.substr(1)).enl
targ = eval('O' + cual.substr(1)).dest
if(targ && targ.toLowerCase() == '_blank'){
	window.open(enla,'','')
	}
else{	location.href = enla	}
}
onload = construye