// Function to highlight a link on the left hand side // added by SRBU - matches links with linkHref in their "href" attribute // adds the class "menuHighlight" to the link className // includes all links within the
tag function highlightMenuLink(linkHref){ var leftColRef=document.getElementById('leftCol'); var linkArray=leftColRef.getElementsByTagName('a'); var linkRef; var i=0; for(i=0;i < linkArray.length;i++){ linkRef=linkArray[i]; if(linkRef.href.indexOf(linkHref) != -1){ highlightMenuItem(linkRef); } } }; function highlightMenuItem(linkRef){ var divRef=linkRef.parentNode; //alert(divRef); addClassName(linkRef,'menuHighlight'); addClassName(divRef,'menuRowHighlight'); } function addClassName(ele, className){ // ele = Spry.$(ele); if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1)) return; ele.className += (ele.className ? " " : "") + className; };