document.write("<SCRIPT TYPE=\"text/javascript\" SRC=\"/includes/ua.js\"></SCRIPT>");
if (document.images) {
    // main buttons
    homeOn = new Image();
    homeOn.src = "/images/nav/home_on.gif";
    homeOff = new Image();
    homeOff.src = "/images/nav/home_off.gif";

    productsOn = new Image();
    productsOn.src = "/images/nav/products_on.gif";
    productsOff = new Image();
    productsOff.src = "/images/nav/products_off.gif";

    safetyOn = new Image();
    safetyOn.src = "/images/nav/safety_on.gif";
    safetyOff = new Image();
    safetyOff.src = "/images/nav/safety_off.gif";

    seminarsOn = new Image();
    seminarsOn.src = "/images/nav/seminars_on.gif";
    seminarsOff = new Image();
    seminarsOff.src = "/images/nav/seminars_off.gif";

    claimsOn = new Image();
    claimsOn.src = "/images/nav/claims_on.gif";
    claimsOff = new Image();
    claimsOff.src = "/images/nav/claims_off.gif";

    safety_resourcesOn = new Image();
    safety_resourcesOn.src = "/images/nav/safety_resources_on.gif";
    safety_resourcesOff = new Image();
    safety_resourcesOff.src = "/images/nav/safety_resources_off.gif";

    contactOn = new Image();
    contactOn.src = "/images/nav/contact_on.gif";
    contactOff = new Image();
    contactOff.src = "/images/nav/contact_off.gif";
    
    p_cOn = new Image();
    p_cOn.src = "/images/nav/p_c_on.gif";
    p_cOff = new Image();
    p_cOff.src = "/images/nav/p_c_off.gif";

    w_cOn = new Image();
    w_cOn.src = "/images/nav/w_c_on.gif";
    w_cOff = new Image();
    w_cOff.src = "/images/nav/w_c_off.gif";
    
    training_overviewOn = new Image();
    training_overviewOn.src = "/images/nav/training_overview_on.gif";
    training_overviewOff = new Image();
    training_overviewOff.src = "/images/nav/training_overview_off.gif";

    training_ratesOn = new Image();
    training_ratesOn.src = "/images/nav/training_rates_on.gif";
    training_ratesOff = new Image();
    training_ratesOff.src = "/images/nav/training_rates_off.gif";

    p_c2On = new Image();
    p_c2On.src = "/images/nav/p_c_on.gif";
    p_c2Off = new Image();
    p_c2Off.src = "/images/nav/p_c_off.gif";

    w_c2On = new Image();
    w_c2On.src = "/images/nav/w_c_on.gif";
    w_c2Off = new Image();
    w_c2Off.src = "/images/nav/w_c_off.gif";

    feedbackOn = new Image();
    feedbackOn.src = "/images/nav/feedback_on.gif";
    feedbackOff = new Image();
    feedbackOff.src = "/images/nav/feedback_off.gif";

    emailOn = new Image();
    emailOn.src = "/images/nav/email_on.gif";
    emailOff = new Image();
    emailOff.src = "/images/nav/email_off.gif";

    directionsOn = new Image();
    directionsOn.src = "/images/nav/directions_on.gif";
    directionsOff = new Image();
    directionsOff.src = "/images/nav/directions_off.gif";
}

// menu init
var menuActive = 0;
var onLayer;
var timeOn = null;

// mouseover image functions for regular images
function imgOn(imgName) {
    if (document.images) { document[imgName].src = eval(imgName + "On.src"); }
}

function imgOff(imgName) {
    if (document.images) { 
    	if (imgName != curPage) { 
    		document[imgName].src = eval(imgName + "Off.src"); } 
    }
}

// mouseover image functions for menu item images
function imgOn2(imgName,layerName) {
    menuOver();
    if (navigator.family == 'nn4') { 
        document.layers[layerName].document[imgName].src = eval(imgName + "On.src");
    } else if (document.images) {
        document[imgName].src = eval(imgName + "On.src");
    }
}

function imgOff2(imgName,layerName) {
    menuOut();
    if (navigator.family == 'nn4') { 
        document.layers[layerName].document[imgName].src = eval(imgName + "Off.src");
    } else if (document.images) {
        document[imgName].src = eval(imgName + "Off.src");
    }
}

// show menu
function showLayer(layerName) {
    if (navigator.family == 'nn4') { 
        if (timeOn != null) { 
            clearTimeout(timeOn);
            hideLayer(onLayer);
        }
        eval('document.layers.'+layerName+'.visibility="visible"');
        onLayer = layerName;
    } else if (navigator.family == 'ie4' && navigator.version >= 4 && navigator.version < 5) { 
        if (timeOn != null) { 
            clearTimeout(timeOn);
            hideLayer(onLayer);
        }
        eval('document.all["'+layerName+'"].style.visibility="visible"');
        onLayer = layerName;
    } else if (document.getElementById && document.body.style) { 
        if (timeOn != null) { 
            clearTimeout(timeOn);
            hideLayer(onLayer);
        }
        eval('document.getElementById("'+layerName+'").style.visibility="visible"');
        onLayer = layerName;
    }
}

// hide menu
function hideLayer(layerName) {
    if (menuActive == 0) {
        if (navigator.family == 'nn4') { 
            eval('document.layers["'+layerName+'"].visibility="hidden"');
        } else if (navigator.family == 'ie4' && navigator.version >= 4 && navigator.version < 5) { 
            eval('document.all["'+layerName+'"].visibility="hidden"');
        } else if (document.getElementById && document.body.style) { 
            eval('document.getElementById("'+layerName+'").style.visibility="hidden"');
        }
    }
}

// mouse out timer
function btnTimer() {
    timeOn = setTimeout("btnOut()",150);
}

// hide button on mouse out
function btnOut(layerName) {
    if (menuActive == 0) {
        hideLayer(onLayer);
    }
}

// menu mouseover
function menuOver(itemName) {
    clearTimeout(timeOn);
    menuActive = 1;
}

// menu mouse out 
function menuOut(itemName) {
    menuActive = 0;
    timeOn = setTimeout("hideLayer(onLayer)", 50);
}