function SwapBeforeAfterPicture(imageSource, caption)
{
	SwapPicture('beforeAfterGallery', imageSource);
	SetCaption('imageCaption', caption);
}

function SwapPicture(imageContainer, imageSource)
{				
	if (document.all)
	{
		document.getElementById(imageContainer).style.filter='blendTrans(duration=1)';
		document.getElementById(imageContainer).filters.blendTrans.Apply();
	}
	
	document.getElementById(imageContainer).src = imageSource;
	if (document.all)
	{
		document.getElementById(imageContainer).filters.blendTrans.Play();
	}
}

function SetCaption(captionContainer, caption)
{
	var captionControl = document.getElementById(captionContainer);

	if (captionControl)
	{
		captionControl.innerHTML = caption;
	}
}
