window.onload=function(){nobr=document.getElementsByTagName("nobr");if(document.getElementById("relatedLinks")){tdElements=document.getElementsByTagName("td");for(i=0;i<tdElements.length;i++){if(tdElements[i].className=="blueheader"){rTop=document.getElementById("relatedLinks").offsetTop;bTop=tdElements[i].offsetTop;document.getElementById("relatedLinks").style.top=-(rTop-bTop)+215+"px";break}}}if(window.section===undefined&&window.pName===undefined&&window.loc===undefined){navBlock=document.getElementById("navBlockLong");tbElement=navBlock.parentNode.parentNode.parentNode;trElement=tbElement.getElementsByTagName("tr")[0];trElement.parentNode.removeChild(trElement)}if(window.section){}else{section=""}if(window.pName){}else{pName=""}if(window.loc){}else{loc=""}if(!window.section||window.section==""){for(c=0;c<nobr.length;c++){locHome=nobr[c].getElementsByTagName("a");for(d=0;d<locHome.length;d++){tempLnk=locHome[d].href;if(tempLnk.indexOf("Networks")!=-1){window.section="NT";break}if(tempLnk.indexOf("Public_Safety")!=-1||tempLnk.indexOf("Public+Safety")!=-1){window.section="GPS";break}}}}if(!window.pName||window.pName==""){window.pName="Search Training"}if(!window.loc||window.loc==""){for(c=0;c<nobr.length;c++){locHome=nobr[c].getElementsByTagName("a");for(d=0;d<locHome.length;d++){tempLnk=locHome[d].href;if(tempLnk.indexOf("US-EN")!=-1){window.loc="NA";break}if(tempLnk.indexOf("XU-EN")!=-1){window.loc="EMEA";break}}}}new Ajax.Request("http://"+location.hostname+"/staticfiles/Admin%20Content/Resources/Business/html/menu_"+window.loc+"_"+window.section+".xml",{onSuccess:function(b){if(b.responseText){xmlText=b.responseText;if(document.all){var f=new ActiveXObject("Microsoft.XMLDOM");f.loadXML(xmlText);xmlObj=f}else{b=(new DOMParser()).parseFromString(xmlText,"text/xml");xmlObj=b}}else{xmlObj=b.responseXML}var a=xmlObj.getElementsByTagName("menu")[0];var e=a.getElementsByTagName("navItem");ulObj=document.createElement("ul");urlLnk="";for(i=0;i<e.length;i++){lnk=urlLnk+e[i].getElementsByTagName("link")[0].firstChild.nodeValue;lnk=lnk.replace(/%26/g,"&");name=e[i].getElementsByTagName("name")[0].firstChild.nodeValue;name=name.replace("--","&nbsp;&nbsp;");liObj=document.createElement("li");aObj=document.createElement("a");aObj.setAttribute("href",lnk);aObj.setAttribute("class","navDark");if(document.all){aObj.setAttribute("className","navDark")}if(name.indexOf(pName)!=-1){aObj.style.fontWeight="900"}aObj.innerHTML=name;liObj.appendChild(aObj);if(e[i].getElementsByTagName("subNav")[0]){subNav=e[i].getElementsByTagName("subNav")[0];navItems2=subNav.getElementsByTagName("subNavItem");ulObj2=document.createElement("ul");for(x=0;x<navItems2.length;x++){lnk2=urlLnk+navItems2[x].getElementsByTagName("link")[0].firstChild.nodeValue;lnk2=lnk2.replace(/%26/g,"&");name2=navItems2[x].getElementsByTagName("name")[0].firstChild.nodeValue;name2=name2.replace("--","&nbsp;&nbsp;");tempName2=name2.replace("--","");liObj2=document.createElement("li");aObj2=document.createElement("a");aObj2.setAttribute("href",lnk2);aObj2.setAttribute("class","navDark");if(document.all){aObj2.setAttribute("className","navDark")}if(name2.indexOf(pName)!=-1){aObj2.style.fontWeight="900"}aObj2.innerHTML=name2;liObj2.appendChild(aObj2);windowLocation=document.location.href;isSet=false;if(navItems2[x].getElementsByTagName("subSubNav")[0]){subNav2=navItems2[x].getElementsByTagName("subSubNav")[0];navItems3=subNav2.getElementsByTagName("subSubNavItem");ulObj3=document.createElement("ul");for(k=0;k<navItems3.length;k++){for(c=0;c<navItems3.length;c++){linkTemp=navItems3[c].getElementsByTagName("link")[0].firstChild.nodeValue;if(windowLocation.indexOf(linkTemp)!=-1){isSet=true}}lnk3=urlLnk+navItems3[k].getElementsByTagName("link")[0].firstChild.nodeValue;lnk3=lnk3.replace(/%26/g,"&");name3=navItems3[k].getElementsByTagName("name")[0].firstChild.nodeValue;name3=name3.replace("--","&nbsp;&nbsp;&nbsp;&nbsp;");if(name2.indexOf(pName)!=-1||isSet){liObj3=document.createElement("li");aObj3=document.createElement("a");aObj3.setAttribute("href",lnk3);aObj3.setAttribute("class","navDark");if(document.all){aObj3.setAttribute("className","navDark")}if(name3.indexOf(pName)!=-1){aObj3.style.fontWeight="900"}aObj3.innerHTML=name3;liObj3.appendChild(aObj3);ulObj3.appendChild(liObj3)}}liObj2.appendChild(ulObj3)}ulObj2.appendChild(liObj2)}liObj.appendChild(ulObj2)}ulObj.appendChild(liObj)}document.getElementById("navBlockBody").appendChild(ulObj);clearDiv=document.createElement("div");clearDiv.setAttribute("class","clear");if(document.all){clearDiv.setAttribute("className","clear")}document.getElementById("navBlockBody").appendChild(clearDiv)},onFailure:function(a){return false}});document.getElementById("navBlockLong").style.position="relative"};
