if (document.images) {
    mocoff = new Image();
    mocoff.src = "/img/nav/moc_off.gif";
    dpsoff = new Image();
    dpsoff.src = "/img/nav/dps_off.gif";
    pegoff = new Image();
    pegoff.src = "/img/nav/peg_off.gif";
    bufpuboff = new Image();
    bufpuboff.src = "/img/nav/bufpub_off.gif";

    mocon = new Image();
    mocon.src = "/img/nav/moc_on.gif";
    dpson = new Image();
    dpson.src = "/img/nav/dps_on.gif";
    pegon = new Image();
    pegon.src = "/img/nav/peg_on.gif";
    bufpubon = new Image();
    bufpubon.src = "/img/nav/bufpub_on.gif";
}

// Function to 'activate' images.

function imgOn(imgName) {
	if (document.images) {
	    idName = document.getElementById(imgName);
        idName.src = eval(imgName + "on.src");
	}
}

// Function to 'deactivate' images.

function imgOff(imgName) {
	if (document.images) {
		idName = document.getElementById(imgName);
        idName.src = eval(imgName + "off.src");
	}
}

// Function to create dynamic pop up window, currently set to center window on screen.

function newWindow(url, wid, hgt, windowName) {
    if (screen) {
        widthOfScreen = screen.width;
        heightOfScreen = screen.height;
    }
    midX = widthOfScreen / 2;
    midY = heightOfScreen / 2;
    midWid = wid / 2;
    midHgt = hgt / 2;
    x = midX - midWid;
    y = midY - midHgt;
    windowOpts = "width=" + wid + ",height=" + hgt + ",scrollbars=yes,resizable=yes,status=yes,location=yes,menubar=yes,toolbar=yes,left=" + x + ",top=" + y;
    popUpWindow = window.open(url, windowName, windowOpts);
}

