var loaded = false;

homeOff = new Image;homeOff.src= "images/nav/home.gif";
aboutOff = new Image;aboutOff.src= "images/nav/about.gif";
productOff = new Image;productOff.src= "images/nav/product.gif";
contactOff = new Image;contactOff.src= "images/nav/contact.gif";

patientsOff = new Image;patientsOff.src= "images/nav/patients.gif";
healthOff = new Image;healthOff.src= "images/nav/health.gif";
businessOff = new Image;businessOff.src= "images/nav/business.gif";

box_healthOff   = new Image;box_healthOff.src  = "images/home/box_health.gif";
box_patientsOff = new Image;box_patientsOff.src= "images/home/box_patients.gif";
box_businessOff = new Image;box_businessOff.src= "images/home/box_business.gif";



function imageLoad(){
    homeOn = new Image;homeOn.src= "images/nav/home_on.gif";
    aboutOn = new Image;aboutOn.src= "images/nav/about_on.gif";
    productOn = new Image;productOn.src= "images/nav/product_on.gif";
    contactOn = new Image;contactOn.src= "images/nav/contact_on.gif";
    
    patientsOn = new Image;patientsOn.src= "images/nav/patients_on.gif";
    healthOn = new Image;healthOn.src= "images/nav/health_on.gif";
    businessOn = new Image;businessOn.src= "images/nav/business_on.gif";

    box_healthOn   = new Image;box_healthOn.src  = "images/home/box_healthOn.gif";
    box_patientsOn = new Image;box_patientsOn.src= "images/home/box_patientsOn.gif";
    box_businessOn = new Image;box_businessOn.src= "images/home/box_businessOn.gif";

    return (loaded = true);
}

function imgOn(imgName){
    if (loaded == true){
        if(document.layers){
            document.divTopNav.document[imgName].src = eval(imgName + "On.src");
        }else{
            document[imgName].src = eval(imgName + "On.src");
        }
    }
}

function imgOff(imgName){
        if(document.layers){
            document.divTopNav.document[imgName].src = eval(imgName + "Off.src");
        }else{
            document[imgName].src = eval(imgName + "Off.src");
        }
}

function highLightLeftNav(currentTD, color){
    //currentTD.style.backgroundImage='none';
    if (color == 'purple'){
        currentTD.style.border='1px solid #A99CFF';
    }
    if (color == 'orange'){
        currentTD.style.border='1px solid #F3A67C';
    }
    if (color == 'green'){
        currentTD.style.border='1px solid #34908E';
    }
} 
function deLightLeftNav(currentTD, color){
    currentTD.style.borderLeft='1px solid white';
    currentTD.style.borderTop='1px solid white';
    currentTD.style.borderRight='1px solid white';
    if (color == 'purple'){
        //currentTD.style.backgroundImage='url("images/leftNavBG_purple.gif")';
        currentTD.style.borderBottom='1px solid #F2F0FF';
    }
    if (color == 'orange'){
        //currentTD.style.backgroundImage='url("images/leftNavBG_orange.gif")';
        currentTD.style.borderBottom='1px solid #FBE6D8';
    }
    if (color == 'green'){
        //currentTD.style.backgroundImage='url("images/leftNavBG_green.gif")';
        currentTD.style.borderBottom='1px solid #D5F0EE';
    }
}