function globalNav(section, subsection){

    var t=this;

    var nav = document.getElementById('global-nav');

    var onStates=[];

    var anchs = nav.getElementsByTagName("a");



    for(i=0;i<anchs.length;i++){



        preLD(getContext(anchs[i]));

        //event handler assignment loop

        anchs[i].onmouseover=function(){

            swap(getContext(this));

        }

        anchs[i].onmouseout=anchs[i].onmouseover;

        if(i==section){

            setActiveLink(anchs[i]);

        }

        setSubsection(subsection);



    }



	function programNav(section){

	

	}   

	

	function swap(mnu){

        var newImg = toggle(mnu);

        //alert(mnu.nodeName);

        mnu.src=newImg;

    }



    function toggle(mnu){

        var oImg = mnu.src;

        var idx=((oImg.indexOf("_0"))==-1)?0:1;

        var newImg = oImg.substring(0,oImg.lastIndexOf("_")+1) + idx + oImg.substring((oImg.lastIndexOf("_")+2),oImg.length);

        return(newImg);

    }



    function getContext(anch){

        //retrieves the image associated with an achor.

        var i = anch.getElementsByTagName("img")[0];

        return(i);

    }



    function setActiveLink(anch){

        //sets the active link and disables the mouse events fot the node.

        swap(getContext(anch));

        anch.onmouseover=null;

        anch.onmouseout=null;

    }



    function setSubsection(idx){

        if(!isNaN(subsection)){

            var sN = document.getElementById('corp-subnav');

            var anchs = sN.getElementsByTagName("a");

            for(x=0;x<anchs.length;x++){

                if(x == subsection){

                    anchs[x].className='active';

                }

            }

        }

    }



    function preLD(sImg){

        //adds an image to the array of preloaded ones

        var newImg = new Image;

        newImg.src=toggle(sImg);

    }

}

	

function newWin(which){



   nuWin = window.open(which,"definition","WIDTH=680, left=70,menubar=0,resizable=0,scrollbars=1");



   nuWin.focus(which);



}

function newWin1(which, iWidth, iHeight){



	if (!iWidth){



   		iWidth = 550;



	}



	if (!iHeight){



		iHeight = 700;



	}	



   nuWin = window.open(which,"definition"," WIDTH=" + iWidth + ", height=" + iHeight + ", left=50, top=50,,menubar=0,resizable=0,scrollbars=0,toolbar=1");



   nuWin.focus(which);



}

function newWinNyse(which, iWidth, iHeight){
	if (!iWidth){
   		iWidth = 550;
	}
	if (!iHeight){
		iHeight = 700;
	}	
   nuWin = window.open(which,"definition"," WIDTH=" + iWidth + ", height=" + iHeight + ", left=50, top=50,,menubar=0,resizable=0,scrollbars=0,toolbar=0");
   nuWin.focus(which);
}