	function ShowOverlay(sMessage, bDone)
	{

		if (window.innerHeight && window.scrollMaxY)// Firefox
			yWithScroll = window.innerHeight + window.scrollMaxY;
		else if (document.body.scrollHeight > document.body.offsetHeight)// all but Explorer Mac
			yWithScroll = document.body.scrollHeight;
		else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
			yWithScroll = document.body.offsetHeight;

		document.getElementById("spnMessage").innerHTML = sMessage;
		document.getElementById("divAjaxOverlay").style.height = yWithScroll + "px";

		if(bDone)
		{
			document.getElementById("imgProcessing").style.display = "none";
			document.getElementById("btnClose").style.display = "block";
		}
		else
		{
			document.getElementById("btnClose").style.display = "none";
			document.getElementById("imgProcessing").style.display = "block";
		}
		document.getElementById("divMessageBox").style.display = "block";
		document.getElementById("divAjaxOverlay").style.display = "block";

	}

	function ShowImageOverlay(sImage)
	{

		if (window.innerHeight && window.scrollMaxY)// Firefox
			yWithScroll = window.innerHeight + window.scrollMaxY;
		else if (document.body.scrollHeight > document.body.offsetHeight)// all but Explorer Mac
			yWithScroll = document.body.scrollHeight;
		else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
			yWithScroll = document.body.offsetHeight;

		// document.getElementById("divImage").style.backgroundImage = sImage.replace("url(", "url('").replace(")","')").replace("_2_","_4_");
		document.getElementById("divImage").style.backgroundImage = sImage.replace("_2_","_4_");
		document.getElementById("divImageBox").style.display = "block";
		document.getElementById("divAjaxOverlay").style.display = "block";
	}

	function ShowImageOverlaySmall(sImage)
	{

		if (window.innerHeight && window.scrollMaxY)// Firefox
			yWithScroll = window.innerHeight + window.scrollMaxY;
		else if (document.body.scrollHeight > document.body.offsetHeight)// all but Explorer Mac
			yWithScroll = document.body.scrollHeight;
		else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
			yWithScroll = document.body.offsetHeight;		
		document.getElementById("divImage2").style.backgroundImage = sImage.replace("url(", "url('").replace(")","')").replace("_1_","_2_");
		document.getElementById("divImageBox2").style.display = "block";
		document.getElementById("divAjaxOverlay").style.display = "block";
	}	


	function HideOverlay()
	{
		document.getElementById("divAjaxOverlay").style.display = "none";
		document.getElementById("divImageBox").style.display = "none";
		document.getElementById("divMessageBox").style.display = "none";
	}
	function HideOverlay2()
	{
		document.getElementById("divAjaxOverlay").style.display = "none";
		document.getElementById("divImageBox2").style.display = "none";
		document.getElementById("divMessageBox").style.display = "none";
	}

