var zIndex = 1; function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func; } } } var activeNode; function startList() { if (document.getElementById('menubeans')) { navRoot = document.getElementById('menubeans'); for (i = 0; i < navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName == 'LI') { if (node.className == 'active') { activeNode = i; } } } for (i = 0; i < navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName == 'LI') { node.onmouseover = function() { navRoot.childNodes[activeNode].className = ''; this.className = 'active'; } node.onmouseout = function() { this.className = ''; navRoot.childNodes[activeNode].className = 'active'; } node.onmousedown = function() { navRoot.childNodes[activeNode].className = ''; this.className = 'active'; activeNode = this.id - 1; } } } } } var activeNN = '2-li-0'; function chActiveMenu(newk){ // find active node //alert("value for AN" + activeNN); //alert("value for newk" + newk); /* set old one to nothing */ document.getElementById(activeNN).className = ''; /* set new one to active */ document.getElementById(newk).className = 'active'; activeNN = newk; } function resetForm(fobj){ fobj.reset(); closeTree(); } function getFormVals(fobj) { var str = ''; var ft = ''; var fv = ''; var fn = ''; var els = ''; for(var i = 0;i < fobj.elements.length;i++) { els = fobj.elements[i]; ft = els.title; fv = els.value; fn = els.name; switch(els.type) { case "text": case "hidden": case "password": case "textarea": // is it a required field? if(encodeURI(ft) == "required" && encodeURI(fv).length < 1) { alert(fn + ' is a required field, please complete.'); els.focus(); return false; } str += fn + "=" + encodeURI(fv) + "&"; break; case "checkbox": case "radio": if(els.checked) str += fn + "=" + encodeURI(fv) + "&"; break; case "select-one": str += fn + "=" + els.options[els.selectedIndex].value + "&"; break; } // switch } // for str = str.substr(0,(str.length - 1)); return str; } function killChildren(domE){ for(var i = 0; i