<!-- 
/*
Thanks to the author (unknown) of the tutorial at the following site, from which
I obtained knowledge of how to find the position of the scroll bar.
http://javascriptkit.com/javatutors/static2.shtml
*/
function getScrollPositionX(){
    //define universal dsoc left point
    var dsocleft=document.all? iebody.scrollLeft : pageXOffset
    return dsocleft;
}
function getScrollPositionY(){

    //define universal dsoc top point
    var dsoctop=document.all? iebody.scrollTop : pageYOffset
    return dsoctop;
}
    
function positionBannerMenu(){
    var dsoctop = getScrollPositionY();

    if (dsoctop > 205){
        
        document.getElementById('WrapBannerAndMenu').style.position="fixed";
        document.getElementById('WrapBannerAndMenu').style.top = '-' + 205 + 'px';
        
    } else { 
                
        document.getElementById('WrapBannerAndMenu').style.position="absolute";
        document.getElementById('WrapBannerAndMenu').style.top= 0 + 'px';
        
    }
}
function setMenuBarBGWidth() {
        
        if (myWidth < (widthC + margin)) {
            var dsocleft = getScrollPositionX();
            document.getElementById('MenuBar_BG').style.width= myWidth + dsocleft + 'px';
        } else {
            document.getElementById('MenuBar_BG').style.width= "100%";
        }

}
function setBannerOverflow() {

    if (myWidth < (widthC + margin)) {
    
        document.getElementById('BannerSpace').style.overflow="visible";
        setInterval("setMenuBarBGWidth()",100);
        
    } else {
    
        document.getElementById('BannerSpace').style.overflow="hidden";
    }
}    


/* 
************************************************************************
Centers site on load, refresh or window resize and,

@author Francis Bezooyen, with credits to Mark Wilton-Jones for his
script to find the width and height of the viewing area.  Found at:
http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
************************************************************************
*/

//gets width and height of client viewing area
function getWidthHeight() {
    if (typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            myWidth = window.innerWidth;
            myHeight = window.innerHeight;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
        } 
} // End getWidthHeight function
        
    
        
        
function centerSite() { 
        getWidthHeight();
        var diffCenterC = (myWidth - widthC)/2; // The difference between viewing area and content width, divided by 2 to find the difference center
        var diffCenterBG = (myWidth - widthBG)/2; // The difference between viewing area and background width, divided by 2 to find the difference center
        var widthCMargin = marginCenter;
        var widthBGMargin = ((widthBG - widthC)/2) - marginCenter;
        
        var finalStrPosC = diffCenterC + 'px';
        var finalStrNegC = '-' + diffCenterC +'px';
        var finalStrPosBG = diffCenterBG + 'px';
        var finalStrNegBG = '-' + diffCenterBG +'px';
        
        
        document.getElementById('Content').style.position = "absolute";
        document.getElementById('Menu').style.position = "absolute";
        document.getElementById('Banner_Image').style.position = "absolute";
        
        if(myWidth > (widthC + margin)) {
                
                document.getElementById('Content').style.left = "auto";
                document.getElementById('Content').style.right = finalStrPosC;
                
                document.getElementById('Menu').style.left = "auto";
                document.getElementById('Menu').style.right = finalStrPosC;
                
                document.getElementById('Banner_Image').style.left = "auto";
                document.getElementById('Banner_Image').style.right = finalStrPosBG;
        
            
        } else { // else for if(myWidth > (widthC + margin)); keeps the page content from becoming irretrievable off the left of the viewing area
            
            //Lock WrapContent position
            document.getElementById('Content').style.right = "auto";
            document.getElementById('Content').style.left = widthCMargin + 'px' ;
            
            document.getElementById('Menu').style.right = "auto";
            document.getElementById('Menu').style.left = widthCMargin + 'px' ;
            //Lock WrapBG position
            document.getElementById('Banner_Image').style.right = "auto";
            document.getElementById('Banner_Image').style.left = '-' + widthBGMargin + 'px' ;
            
        }

       setBannerOverflow();
  
}



        
        
        

        
//-->