// JavaScript Document

window.onload = rolloverImages;

// traditional rollover images

function rolloverImages() {
	for (var i=0; i<document.images.length; i++)
	{
		if (document.images[i].parentNode.tagName == "A")
		{
			setupRolloverImage (document.images[i]);
		}
	}
}

function setupRolloverImage (thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = function() {
		this.src = this.outImage.src;
	}
		
	thisImage.clickImage = new Image();
	thisImage.clickImage.src = "images/" + thisImage.id + "-ro.png";
	thisImage.onclick = function() {
		this.src = this.clickImage.src;
	}
	
	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + "-ro.png";
	thisImage.onmouseover = function() {
		this.src = this.overImage.src;
	}
}


