// Detect if browser is Netscape 3 + or IE 4 +.
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
    if ((bName == "Netscape" && bVer >= 3) || 
        (bName == "Microsoft Internet Explorer" && bVer >= 4)) br = "n3"; 
    else br = "n2";

// Create image objects, preload all active and inactive images.
    if (br== "n3") { 
// Main Menu Buttons On
    indexOn = new Image();
    indexOn.src = "images/mainmenu/indexOn.gif";
    aboutOn = new Image();
    aboutOn.src = "images/mainmenu/aboutOn.gif";
    servicesOn = new Image();
    servicesOn.src = "images/mainmenu/servicesOn.gif"; 
    testimonialsOn = new Image();
    testimonialsOn.src = "images/mainmenu/testimonialsOn.gif";
    contactOn = new Image();
    contactOn.src = "images/mainmenu/contactOn.gif";


// Main Menu Buttons Off
    indexOff = new Image();
    indexOff.src = "images/mainmenu/indexOff.gif";
    aboutOff = new Image();
    aboutOff.src = "images/mainmenu/aboutOff.gif";
    servicesOff = new Image();
    servicesOff.src = "images/mainmenu/servicesOff.gif"; 
    testimonialsOff = new Image();
    testimonialsOff.src = "images/mainmenu/testimonialsOff.gif";
    contactOff = new Image();
    contactOff.src = "images/mainmenu/contactOff.gif";



}

// Function to "activate" image.
function act(imgName) {
    if (br == "n3") {
    document[imgName].src = eval(imgName + "On.src");


    }
}

// Function to "deactivate" image.
function inact(imgName) {
    if (br == "n3") {
    document[imgName].src = eval(imgName + "Off.src");

    }
}