
function switchMenu(obj, name, subName, indexSub)
{
	// get link parent, to retrieve the li node
	obj = obj.parentNode;
	if( obj )
	{
		// change class
		switchClass(obj, name, "");
		
		var subObj = document.getElementById(subName+indexSub);
		switchClass(subObj,  subName+"_on",  subName+"_off");
		/*
		var liNode = obj;
		
		// retrive the next node, UL, containing the childs (pages links)
		// All browser, except FIE
		do 
		{
			obj = obj.nextSibling;
		} while ( obj && obj.nodeType != 1);
		// special FIE behavior...
		if( !obj )
		{
			for(i=0; i<liNode.childNodes.length; i++)
			{
				if(liNode.childNodes[i].nodeType == 1
				&& liNode.childNodes[i].nodeName == "UL")
					switchClass(liNode.childNodes[i], subName+"_on",  subName+"_off");
			}
		}
		// change the class of this ul node.
		else if (obj) {
			switchClass(obj,  subName+"_on",  subName+"_off");
		}*/
			
	}
}

