/*
	Highlight the left navigation node corresponding to the current page.
	For the method to work:
	1. Each "<a>" node (except the top most node) needs an ID attribute to
	   identify it within the left nav hierarchy. 
	   Example: <a id="4-3" href="#">PayVantage</a>
	2. The correspoding JSP (for which there may be more than one), needs 
	   the 'active_nav_item' within the header_frag set to the corresponding
	   <a> node.
	   Example: var active_nav_item = "1-0" 
	
*/

// highlight method
function highlightNavItem() {

	if (typeof active_nav_item != "undefined")
		document.getElementById(active_nav_item).className='active';
}		

// yui functions to detect presence of left nav
function LeftNavObj(id) {
	YAHOO.util.Event.onAvailable(id, this.handleOnAvailable, this); 
}

LeftNavObj.prototype.handleOnAvailable = function(me) {
	highlightNavItem()
}
 
var obj = new LeftNavObj("left-nav");

