// LoadPhoto (HTML-DIV containerElement, HTML-DIV photoElement)
// containerElement: DIV to put photocontents in
// photoElement: DIV to get photocontents from
//
//  mathieu@ahaweb.nl, may 2005
//
function loadPhoto(containerElement, photoElement)
{
	// Get both elements from DOM
	containerDiv = document.getElementById(containerElement);
	photoDiv = document.getElementById(photoElement);
	// --

	// Check if we need to store original containtercontent first for possibble later reference
	// Use 'try' to override 'not defined'-errors
	try
	{
		containerOriginal != null;
	}
	catch(e)
	{
		containerOriginal = containerDiv.innerHTML;
	}
	// --
	
	
	// If first photo was requested, use stored orginal containercontent
	if(photoElement == containerElement)
	{
		containerDiv.innerHTML = containerOriginal;	
	}
	//--
	// Else, use photocontents
	else
	{
		containerDiv.innerHTML = photoDiv.innerHTML;
	}
	//--
}
// --
