function nuevoAjax(){ 
	var xmlhttp=false; 
	try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); }
	catch(e){ 
		try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } 
		catch(E) { xmlhttp=false; }
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); }

	return xmlhttp;
}

function montarMenu(){
	var ap=nuevoAjax();
	ap.open("GET", "ajax/menu.html", true);
	ap.onreadystatechange=function(){
		if (ap.readyState==4){
			document.getElementById('menubox').innerHTML = ap.responseText;
		}
	}
	ap.send(null);
}

function montarMenuCat(){
	var ap=nuevoAjax();
	ap.open("GET", "../ajax/menuCat.html", true);
	ap.onreadystatechange=function(){
		if (ap.readyState==4){
			document.getElementById('menubox').innerHTML = ap.responseText;
		}
	}
	ap.send(null);
}

function montarMenuEn(){
	var ap=nuevoAjax();
	ap.open("GET", "../ajax/menuEn.html", true);
	ap.onreadystatechange=function(){
		if (ap.readyState==4){
			document.getElementById('menubox').innerHTML = ap.responseText;
		}
	}
	ap.send(null);
}

function overMenu(cual){
	cual.style.backgroundColor = "#333";
	cual.style.color = "#FFF";
}

function outMenu(cual){
	cual.style.backgroundColor = "#ccc";
	cual.style.color = "#000";
}

function overMenuCliente(cual){
	cual.style.backgroundColor = "#333";
	cual.style.color = "#FFF";
}

function outMenuCliente(cual){
	cual.style.backgroundColor = "#666";
	cual.style.color = "#FFF";
}


function abrirSubMenu(cual){
	cerrarTodosSubMenus();
	document.getElementById(cual).style.display = "block";
}

function cerrarSubMenu(cual){
	document.getElementById(cual).style.display = "none";
}


function cerrarTodosSubMenus(){
	document.getElementById('firma').style.display = "none";
	document.getElementById('diferencia').style.display = "none";
	document.getElementById('negocio').style.display = "none";
	document.getElementById('clientes').style.display = "none";
}

