/*
 
Some JS functions to handle picture manipulation
Written by Matthias Seifert

V1.00  2009-12-27

*/

pics = new Array();

function InitChangePic()
{
	if(document.images)
	{
		var i;
		var Source;
		
		if(arguments.length > 0)
		{
			Source = arguments[0];
			for (i=1; i<arguments.length; i++)
			{
				pics[i] = new Array();
				pics[i]["up"]   = new Image(); pics[i]["up"].src   = Source + arguments[i] + ".gif";
				pics[i]["hl"]   = new Image(); pics[i]["hl"].src   = Source + arguments[i] + "_hl.gif";
				pics[i]["down"] = new Image(); pics[i]["down"].src = Source + arguments[i] + "_down.gif";
			}
		}
	}
}

function ChangePic(from,toindex,tostate)
{
	if(document.images)
	{
		document.images[from].src = pics[toindex][tostate].src;
	}
}

