/*
    Scripts para los menus de navegacion
        
    $Header: /home/vreixo/varios/cvsroot/webfic/Subsystems/Web/Sources/HTMLView/HTML/js/navigation.js,v 1.1 2004/12/30 05:41:36 david Exp $
    $Revision: 1.1 $
    $Date: 2004/12/30 05:41:36 $
*/


/*
 * Inicializa los elementos del menu para que soproten efectos de rollover:
 * en concreto, aparicion/desaparacion de los elementos del menu.
 */ 
function startList() {
    if (document.all&&document.getElementById) {
        navRoot = document.getElementById("menubar");

        for (i=0; i<navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];
            if (node.nodeName=="LI") {
                node.onmouseover=function() {
                    this.className+=" over";
                }

                node.onmouseout=function() {
                    this.className=this.className.replace(" over", "");
                }
            }
        }
    }
}

function toggle( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  	}
}


// fold/unfold
function expand(objId, symbolId)
{
   obj = document.getElementById(objId);
   symbol = document.getElementById( symbolId );

   if (obj.className == "hide")
   {
       obj.className = "show";
       symbol.className = "click-minus";
   }
   else {
       obj.className = "hide";
       symbol.className = "click-plus";
   }
}
