addLoadEvent(startit);

function startit()
{
var theimages = document.getElementsByTagName("area");
	for (i=0;i<theimages.length;i++) {
		if (theimages[i].className.indexOf("navlink") > -1) {
		thecurrentlink = theimages[i].getAttribute("href");
		loadimages(theimages[i],thecurrentlink);
		}
	}
}

function loadimages(theimage,thecurrentlink)
{

thepic = document.getElementById("navimage");
theimage.first = new Image();
theimage.first.src = "images/navigationbar.png";

theimage.second = new Image();
theimage.second.src = "images/"+theimage.id+"2.png";

var thecurrentpage = window.location.href;

    if (thecurrentpage.indexOf(thecurrentlink) > -1) {
		thepic.src=theimage.second.src;
        theimage.first.src="images/"+theimage.id+"2.png";
        return false;
	}

theimage.onmouseover = swapover;
theimage.onmouseout =  swapback;
}


function swapover()
{
thepic = document.getElementById("navimage");
thepic.src = this.second.src;
}

function swapback()
{
thepic = document.getElementById("navimage");
thepic.src = this.first.src;
}



	