﻿function getElement(id)
{
	if(document.all)
	{
		return document.all[id];
	}
	else if(document.getElementById)
	{
		return document.getElementById(id);
	}
	else if(document.layers)
	{
		return document.layers[id];
	}
	else
	{
		alert('This browser doesn\'t support "document.all", "document.layers", or "document.getElementById". (Fix this).');
		return null;
	}
}

var imagePath = '/Media/Images/WebsiteElements/';

function getImageRoot(str)
{
	var slash = str.lastIndexOf('/') + 1;
	return str.substring(slash, str.lastIndexOf('_')); 
}

function btn_over(obj)
{
	obj.src = imagePath + getImageRoot(obj.src) + '_over.gif';
}

function btn_out(obj)
{
	obj.src = imagePath + getImageRoot(obj.src) + '_up.gif';
}

function btn_down(obj)
{
	obj.src = imagePath + getImageRoot(obj.src) + '_down.gif';
}