var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;


if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
	if (document.all) {isAll = 1; isDHTML = 1;}
	else {
		browserVersion = parseInt(navigator.appVersion);
		if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {
			isLayers = 1; isDHTML = 1;}
		}
	}
	function findDOM(objectID,withStyle) {
	if (withStyle == 1) {
		if (isID) { return (document.getElementById(objectID).style) ; }
		else {
			if (isAll) { return (document.all[objectID].style); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
	};}
}
	else {
		if (isID) { return (document.getElementById(objectID)) ; }
		else {
			if (isAll) { return (document.all[objectID]); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
}

	/* FUNCIÓN PARA MOSTRAR EL MENSAJE DE CARGA */
	function mostrar_mensaje(){
		var obj = findDOM( 'MensajeCargando', 0);
		if (obj)
			obj.style.display = "block";	

	}
	
	/* FUNCIÓN PARA MOSTRAR EL MENSAJE DE CARGA */
	function mostrarMensaje(){
		var obj = findDOM( 'MensajeCargandoDisponibilidad', 0);
		if (obj)
			obj.style.display = "block";	
			
		var obj2 = findDOM( 'contenido', 0);
		if (obj2)
			obj2.style.display = "none";	
			
	}	
	
	
/******************************************/
/* NUEVAS FUNCIONES PARA EL MENÚ SUPERIOR */
/******************************************/
function marcar_menu(identificador){
	var idIzq 	 = findDOM('mizq_' + identificador);
	var idDcha 	 = findDOM('mdcha_' + identificador);
	var idOpcion = findDOM('mopcion_' + identificador);
	if (idIzq && idDcha && idOpcion){
		idIzq.style.backgroundPosition = "0 80px";
		idDcha.style.backgroundPosition = "0 80px";
		idOpcion.style.backgroundPosition = "0 80px";
		idOpcion.style.color = "#ffffff";
	}
}	
function desmarcar_menu(identificador){
	var idIzq 	 = findDOM('mizq_' + identificador);
	var idDcha 	 = findDOM('mdcha_' + identificador);
	var idOpcion = findDOM('mopcion_' + identificador);
	if (idIzq && idDcha && idOpcion && idOpcion.className != 'b3 marcada'){
		idOpcion.style.color = "#7f7f7f";	
		idIzq.style.backgroundPosition = "0 0px";
		idDcha.style.backgroundPosition = "0 0px";
		idOpcion.style.backgroundPosition = "0 0px";									
	}
}	