var prevLI;
var li_ID;
var prevNav;

function naVisi(nr, obj)
{
    if (obj != null)
    {
        if (prevNav != null) prevNav.className = '';
        obj.parentNode.className = 'ActiveNavTab';
        prevNav = obj.parentNode
        
        
    }
    
    var theNav = $('liNav' + nr)
    if (theNav != null)
    {
        theNav.className = 'ActiveNavTab';
        prevNav = theNav;
    }
    
    ($('dLeftNavP1')).style.visibility = 'hidden';
    ($('dLeftNavP2')).style.visibility = 'hidden';
        
    var v = '';
    var thisP = $('dLeftNavP' + nr);
    
    if (thisP != null)
    {
        if (thisP.style.visibility == 'hidden')
        {
            v = 'visible';
        }
        else
            v = 'hidden';
            
        //thisP.style.position = 'absolute';
        thisP.style.visibility = v;
    }    
}

function visi(nr, obj)
{
       
    //remove the activetab class from the other main buttons
    if (obj != null)
    {
        if (prevLI != null) prevLI.className = '';
        obj.parentNode.className = "ActiveTab"; 
        prevLI = obj.parentNode;
        
        
        //change the hidden value
        if (document.getElementById("ucTabMenu_hfActiveTab") != null)
        {
            var hf = document.getElementById("ucTabMenu_hfActiveTab")
            hf.value = nr;
            li_ID = nr;
        }               
    }
    
    var theLI = document.getElementById('liRoot' + nr)
    if (theLI != null)
    {
        theLI.className = "ActiveTab";
        prevLI = theLI;
    }
    
    for (var x = 0; x <16; x++)
    {
        if (document.getElementById("uEdcMenu" + x) != null)
        {
            o1 = document.getElementById("uEdcMenu" + x);
            o1.style.display = 'none';
        }  
    }
    vista = (document.getElementById("uEdcMenu" + nr).style.display == 'none') ? '' : 'none';
    document.getElementById("uEdcMenu" + nr).style.display = vista    
    
}

function chFG(obj, color)
{
    if (document.all || document.getElementById)
    {	     
        if (color != '')
        {
            obj.style.color = '#FFFFFF';
	    }
	    else
	    {
            obj.style.color = '';
	    }
	}          
}
