function resizeShadowImages()
{

	var mainContainer = document.getElementById("mainContainer");
	var shadowLeft = document.getElementById("shadowLeft");
	var shadowRight = document.getElementById("shadowRight");
	var shadowTop = document.getElementById("shadowTop");
	var shadowBottom = document.getElementById("shadowBottom");
	
	// Disable shadows in IE.
	/*
	if (navigator.appName == "Microsoft Internet Explorer")
	{
	//	shadowTop.height = 0;
	//	shadowLeft.height = 0;
	//	shadowRight.height = 0;
		shadowBottom.style.background = "";
	//	return;
	}
	*/
	shadowLeft.height = mainContainer.scrollHeight;
	shadowRight.height = mainContainer.scrollHeight;
}

function periodicResizeShadowImages()
{
	// resize parent shadow images.
	var mainContainer = document.getElementById("mainContainer");
	var shadowLeft = document.getElementById("shadowLeft");
	var shadowRight = document.getElementById("shadowRight");
	var shadowTop = document.getElementById("shadowTop");
	var shadowBottom = document.getElementById("shadowBottom");

	// Disable shadows for IE.
	/*
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		shadowTop.height = 0;
		shadowLeft.height = 0;
		shadowRight.height = 0;
		shadowBottom.style.background = "";
		return;
	}
	*/
	var oldHeight = mainContainer.scrollHeight;

	shadowLeft.height = 1;
	shadowRight.height = 1;

	var newHeight = mainContainer.scrollHeight;

	shadowLeft.height = mainContainer.scrollHeight;
	shadowRight.height = mainContainer.scrollHeight;


	// If heights have changed.
	if (oldHeight != newHeight)
	{

		// Give focus back to top of page.
		self.scrollTo(0, 0);
	}

	// Queue up to resize images.
	var t = setTimeout('periodicResizeShadowImages()', 500);
}
