// ================================================================== // Copyright 2002 by iQue digital media design // ------------------------------------------------------------------ // menu.jv -- menu besturing javascript // Language -- Javascript // ------------------------------------------------------------------ // Coder/Graphics Date Description // R Hoekstra 29-mei-2002 creation // ================================================================== // ======================================================================= // Functions // ======================================================================= var colorStore; var elementOpen = null; // ----------------------------------------------------------------------- // onMainItem -- pointer over main item, display // ----------------------------------------------------------------------- function onMainItem(element) { colorStore = element.style.color; element.style.color = "#191BB5"; element.style.textDecoration = "underline"; return; } // onMainItem // ----------------------------------------------------------------------- // offMainItem -- pointer off main item // ----------------------------------------------------------------------- function offMainItem(element) { element.style.color = colorStore; element.style.textDecoration = "none"; return; } // offMainItem // ----------------------------------------------------------------------- // hideItem -- Hides an item // ----------------------------------------------------------------------- function hideItem(element) { var elementParent = element.parentNode; var childrenCount = elementParent.childNodes.length; var thisChild = 0; for (iCounter = 0; iCounter < childrenCount; iCounter++ ) { if (elementParent.childNodes[iCounter].nodeType == 1) { thisChild = elementParent.childNodes[iCounter]; if (thisChild != element) { thisChild.style.display = "none"; } } } } // hideItem // ----------------------------------------------------------------------- // showItem -- Shows an item // ----------------------------------------------------------------------- function showItem(element) { var elementParent = element.parentNode; var childrenCount = elementParent.childNodes.length; var thisChild = 0; for (iCounter = 0; iCounter < childrenCount; iCounter++ ) { if (elementParent.childNodes[iCounter].nodeType == 1) { thisChild = elementParent.childNodes[iCounter]; if (thisChild != element) { thisChild.style.display = ""; } } } } // showItem // ----------------------------------------------------------------------- // clickMainItem -- Main item clicked // ----------------------------------------------------------------------- function clickMainItem(element) { if (element == elementOpen) { // hide item hideItem(element); elementOpen = null; } else { // hide last opened item if (elementOpen != null) { hideItem(elementOpen); } // show new item showItem(element); // store item as opened elementOpen = element; } return; } // clickMainItem function onLevelOne( el) { el.style.color = "#191BB5"; el.style.textDecoration = "underline"; return; } function notOnLevelOne( el) { el.style.color = "black"; el.style.textDecoration = "none"; return; } function hideContents( el) { var elParent = el.parentNode; var childrenCount = elParent.children.length; var thisChild = 0; for(i = 0; i