﻿function SwapImage(id) {
	var button = document.getElementById(id);
	var source = button.src;
	var pos = source.search('Over');
	var dotpos = source.search('.');

	if (pos != -1) {
		
	}
	else {
		button.src = source.substring(0, dotpos) + 'Over.png';
	}
}

function SetImage(id, source)
{
	var button = document.getElementById(id);

	button.src = source;
}

function SetImageBack(id, offset)
{
	var img = document.getElementById(id);

	if (img != null)
	{
		if (img.style.backgroundPosition == '0px -80px')
			return;
		else
			img.style.backgroundPosition = '0px ' + offset + 'px';
	}
}

