function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		home_over = newImage("images/home-over.gif");
		about_over = newImage("images/about-over.gif");
		advert_over = newImage("images/advert-over.gif");
		links_over = newImage("images/links-over.gif");
		calendar_over = newImage("images/calendar-over.gif");
		archive_over = newImage("images/archive-over.gif");
		preloadFlag = true;
	}
}

preloadImages();


function toggleDivOn(whichID)
{
    if (document.getElementById)
    {
        // this is the way the standards work
        var style2 = document.getElementById(whichID).style;
        style2.display = "block";
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        var style2 = document.all[whichID].style;
        style2.display = "block";
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        var style2 = document.layers[whichID].style;
        style2.display = "block";
    }
}   

function toggleDivOff(whichID)
{
    if (document.getElementById)
    {
        // this is the way the standards work
        var style2 = document.getElementById(whichID).style;
        style2.display = "none";
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        var style2 = document.all[whichID].style;
        style2.display = "none";
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        var style2 = document.layers[whichID].style;
        style2.display = "none";
    }
} 

function toggleBGon(whichID)
{
    if (document.getElementById)
    {
        // this is the way the standards work
        var style3 = document.getElementById(whichID).style;
        style3.backgroundColor = "#d7c24c";
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        var style3 = document.all[whichID].style;
        style3.backgroundColor = "#d7c24c";
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        var style3 = document.layers[whichID].style;
        style3.backgroundColor = "#d7c24c";
    }
}    

function toggleBGoff(whichID)
{
    if (document.getElementById)
    {
        // this is the way the standards work
        var style3 = document.getElementById(whichID).style;
        style3.backgroundColor = "#4d4d4d";
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        var style3 = document.all[whichID].style;
        style3.backgroundColor = "#4d4d4d";
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        var style3 = document.layers[whichID].style;
        style3.backgroundColor = "#4d4d4d";
    }
}