// Image Rollovers
// Written by Adam Venturella
// 22 October 2005

function imageRollOver(image_name, image_type)
{
	this.type             = image_type;
	this.target           = image_name;
	this.sourceImage  	  = document[this.target].src;
	this.highlightImage   = "/images/btn_"+this.type+"_1_"+this.target+".gif";
	
	// what are our methods:
	this.mouse_over = function() 
	{
		document[this.target].src=this.highlightImage;
	}

	this.mouse_out = function() 
	{
		document[this.target].src=this.sourceImage;
	}
}


function activate(target, state, type)
{	
	
	switch (state)
	{
		case 'over':
			imageState = new imageRollOver(target, type);
			imageState.mouse_over();	
			break;
		
		case 'out':
			imageState.mouse_out();
			break;
	}
}
