//  navbar.js 
// JavaScript Document
//  all the functions associated with the navigation page
//
window.onload = rolloverInit;

function rolloverInit()
{

	for (var i = 0; i<document.images.length; i++)
	{

		if (document.images[i].parentNode.tagName == "A")
		{
			setupRollover(document.images[i]);
		}
	}
}

function setupRollover(thisImage)
{
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;
	
	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/BTN/" + thisImage.id + "_over.jpg";
	thisImage.onmouseover = rollOver;
	
	thisImage.clickImage = new Image();
	thisImage.clickImage.src ="images/BTN/" + thisImage.id + "_click.jpg";
	thisImage.onclick = rollClick;
}

function rollOver()
{
	this.src = this.overImage.src;
}

function rollOut()
{
	this.src = this.outImage.src;
}

function rollClick()
{
	this.src = this.clickImage.src;
}
	
	
