var tgImage = document.getElementById("showImg");
var tgControls =  document.getElementById("winnercontrols");

function drawShowcaseControls()
{
	if(images.length > 1)
	{
		for(x = 0; x < images.length; x++)
		{			
			if(document.all) // if IE, give it the IE tailored solution
			{
				button = document.createElement('<A onclick="showImage('+x+'); return false;"></a>');
			}
			else
			{
				button = document.createElement('A');
				button.setAttribute('onclick','showImage('+x+'); return false;');
			}
			buttonText = document.createTextNode(x+1);	
			button.appendChild(buttonText);	
			tgControls.appendChild(button);	
		}
	}	
}

function showImage(id)
{
	tgImage.src = images[id];
}

window.onload = buildShowcase;
