/* ############################## MAIN NAV MENU ############################## */

// change mnav image off/on
function roll_mnav(num, oo) {
    var img = document.getElementById("mnav_" + num);

    var fname = img.src.substring(img.src.lastIndexOf("/") + 1);
    var sec = fname.substring(0, fname.lastIndexOf("_"));

    img.src = sec + "_" + oo + ".gif";
}

/* ############################## SUB NAV MENU ############################## */

// change snav image off/on
function roll_snav(num, oo) {
    var img = document.getElementById("snav_" + num);

    var fname = img.src.substring(img.src.lastIndexOf("/") + 1);
    var sec = fname.substring(0, fname.lastIndexOf("_"));

    img.src = sec + "_" + oo + ".gif";
}

/* ############################## TESTIMONIAL ############################## */

// print random testimonial
function do_testimonial() {
    var testimonials = new Array("There are big gaping holes in our domestic water supply, they're called fire hydrants.", "Glenn Cannon, FEMA, Director of Response, before the National Emergency Management Summit, March 5, 2007",
                                 "If a perpetrator is given access to a fire hydrant, it is the same as, if not worse than, giving him access to your treatment plant.", "Georgia, Texas, Louisiana Rural Water Associations",
                                 "The fire hydrant is the most accessible, visible and vulnerable item in your water distribution system.", "American Water Works Association");

    var index = Math.floor(Math.random() * (testimonials.length / 2)) * 2;

    document.write("<div class=\"saying\">\"" + testimonials[index] + "\"</div><br><div class=\"name\">" + testimonials[index + 1] + "</div>");
}

