/*
//
// APUS JS package, last modified $Date: 2005/04/18 11:25:43 $ by $Author: stamina $
// This script contains the logic for reading "static state" cookie for the main navigation menu.
//
*/

if (get_cookie('autismemenustate') != '') {
	lCurId = get_cookie('autismemenustate');
	lCurRootObj = document.getElementById(lCurId);
	// set highlight
	lCurRootObj.firstChild.className = 'stayhigh';
	lListArr = document.getElementById('mainnavbox').getElementsByTagName('li');
	for (var i=0; i< lListArr.length; i++) {
		// check id attribute of child nodes
		if (lListArr[i].getAttribute('id')) {
			// select direct children of root (without root itself)
			lSelectionPart = lCurId + '_'; // NOTE: added the underscore to difference between i.e. mainnav1_ and mainnav10_
			if ( (lListArr[i].getAttribute('id').indexOf(lSelectionPart) != -1) && (lListArr[i].getAttribute('id') != lCurId) ) { 
				lListArr[i].style.display = '';
			}
		}
	}
}

