// Resize the slideshow imagesaddLoadListener(resizeSlideshow);function resizeSlideshow(){	if(!document.getElementsByTagName) return false;	if(document.getElementById("slideshowsummary")) {		var image = document.getElementById("enlarge");	// Work out the height of the viewport	var viewportHeight = getViewportHeight();		// work out the distance from the top of the viewport to the top of the image	var positionEnlarge = getPosition(image);		//Define the sizes of the image	// height = viewportHeight less distance to the top of the image less distance for 'chrome' around the image	var resizeWidth = 594;	var resizeHeight = viewportHeight-positionEnlarge-15;			var width = image.clientWidth;	var height = image.clientHeight;	var aspect = width/height;	//alert ("Original: "+ width +" x "+ height);			// Image is landscape		if (width > height) {				// Check to see if it is larger than the resize dimensions		if (width >= resizeWidth) {			finalWidth=resizeWidth;			finalHeight=resizeWidth/aspect;						// If the height is higher than the resize height			if (finalHeight >= resizeHeight) {				// Resize it based on the height				image.setAttribute("height",resizeHeight);					//alert ("Resized: "+ Math.round(resizeHeight*aspect) +" x "+ resizeHeight);			} else {				//Just resize it based on the width				image.setAttribute("width",resizeWidth);								//alert ("Resized: "+ resizeWidth +" x "+ Math.round(resizeWidth/aspect));			}		} //else {			// It isn't wider than the resize width so scale on the height.			//image.setAttribute("height",resizeHeight);				//alert ("Resized: "+ Math.round(resizeHeight*aspect) +" x "+ resizeHeight);		//} 	}			// Image is Portrait or square	if (width <= height && height > resizeHeight) {			// We need to check that the width isn't greater than the resize width before determining the final height			finalWidth=resizeHeight*aspect;			if (finalWidth > resizeWidth) {				resizeHeight = finalHeight=resizeWidth/aspect;			}						image.setAttribute("height",resizeHeight);			}			// This is a little hack to fix a rendering issue in IE6 where the position of the 	// TLF id isn't repositioned correctly after the image has been resized	var tlf = document.getElementById("tlf");	tlf.style.bottom = 0;		}}function getViewportHeight(){	var size = [0,0];	if (typeof window.innerWidth != 'undefined')	{		size = [			window.innerHeight			];	}	else if (typeof document.documentElement != 'undefined'	&& typeof document.documentElement.clientWidth != 'undefined' 	&& document.documentElement.clientWidth != 0)	{		size = [			document.documentElement.clientHeight			];	}	else if (document.getElementsByTagName('body')[0] != null)	{		size = [			document.getElementsByTagName('body')[0].clientHeight			];	}	return size;};function getPosition(theElement){    var positionY = 0;    while (theElement != null)    {        positionY += theElement.offsetTop;        theElement = theElement.offsetParent;    }        return [positionY];};