
//Begin Tree Menu
var menuids=["treemenu1"] // id(s) of menus, separated by commas

function buildsubmenus_horizontal(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
		if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
			ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
			ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
		}
		else{ //else if this is a sub level menu (ul)
		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    	ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon"
		}
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.visibility="visible"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.visibility="hidden"
    }
    }
  }
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus_horizontal, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus_horizontal)
//End Tree Menu

//Begin Menu highlight
   function Who(){
      document.getElementById("Who").style.backgroundColor="#0060ae";
      document.getElementById("Who").style.color="#ffffff";
     
      }
      function Careers(){
      document.getElementById("Careers").style.backgroundColor="#0060ae";
      document.getElementById("Careers").style.color="#ffffff";
      
      }
      function Investors()
      {
       document.getElementById("Investors").style.backgroundColor="#0060ae";
       document.getElementById("Investors").style.color="#ffffff";
      
      }
      function Corporate()
      {
       document.getElementById("Corporate").style.backgroundColor="#0060ae";
       document.getElementById("Corporate").style.color="#ffffff";
      
      }
      function News()
      {
       document.getElementById("News").style.backgroundColor="#0060ae";
       document.getElementById("News").style.color="#ffffff";
      
      }
//End Menu Highlight

//New Window at fixed Size
function OpenWindow(url)
{
    var params;
    
    if (arguments.length > 1)
        params = arguments[1];
    else
        params = 'scrollbars=yes,resizable=yes,width=640,height=480'
    
    var win = window.open(url,'NewWin',params);
}
//End New Window


function ShowHide (TargetDiv)
{
    //first, check to see if this browser supports modern DHTML
    if (document.getElementById)
    {
        //now, grab a reference to the target div
        var obj = document.getElementById(TargetDiv)
        //check the current status of this target div
        if ( obj.style.display == 'none' ) //if it's hidden,...
        { 
            obj.style.display = 'inline';  //... then show it.
        } else {
            obj.style.display = 'none';    //... otherwise, hide it.
        }
    }
}

function BlankOutSearchBox(objSearchText, strTextToClear)
{
    if (objSearchText.value == strTextToClear)
    {
        objSearchText.value = '';
    }
}