var lastMousedOverItem;

function onLoadHandler(selectedItem)
{
	lastMousedOverItem = document.getElementById("selectedListItem");
	
	return;
}

function mouseOverHandler(mousedOverItem, photographerName, imageLocation)
{
	var photographerNameElement = document.getElementById("photographerName");
	var largeImageElement = document.getElementById("largeImage");
	
	// Change the class of the last moused over item back to normal so there is no halo.
	if(lastMousedOverItem)
	{
		var indexOfSelected = lastMousedOverItem.className.indexOf("selected");
		
		if(indexOfSelected > -1)
		{
			lastMousedOverItem.className = lastMousedOverItem.className.substring(0,indexOfSelected);
		}
	}
	
	// Change the class of the item being moused over so that the halo appears.	
	mousedOverItem.className = mousedOverItem.className + " selected";
	
	largeImageElement.src = imageLocation;
	
	photographerNameElement.innerHTML = photographerName;
	
	// Set the current item to the last item.
	lastMousedOverItem = mousedOverItem;
	
	return;
}