//-------------------------------------------------------------------------------------------------
/*

function MakeArray(n) 
{
	this.length = n
	for (var i = 1; i<=n; i++) 
	{
		this[i] = new Image()
	}
	return this
}
//-------------------------------------------------------------------------------------------------
function gestioncapasmenu() 
{
  var srcId, srcElement, targetElement;
  var targett;
  srcElement = window.event.srcElement;
  if (srcElement.className.toUpperCase() == "LEVEL1") 
  {
		 srcID = srcElement.id.substr(0, srcElement.id.length-1);
		 targetElement = document.all(srcID + "s");//Controlamos las Capas

	         targett = document.all('OUT1s');
			 if (targetElement != targett) 
     		     targett.style.display = "none";
				 
		     targett = document.all('OUT2s');
			 if (targetElement != targett) 
     		     targett.style.display = "none";
				 
			 targett = document.all('OUT3s')
			 if (targetElement != targett) 
    		     targett.style.display = "none";

			 targett = document.all('OUT4s')
			 if (targetElement != targett) 
    		     targett.style.display = "none";
		 
//alert(targetElement.style.display)
	if (targetElement != null)
	{
  		if (targetElement.style.display == "none") //No visible
		{			
		targetElement.style.display = ""; //Visible
		}
		else
		{
		targetElement.style.display = "none"; 
		}
	}
  }
}
document.onclick = gestioncapasmenu;
//-------------------------------------------------------------------------------------------------

*/

//-------------------------------------------------------------------------------------------------
function MakeArray(n) 
{
	this.length = n
	for (var i = 1; i<=n; i++) 
	{
		this[i] = new Image()
	}
	return this
}
//-------------------------------------------------------------------------------------------------
function gestioncapasmenu() 
{
  var srcId, srcElement, targetElement;
  var targett;
  srcElement = window.event.srcElement;
  
  if (srcElement.className.toUpperCase().substr(0,6) == "LEVEL1") 
  {
		 srcID = srcElement.id.substr(0, srcElement.id.length-1);
		 targetElement = document.all(srcID + "s");//Controlamos las Capas

	         targett = document.all('OUT1s');
	        
	         if(targett!=null)
	         {
			    if (targetElement != targett) 
     		        targett.style.display = "none";
			 }
				 
		     targett = document.all('OUT2s');
		     
		      if(targett!=null)
	          {
				 if (targetElement != targett) 
     		       targett.style.display = "none";
     		  }
				 
			 targett = document.all('OUT3s');
			 
			  if(targett!=null)
	          {
			     if (targetElement != targett) 
    		         targett.style.display = "none";
    		  }

			 targett = document.all('OUT4s');
			 
			  if(targett!=null)
	          {
			     if (targetElement != targett) 
    		        targett.style.display = "none";
    		  }
    		     
    		 targett = document.all('OUT9s');
    		 
			  if(targett!=null)
	          {
			     if (targetElement != targett) 
    		         targett.style.display = "none";
    		  }
		 
			      targett = document.all('OUT10s');
    		 
			  if(targett!=null)
	          {
			     if (targetElement != targett) 
    		         targett.style.display = "none";
    		  }
    		  
					
					
		//alert(targetElement.style.display)
			if (targetElement != null)
			{
  				if (targetElement.style.display == "none") //No visible
				{			
				targetElement.style.display = ""; //Visible
				}
				else
				{
				targetElement.style.display = "none"; 
				}
			}
	}
	else{
		if (srcElement.className.toUpperCase() == "LEVEL1ON") {
			alert(srcElement.className)
		}
	}
}
document.onclick = gestioncapasmenu;
//----------------------------------------