
    function displayHighlight(myElem, elemName, action){
        var MyLeftPosition = "";
        var MyTopPosition = "";
        var heightOfPopup = 256;
        var NodeToTest = "";
        var AddToPopupHeight = "";
        var blnShowAnimation = false; //set to false unless you can prove the user can see the animation 
        
         //run this test first to see if we need to simply exit
        myNode = document.getElementById(elemName);
        
        if(elemName!="content-wrapper"){        
            if(myNode.style.display!="none"){
                return;
            }
        }
        
        //get what the user is using
        var agt=navigator.userAgent.toLowerCase();
        var windowsStringInAgent = "windows nt"; 
        
        //if they are not using a mac
        if (agt.indexOf("mac")!=-1){
            blnShowAnimation = false
        }else{
            if (agt.indexOf(windowsStringInAgent)!=-1){
                //now get the version of windows
                
                windowsverion = agt.substr(agt.indexOf(windowsStringInAgent) + windowsStringInAgent.length + 1, 1); 
                
                if (windowsverion > 4){
                    blnShowAnimation = true;
                }
            }
        }
        
        
        //Turn off the animation for all browsers never really worked that great.  You could
        //get multiple tabs to appear.
        //Left the code in case their is an updated that can be used some day.
        blnShowAnimation = false        
       
        //now init the array of the popup ids
        var popups= new Array(6) 
        popups[0]="Construction"; 
        popups[1]="RealEstate"; 
        popups[2]="Development"; 
        popups[3]="HospitalityServices"; 
        popups[4]="CBS"; 
        
        var x=0; 
        for (x=0; x<6; x++) 
        { 
            if(popups[x]!=myElem){
                NodeToTest = document.getElementById(popups[x])  
                //turn the popup off
                if(NodeToTest){
                    if(NodeToTest.style.display!="none"){
                        if (blnShowAnimation) {                    
                            Effect.toggle(NodeToTest,'appear', { duration: .5 });
                        }else{
                            NodeToTest.style.display="none";
                        }
                    }
                }
            }
        } 
        
        //no need to turn anything on if mouseover is on content wrapper
        if(elemName=="content-wrapper"){        
            return;
        }
        
        myContainer = document.getElementById("BottomHighlight");
        
        //IE and Moz calculate left positioning slightly differently
        if(navigator.appName == "Microsoft Internet Explorer") {
            //get the offset left of the li and its container
            MyLeftPosition = myElem.offsetLeft + myContainer.offsetLeft
            AddToPopupHeight = 11
        }else{
            MyLeftPosition = myElem.offsetLeft
            AddToPopupHeight = 1
        }
        
        //get where the top will be for each popup
        myULContainerForTop = myContainer.offsetTop - heightOfPopup + AddToPopupHeight        
     
        
        //convert it to a string
        MyLeftPosition = MyLeftPosition+''
        myULContainerForTop = myULContainerForTop+''        
        
        if (action=="on"){        
            myNode.style.left = MyLeftPosition + "px";
            myNode.style.top = myULContainerForTop + "px";

           if (blnShowAnimation) {                    
                Effect.toggle(myNode,'appear', { duration: .1 });
            }else{
                myNode.style.display="block";
            }
        }else{
        
            //everything should be turned off already;
            
        }
       
    }

    function displayEmailTab(elemName, action){
        var MyLeftPosition = "";
        var MyTopPosition = "";
        var heightOfPopup = 256;
        var NodeToTest = "";
        var AddToPopupHeight = "";
        var blnShowAnimation = false; //set to false unless you can prove the user can see the animation 
        
        //run this test first to see if we need to simply exit
         myNode = document.getElementById(elemName);
         myContainer = document.getElementById("BottomHighlight");
        
        //IE and Moz calculate left positioning slightly differently
        if(navigator.appName == "Microsoft Internet Explorer") {
            //get the offset left of the li and its container
            MyLeftPosition = myContainer.offsetLeft
            AddToPopupHeight = 30;    
        }else{
            MyLeftPosition = myContainer.offsetLeft
            AddToPopupHeight = 30;
        }
        
        //get where the top will be for each popup
        myULContainerForTop = myContainer.offsetTop - heightOfPopup + AddToPopupHeight     
        //convert it to a string
        MyLeftPosition = MyLeftPosition+''
        myULContainerForTop = myULContainerForTop+''        
        
        if (action=="on"){        
            myNode.style.left = MyLeftPosition + "px";
            myNode.style.top = myULContainerForTop + "px";
            //myNode.style.top = "400px"

           if (blnShowAnimation) {                    
                Effect.toggle(myNode,'appear', { duration: .1 });
            }else{
                myNode.style.display="block";
            }
        }else{        
            myNode.style.display="none";
            myNode.style.left = "0px";            
        }
    
    
    }
    
    function getObject( objName )
    {
           return document.getElementById(objName);
    }

    var obj = getObject("EmailThisPageContainer");

    if (obj){
        obj.onmouseout = checkWhoWasMoused;
        if (obj.captureEvents) obj.captureEvents(obj.mouseout);
    }

 function checkWhoWasMoused(e) {
	if (!e) var e = window.event;
	var relTarg = e.relatedTarget || e.toElement;
	var blnIsAChild = false
	
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	
	reltg= relTarg
	
	if (reltg){
	
        while (reltg.nodeName != 'BODY'){
            //then it is a child of the div layer so cancel the mouseover event.        
         
            if (reltg.id=="EmailThisPageContainer"){
                blnIsAChild = true;
            }
           
            reltg= reltg.parentNode;
        }
        	
	    if (!blnIsAChild){displayEmailTab('EmailThisPage', 'off');}
	
	}
	
}

