/* http://www.brownsvilleherald.com/common/tools/load.php?js=common_nav,common_tabBox,common_archive */
function navLoad(E){if(typeof (E)=="undefined"){E="fi_nav_ul"}var D=document.getElementById(E);var C=D.getElementsByTagName("LI");for(var B=0;B<C.length;B++){for(var A=0;A<C[B].childNodes.length;A++){if(C[B].childNodes[A].nodeName=="UL"&&C[B].childNodes[A].className.indexOf("sub")>-1){C[B].setAttribute("ulPos",A);if(C[B].parentNode==D){C[B].childNodes[A].setAttribute("drop","down")}else{C[B].className+=" hasSub"}break}}C[B].onmouseover=function(){if(this.className.indexOf(" over")==-1){this.className+=" over"}if(this.getAttribute("ulPos")){showAndPosition(this)}};C[B].onmouseout=function(){this.className=this.className=="over"?"":this.className.replace(" over","");if(this.getAttribute("ulPos")){this.childNodes[this.getAttribute("ulPos")].style.visibility="hidden"}}}}function showAndPosition(A){var B=A.childNodes[A.getAttribute("ulPos")];if(B.getAttribute("noPos")){B.style.visibility="visible"}else{if(B.getAttribute("drop")=="down"){B.style.left="0px";B.style.top=A.offsetHeight+"px";if(B.offsetWidth<A.offsetWidth){B.style.width=A.offsetWidth+"px"}}else{B.style.left="auto";B.style.right=(-B.offsetWidth)+"px";B.style.top="3px"}B.setAttribute("noPos",true)}}function showTab(G,H){var L=getTabBoxID(G);var B=getTabNum(G);var C=getEl(L);var K=C.getAttribute("lastTab");var A=C.getAttribute("baseName");var D=A+"Selected";var F=getEl(L+"_"+K+"_tab");var J=getEl(L+"_"+K+"_content");var E=getEl(L+"_"+B+"_tab");var I=getEl(L+"_"+B+"_content");F.className=F.className.replace(D,"");J.style.display="none";E.className=E.className+" "+D;I.style.display="";C.setAttribute("lastTab",B)}function getTabBoxID(C){var A=C.id;var D=A.indexOf("_");var B=A.indexOf("_",(D+1));return A.substr(0,D)}function getTabNum(C){var A=C.id;var D=A.indexOf("_");var B=A.indexOf("_",(D+1));return A.substr((D+1),(B-D-1))}function highlightTab(F,C){var B=getTabBoxID(F);var A=getEl(B);var E=A.getAttribute("baseName");var D=E+"Highlighted";if(C==true){F.className+=" "+D}else{F.className=F.className.replace(D,"")}}function getEl(A){return document.getElementById(A)}function showToolTip(D,E,I,B,J){var H=D.parentNode;var F=createNewToolTip(E,I,B,J);var C=getOffsetTop(D).toString()+"px";var G=(getOffsetLeft(D)+D.offsetWidth+5).toString()+"px";var A=document.createElement("iframe");A.id=F.id+"_magicIframe";A.style.position="absolute";A.style.width=(F.offsetWidth-5).toString()+"px";A.style.height=(F.offsetHeight-5).toString()+"px";A.style.left=G;A.style.top=C;F.style.left=G;F.style.top=C;document.body.appendChild(A);D.setAttribute("tooltipDivID",F.id);D.setAttribute("magicIframeID",A.id)}function hideToolTip(A){if(!A.parentNode){return }var B=getEl(A.getAttribute("tooltipDivID"));var C=getEl(A.getAttribute("magicIframeID"));if(B&&B.parentNode){B.parentNode.removeChild(B)}if(C&&C.parentNode){C.parentNode.removeChild(C)}}function createNewToolTip(H,G,E,A){var C=document.createElement("div");C.className="tooltipTitle";var B=document.createElement("div");B.className="tooltipContent";var F=document.createElement("div");F.id="toolTipDiv";F.className="tooltip";F.style.position="absolute";F.style.top="-9000px";F.style.left="-9000px";F.appendChild(C);F.appendChild(B);document.body.appendChild(F);C.innerHTML=H;alert(E);if(E>200){var D=200/E;E=200;A=A*D}B.innerHTML='<img src="'+G+'" width="'+E+'" height="'+A+'"/>';alert(B.innerHTML);return F}function getOffsetTop(A){return getRealOffset(A,"top")}function getOffsetLeft(A){return getRealOffset(A,"left")}function getRealOffset(C,D){if(!C){return 0}if(D=="top"){var A=C.offsetTop}else{var A=C.offsetLeft}var B=C.offsetParent;while(B){if(D=="top"){A+=B.offsetTop}else{A+=B.offsetLeft}B=B.offsetParent}return A};
