function positionLogo()
{
    var screenW = document.body.clientWidth;
    var screenDiff = (screenW - 144) / 2;
    var divLogo = document.getElementById("divLogo");

    divLogo.style.left = screenDiff + "px";
    divLogo.style.visibility = "visible";
    divLogo.style.display = "block";
}


function positionHands()
{
    var flashEnabled;
    var ulTopNav = document.getElementById("TopNav");
    
    //move the bottom 1/3 of the logo if the user is in edit mode
    if(ulTopNav){
        var ulTopNavPos = ulTopNav.offsetTop;
        
        if (ulTopNavPos > 60) {
            var elemBottomOfImage = document.getElementById("BottomOfLogo");
            RevisedTopPosition = ulTopNavPos + ulTopNav.offsetHeight;
            elemBottomOfImage.style.top = RevisedTopPosition + "px";
        }
    }
    
    if(isIE && ControlVersion() != "-1")
    {
        //IE Check
        flashEnabled = true;
    }
     else  
    {
        //Firefox/Mozilla and Mac...
        flashEnabled = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
    } 

    var screenW = document.body.clientWidth;

    var lHandLeft = 0;
    var rHandLeft = 0;
    var screenDiff = 0;

    var lHandDivFlash = document.getElementById("dLeftHandsFlash"); 
    var rHandDivFlash = document.getElementById("dRightHandsFlash");
    var lHandDivImg = document.getElementById("dLeftHandsImage"); 
    var rHandDivImg = document.getElementById("dRightHandsImage");
      
    if(screenW > 800)
    {
        screenDiff = (screenW - 844) / 2;  
        lHandLeft = screenDiff - 90;
        rHandLeft = screenDiff + 778;
        
        if(isWin && !isIE)
        {
            lHandLeft = lHandLeft + 0;
            rHandLeft = rHandLeft + 0;
        }
        
        if( flashEnabled )
        {
            //Flash Enabled
            lHandDivFlash.style.visibility = "visible";
            lHandDivFlash.style.display = "block";
            rHandDivFlash.style.visibility = "visible";
            rHandDivFlash.style.display = "block"; 
            lHandDivFlash.style.left = lHandLeft + "px";
            rHandDivFlash.style.left = rHandLeft + "px";
        } else {
        
            //No Flash, display Image Hands
            lHandDivImg.style.visibility = "visible";
            lHandDivImg.style.display = "block";
            rHandDivImg.style.visibility = "visible";
            rHandDivImg.style.display = "block"; 
            lHandDivImg.style.left = lHandLeft + "px";
            rHandDivImg.style.left = rHandLeft + "px";         
        }
        
    } else {
        lHandDivFlash.style.visibility = "hidden";
        lHandDivFlash.style.display = "none";
        rHandDivFlash.style.visibility = "hidden";
        rHandDivFlash.style.visibilty = "none";    
    }
}

	function popper(url, w, h) {//v1.0
		popwin = window.open(url,'popwin','titlebar=no,toolbar=no,location=no,scrollbars=yes,statusbar=no,personalbar=no,width='+w+',height='+h);
		if (popwin.screen) {
			var ww = ((screen.availWidth - w) / 2);
			var wh = ((screen.availHeight - h) / 2);
			popwin.moveTo(ww, wh);
		}
	}

	function popperForGoggleMap(url, w, h) {//v1.0
		popwin = window.open(url,'popwin','titlebar=no,toolbar=no,location=no,scrollbars=yes,statusbar=no,personalbar=no,width='+w+',height='+h);
	    self.blur();
	    popwin.focus();
	}

        function RegisterImageMouseOvers(portalURL){
            //var imgPathTop = portalURL + 'Skins/GG/images/navigation/top/';
            //var imgPathGlobal = portalURL + '/Skins/GG/images/navigation/global/';
            var imgPathTop = '/Portals/0/Skins/GG/images/navigation/top/';
            var imgPathGlobal = '/Portals/0/Skins/GG/images/navigation/global/';
			
            header_nav_glueOn = new Image();
            header_nav_glueOn.src = imgPathTop + "header_nav_glue_on.gif";
            header_nav_glueOff = new Image();
            header_nav_glueOff.src = imgPathTop + "header_nav_glue_off.gif";
            
            header_nav_tapeOn = new Image();
            header_nav_tapeOn.src = imgPathTop + "header_nav_tape_on.gif";
            header_nav_tapeOff = new Image();
            header_nav_tapeOff.src = imgPathTop + "header_nav_tape_off.gif"; 
 
            header_nav_newsOn = new Image();
            header_nav_newsOn.src = imgPathTop + "header_nav_news_on.gif";
            header_nav_newsOff = new Image();
            header_nav_newsOff.src = imgPathTop + "header_nav_news_off.gif";           

            header_nav_gearOn = new Image();
            header_nav_gearOn.src = imgPathTop + "header_nav_gear_on.gif";
            header_nav_gearOff = new Image();
            header_nav_gearOff.src = imgPathTop + "header_nav_gear_off.gif";           

            //Global Nav
            searchOn = new Image();
            searchOn.src = imgPathGlobal + "header_nav_search_on.gif";
            searchOff = new Image();
            searchOff.src = imgPathGlobal + "header_nav_search_off.gif"; 
			
			loginOn = new Image();
            loginOn.src = imgPathGlobal + "header_nav_login_on.gif";
            loginOff = new Image();
            loginOff.src = imgPathGlobal + "header_nav_login_off.gif"; 
            
            logoffOn = new Image();
            logoffOn.src = imgPathGlobal + "header_nav_logout_on.gif";
            logoffOff = new Image();
            logoffOff.src = imgPathGlobal + "header_nav_logout_off.gif";            
            
            joinOn = new Image();
            joinOn.src = imgPathGlobal + "header_nav_jointeam_on.gif";
            joinOff = new Image();
            joinOff.src = imgPathGlobal + "header_nav_jointeam_off.gif"; 
 
            WhereToBuyOn = new Image();
            WhereToBuyOn.src = imgPathGlobal + "header_nav_wheretobuy_on.gif";
            WhereToBuyOff = new Image();
            WhereToBuyOff.src = imgPathGlobal + "header_nav_wheretobuy_off.gif";           

            ContactUsOn = new Image();
            ContactUsOn.src = imgPathGlobal + "header_nav_contactus_on.gif";
            ContactUsOff = new Image();
            ContactUsOff.src = imgPathGlobal + "header_nav_contactus_off.gif";  
           
        }

        function butMOver( butid )
        {
            if (document.images) {
              document[ butid ].src = eval( butid + "On.src" );
            }
        }
        function butMOut ( butid )
        {
            if (document.images) {
              document[ butid ].src = eval( butid + "Off.src" );      
            }
        }

        function butMOverLogInOut( butid )
        {
            butName = butid
            if (document.images) {
                //loggedIn is a global created in the globalNav control from DNN server side code
                //DNN login control needs help with the mouseovers
                if (loggedIn==true){
                    butName = "logoff"
                }
              document[ butid ].src = eval( butName + "On.src" );
            }
        }
        function butMOutLogInOut ( butid )
        {
           butName = butid
            if (document.images) {
                //loggedIn is a global created in the globalNav control from DNN server side code
                //DNN login control needs help with the mouseovers
                if (loggedIn==true){
                    butName = "logoff"
                }
            
              document[ butid ].src = eval( butName + "Off.src" );      
            }
        }