// 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") { 
    img1on = new Image();
    img1on.src = "../images/namg.gif";  // Active NAM image.
    img2on = new Image();
    img2on.src = "../images/gfsg.gif";  // Active GFS image.
    img3on = new Image();
    img3on.src = "../images/ngmg.gif";  // Active NGM image.
    img4on = new Image();
    img4on.src = "../images/rucg.gif";  // Active RUC image.
    img5on = new Image();
    img5on.src = "../images/wrfg.gif";  // Active WRF image.
    img6on = new Image();
    img6on.src = "../images/ensg.gif";  // Active Ensemble image.
    img7on = new Image();
    img7on.src = "../images/arpg.gif";  // Active ARPS image.
    img8on = new Image();
    img8on.src = "../images/ecmg.gif";  // Active ECMWF image.
    img9on = new Image();
    img9on.src = "../images/mm5g.gif";  // Active MM5 image.
    img10on = new Image();
    img10on.src = "../images/nogg.gif";  // Active NOGAPS image.
    img11on = new Image();
    img11on.src = "../images/ukmetg.gif";  // Active UKMET image.



    img1off = new Image();
    img1off.src = "../images/namb.gif"; // Inactive NAM image
    img2off = new Image();
    img2off.src = "../images/gfsb.gif"; // Inactive GFS image
    img3off = new Image();
    img3off.src = "../images/ngmb.gif"; // Inactive NGM image
    img4off = new Image();
    img4off.src = "../images/rucb.gif"; // Inactive RUC image
    img5off = new Image();
    img5off.src = "../images/wrfb.gif"; // Inactive WRF image
    img6off = new Image();
    img6off.src = "../images/ensb.gif"; // Inactive Ensemble image
    img7off = new Image();
    img7off.src = "../images/arpb.gif"; // Inactive ARPS image
    img8off = new Image();
    img8off.src = "../images/ecmb.gif"; // Inactive ECMWF image
    img9off = new Image();
    img9off.src = "../images/mm5b.gif"; // Inactive MM5 image
    img10off = new Image();
    img10off.src = "../images/nogb.gif"; // Inactive NOGAPS image
    img11off = new Image();
    img11off.src = "../images/ukmetb.gif"; // Inactive UKMET image


    img1ad = new Image();
    img1ad.src = "../images/namdes.gif"; // Secondary NAM image
    img2ad = new Image();
    img2ad.src = "../images/gfsdes.gif"; // Secondary GFS image
    img3ad = new Image();
    img3ad.src = "../images/ngmdes.gif"; // Secondary NGM image
    img4ad = new Image();
    img4ad.src = "../images/rucdes.gif"; // Secondary RUC image
    img5ad = new Image();
    img5ad.src = "../images/wrfdes.gif"; // Secondary WRF image
    img6ad = new Image();
    img6ad.src = "../images/ensdes.gif"; // Secondary Ensemble image
    img7ad = new Image();
    img7ad.src = "../images/arpdes.gif"; // Secondary ARPS image
    img8ad = new Image();
    img8ad.src = "../images/ecmdes.gif"; // Secondary ECMWF image
    img9ad = new Image();
    img9ad.src = "../images/mm5des.gif"; // Secondary MM5 image
    img10ad = new Image();
    img10ad.src = "../images/nogdes.gif"; // Secondary NOGAPS image
    img11ad = new Image();
    img11ad.src = "../images/ukmetdes.gif"; // Secondary UKMET image
}

// Function to "activate" images.
function imgAct(imgName) {
    if (br == "n3") {
       document[imgName].src = eval(imgName + "on.src");
       document["holder"].src = eval(imgName + "ad.src");
    }
}

// Function to "deactivate" images.
function imgInact(imgName) {
    if (br == "n3") {
       document[imgName].src = eval(imgName + "off.src");
       document["holder"].src = "../images/clear.gif";
    }
}

