//funtion to select a menu and go
function jumpPage(newLoc) {
    newPage = newLoc.options[newLoc.selectedIndex].value
    if (newPage != "") {
        window.location.href = newPage
    }
}
//end of funtion to select a menu and go

//start function to change image rollovers//

if (document.images) {


}
function ImgRoll(imgName, newImg) {

    if (document.images) {
        document[imgName].src = eval(newImg + ".src")
    }
}
function Head_highlight(id) {
}
function Head_Normal(id) {
}

function highlightPage(id, imgName2) {
    //alert(imgName2);
    document.getElementById(id).src = eval(imgName2 + ".src")
}

//pop up window function//

leftPos = 0
if (screen) {
    leftPos = screen.width - 800
}

var activeSub = 0;
var SubNum = 0;

//global variables

var timerID = null;
var timerOn = false;
var timecount = 1000;
var what = null;
var newbrowser = true;
var check = false;

function init() {
    if (document.layers) {
        layerRef = "document.layers";
        styleSwitch = "";
        visibleVar = "show";
        screenSize = window.innerWidth;
        what = "ns4";

    } else if (document.all) {
        layerRef = "document.all";
        styleSwitch = ".style";
        visibleVar = "visible";
        screenSize = document.body.clientWidth + 10;
        what = "ie";

    } else if (document.getElementById) {
        layerRef = "document.getElementByID";
        styleSwitch = ".style";
        visibleVar = "visible";
        what = "moz";

    } else {
        what = "none";
        newbrowser = false;
    }

    window.status = '';
    check = true;
}

// This Function turns the layers on and off
function showLayer(layerName) {
    //alert(layerName);
    if (check) {
        if (what == "none") {
            return;
        }
        else if (what == "moz") {
            document.getElementById(layerName).style.visibility = "visible";
        }
        else {
            eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility="visible"');
        }
    }
    else {
        return;
    }
}

function hideLayer(layerName) {
    if (check) {
        if (what == "none") {
            return;
        }
        else if (what == "moz") {
            document.getElementById(layerName).style.visibility = "hidden";
        }
        else {
            eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility="hidden"');
        }

    }
    else {
        return;
    }
}

function hideAll() {
    hideLayer('nav1');
    hideLayer('nav2');
    hideLayer('nav3');
    hideLayer('nav4');
    hideLayer('nav5');
    hideLayer('nav6');
    hideLayer('nav7');
}

function startTime() {
    if (timerOn == false) {
        timerID = setTimeout("hideAll()", timecount);
        timerOn = true;
    }
}

function stopTime() {
    if (timerOn) {
        clearTimeout(timerID);
        timerID = null;
        timerOn = false;
    }
}

function onLoad() {
    init();

}

function showmenu(elmnt1, elmnt2) {
    document.getElementById(elmnt2).style.visibility = "hidden";
    document.getElementById(elmnt1).style.visibility = "visible";
}

function hidemenu(elmnt1, elmnt2) {
    document.getElementById(elmnt2).style.visibility = "visible";
    document.getElementById(elmnt1).style.visibility = "hidden";
}

