window.onload = rolloverInit;

// Start preload images 
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/" + thisImage.id + "_on.png";
		thisImage.onmouseover = rollOver;
}

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

function rollOver()
{
	this.src = this.overImage.src;	
}
// End preload images


function showHand(thisID)
{
	document.getElementById("contactButton").style.cursor = "pointer";
	document.getElementById("linksButton").style.cursor = "pointer";	
}

function showNormal()
{
	document.getElementById("contactButton").style.cursor = "default";
	document.getElementById("linksButton").style.cursor = "default";
}


function showContact()
{
	// Turn contact button ON and links button OFF
	document.getElementById("contactButton").src = "images/contact_on.png";
	document.getElementById("linksButton").src = "images/links_off.png";
	
	// Turn contact page ON and links page OFF
	document.getElementById("contactContent").style.display = "block";
	document.getElementById("linksContent").style.display = "none";
}

function showLinks()
{
	// Turn links button ON and contact button OFF
	document.getElementById("linksButton").src = "images/links_on.png";
	document.getElementById("contactButton").src = "images/contact_off.png";
	
	// Turn links page ON and contact page OFF
	document.getElementById("linksContent").style.display = "block";
	document.getElementById("contactContent").style.display = "none";
}

