/* $Id: subnav.js,v 1.2 2007/01/09 16:38:18 spacepleb Exp $ */

function activateNavItem (oNav) {

    oNavUL = oNav.parentNode;
    for(i=0; i<oNavUL.childNodes.length;i++) {
	oC = oNavUL.childNodes[i];
	if(oC.nodeName == 'LI') {
	    oC.style.backgroundImage='url(/img/red_arrow.gif)';
	    for(j=0; j<oC.childNodes.length;j++) {
		if(oC.childNodes[j].nodeName == 'A') {
		    oC.childNodes[j].style.color='#666666';
		    oC.childNodes[j].onmouseover=function(){ this.style.textDecoration="underline"; this.style.cursor='pointer'; };
		    oC.childNodes[j].onmouseout=function(){ this.style.textDecoration="none" };
		}
	    }
	}	    
    }
    
    oNav.style.backgroundImage='url(/img/grey_square_trans.gif)';
    oNav.style.cursor='default';
    
    for(i=0; i<oNav.childNodes.length;i++) {
	if(oNav.childNodes[i].nodeName == 'A') {
	    oNav.childNodes[i].style.color='#8c8c8c';
	    oNav.childNodes[i].style.cursor='default';
	    oNav.childNodes[i].onmouseover=function(){ this.style.textDecoration="none"; this.style.cursor='default';};
	}
    }
}
