/*
*******************************************************
		Desarrollado por Novays.
		Todos los derechos reservados.
*******************************************************
*/

function menuSuperior(texto,url){

	if(texto == ''){		
		document.getElementById('msu_texto').innerHTML = ''
	}else {		
		document.getElementById('msu_texto').innerHTML = texto		
		if(url !== '')
		document.location = url
	}
	

}

var botonID

function mostrarMenuMas(menuMostrar,botonId){
	botonID = botonId
	var menu = Array()
 
	servicios = new Array()
		servicios.push (new Array('Diseño web','?pag=diseno-web&location=mx'))
	hospedajeWeb = new Array ()
		hospedajeWeb.push (new Array('Introducción','?pag=hospedaje&location=mx'))
		hospedajeWeb.push (new Array('Planes de hospedaje','?pag=hospedaje-planes&location=mx'))
		hospedajeWeb.push (new Array('Registro de dominios','?pag=dominios&location=mx'))
		hospedajeWeb.push (new Array('Contratar','?pag=hospedaje-contratar&location=mx'))
		hospedajeWeb.push (new Array('Ayuda','?pag=hospedaje-ayuda&location=mx'))
	nosotros = new Array()
		nosotros.push(new Array('Novays','?pag=nosotros&location=mx'))
		nosotros.push(new Array('Equipo','?pag=hospedaje&location=mx'))
	DisenoWeb = new Array()
		DisenoWeb.push(new Array('Introducción','?pag=diseno-web&location=mx'))
		DisenoWeb.push(new Array('Paquetes de diseño web','?pag=diseno-web-paquetes&location=mx'))
	programacion = new Array()
		programacion.push(new Array('Introducción','?pag=programacion&location=mx'))
		programacion.push(new Array('Paquetes de programación','?pag=programacion-paquetes&location=mx'))	
		
	
	
	switch (menuMostrar) {
		
		case 'servicios':
			menus = servicios
		break
		
		case 'hospedaje':
			menus = hospedajeWeb
		break

		case 'nosotros':
			menus = nosotros
		break
		
		case 'DiseñoWeb':
			menus = DisenoWeb
		break
		
		case 'programacion':
			menus = programacion
		break	
	}
	
		try {
				clearTimeout (ocultarT)				
			} catch (error1) {}
			
		document.getElementById(botonID).style.backgroundPosition = '0 -25px'
			
		
			
			document.getElementById('mas').style.display = 'block'	
			nodo = document.getElementById('mas')
			if(nodo.hasChildNodes()){
			nodo.removeChild(nodo.firstChild)
			}
			
			lista = document.createElement('ul')
			nodo.appendChild(lista)
			nodoLista = nodo.firstChild
			
			for (var i = 0 ; i < menus.length ; i++){
			
				menu = menus [i]
				elemento = document.createElement('li')
				nodoLista.appendChild(elemento)
				
				nodo = nodoLista.lastChild
				enlace = document.createElement('a')
				enlace.innerHTML = menu[0]
				enlace.setAttribute('href',menu[1])
				nodo.appendChild(enlace)		
			
			}			

			
	
	
	
}


function ocultarMenuMas(ocultar) {
	if(!ocultar){
		try {
			clearTimeout (ocultarT)					
			} catch (error1) {}
			document.getElementById(botonID).style.backgroundPosition = '0 -25px'	
	}
	
	else {
		ocultarT = setTimeout('document.getElementById("mas").style.display = "none"',500)
		document.getElementById(botonID).style.backgroundPosition = '0 0'
		}
	

}
