function prepareGallery()
{
	var links = document.getElementById("showcase").getElementsByTagName("a");
	for(var i=0; i<links.length; i++)
	{
		links[i].onmouseover = function()
		{
			// get the div within showcase (A -> LI -> UL -> DIV)		
			var div = this.parentNode.parentNode.parentNode.id;
			return showPic(this, div);
		}
		links[i].onclick = function()
		{
			return false;
		}
	}
}

function showPic(whichpic, div)
{
	var source = whichpic.getAttribute("href");
	var placeholder = document.getElementById("placeholder-" + div);
	if(placeholder.nodeName != "IMG") return true;
	placeholder.setAttribute("src",source);
	return false;
}

addLoadEvent(prepareGallery);