/*
 * Copyright (c) 2009 Mikael Relbe
 *
 * Slideshow presenter
 *
*/

function PresentSlideShow(title, subtitle, description, fileName, width, height)
{
	var titleDivHeight = (document.documentElement.clientHeight - height) / 2;
	var titleDivStyle = 'height: ' + Math.max(64, titleDivHeight) + 'px;';

	document.write('<div style="text-align:center">');

	// title
	// subtitle
	document.write('<div style="' + titleDivStyle + '"><p class="gallerytitle">' + title + '</p><p>' + subtitle + '</p></div>');

	// Photodex Presenter Object
	document.write('<div style="width:' + (width + 24 + 48) + 'px">');
	document.write('<div class="image" style="text-align:center;margin-bottom:30px;width:' + width + 'px;height:' + height + 'px">');

	// Call Photodex Presenter code
	PresenterObject("ProShow", "objectname", fileName, width, height, true);

	document.write ('</div>');
	document.write ('</div>');

	// description
	if (description.length>0)
		document.write('<p style="text-align:center">' + description + '<br /><br /></p>');

	document.write ('</div>');
}