browserOK = true;
var Bilder = new Array();
var anzahlObj = 0;
var clickValue = -1;

function laden(name, erstes, zweites)
{
	if (browserOK)
	{
		Bilder[anzahlObj] = new Array(3);
		Bilder[anzahlObj][0] = new Image();
		Bilder[anzahlObj][0].src = erstes;
		Bilder[anzahlObj][1] = new Image();
		Bilder[anzahlObj][1].src = zweites;
		Bilder[anzahlObj][2] = name;
		anzahlObj++;
	}
}

function an(name)
{
	if (browserOK)
	{
		for (i = 0; i < anzahlObj; i++)
		{
			if (document.images[Bilder[i][2]] != null)
			{

				if (name != Bilder[i][2])
				{
					// alle anderen Bilder zuruecksetzen
					if (i != clickValue)
					{
						document.images[Bilder[i][2]].src = Bilder[i][0].src;
					}
				}
				else
				{
					document.images[Bilder[i][2]].src = Bilder[i][1].src;
				}
			}
		}
	}
}

function aus()
{
	if (browserOK)
	{
		// alle Bilder zuruecksetzen
		for (i = 0; i < anzahlObj; i++)
		{
			if ((document.images[Bilder[i][2]] != null) && (i != clickValue))
			{
				document.images[Bilder[i][2]].src = Bilder[i][0].src;
			}
		}
	}
}

function set(value)
{
	this.clickValue = value;

	// alle Bilder zuruecksetzen
	for (i = 0; i < anzahlObj; i++)
	{
		if ((document.images[Bilder[i][2]] != null) && (i != clickValue))
		{
			document.images[Bilder[i][2]].src = Bilder[i][0].src;
		}
	}
}