//=============================================================================
// WebTools.UI.dll
// Rollover Image Button Script
// (C) 2006-2007 Cameron Albert
// www.cameronalbert.com
//=============================================================================
function WebToolsRollover_ChangeImage(imageControlId, imageUrl, captionControlId, captionText) 
{
	try
	{
		if (document.images) 
		{
			// Image
			var image = document.getElementById(imageControlId);
			if (image != null)
			{
				image.src = imageUrl;
				if (captionText != null) image.alt = captionText;
			}
			
			// Caption
			var caption = document.getElementById(captionControlId);
			if (caption != null)
			{
				caption.innerText = captionText;
			}
			
			return true;
		}
	}
	catch (ex)
	{
		//alert(ex.toString());
	}
	return false;
}

function WebToolsRollover_PreLoadImage(path) 
{
	try
	{
		if (document.images) 
		{
			result = new Image();
			result.src = path;
			return result;
		}
	}
	catch (ex)
	{
		//alert(ex.toString());
	}
	return null;
}