var webSiteWidth = 750;
var curNav = null;
var delay = 250;
var timer = 0;

function showSub( subName, xOffset ){
        var e, windowWidth, webSiteLeft;
        cancelHide();
        hideSubNavigation();
        e = document.getElementById(subName);
        windowWidth = document.all ? document.body.clientWidth : window.innerWidth;
        webSiteLeft = (windowWidth - webSiteWidth)/2;
        if( webSiteLeft > 0 ) webSiteLeft = 0;
        e.style.left = webSiteLeft + xOffset;

        e.style.visibility = 'visible';
        curNav = subName;
}
function hideSubNavigation(){
        if( curNav != null ){
                e = document.getElementById(curNav);
                e.style.visibility = 'hidden';
                curNav = null;
        }
}
function hideSub(){
        timer = setTimeout('hideSubNavigation()', delay);
}
function cancelHide(){
        clearTimeout(timer);
        timer = 0;
}
function navOver(e){
        e.style.backgroundColor = '#000000';
        e.style.color = '#dac033';
}
function navOut(e){
        e.style.backgroundColor = '#000000';
        e.style.color = '#FFFFFF';
}
function mover(im) {
  document.getElementById(im).src = "/images/" + im + "-over.gif"
}
function mout(im) {
  document.getElementById(im).src = "/images/" + im + ".gif"
}
