<!--
function ShowMessage(strMessage, e)
{
	var oDiv = document.getElementById("ErrorDiv");
	var xcoord, ycoord;
	if(oDiv)
	{
		var tmp = GetCoords(e);
		if(tmp.length == 0) return; //Couldn't find the coordinates
		coords = tmp.split(",");
		xcoord = parseInt(coords[0],10);
		ycoord = parseInt(coords[1],10);
		oDiv.style.display = "";
		oDiv.style.left = xcoord+10;
		oDiv.style.top = ycoord-5;
		oDiv.innerHTML = strMessage;
		DivSetVisible(oDiv, true);
	}
}

function GetCoords(e)
{
	var xcoord, ycoord;
	if( !e )
	{
		if( window.event )
		{
			// DOM
			e = window.event;
		}
		else
		{
			// no way to reference the event
			return "";
		}
	}
	if( typeof( e.pageX ) == 'number' )
	{
		// NS 4, NS 6+, Mozilla 0.9+
		xcoord = e.pageX;
		ycoord = e.pageY;
	}
	else
	{
		if( typeof( e.clientX ) == 'number' )
		{
			// IE, Opera, NS 6+, Mozilla 0.9+
			// except that NS 6+ and Mozilla 0.9+ did pageX ...
			xcoord = e.clientX;
			ycoord = e.clientY;
			if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) )
			{
				if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )
				{
					//IE 4, 5 &amp; 6 (in non-standards compliant mode)
					xcoord += document.body.scrollLeft;
					ycoord += document.body.scrollTop;
				}
				else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
				{
					//IE 6 (in standards compliant mode)
					xcoord += document.documentElement.scrollLeft;
					ycoord += document.documentElement.scrollTop;
				}
			}
		}
		else
		{
			// no way to obtain accurate coordinates
			return "";
		}
	}
	return xcoord+","+ycoord;
}

function DivSetVisible(oDiv, bState)
{
	var IfrRef = document.getElementById('Shim');
	if(!IfrRef || !oDiv) return;
	
	if(bState)
	{
		oDiv.style.display = "block";
		IfrRef.style.width = oDiv.offsetWidth;
		IfrRef.style.height = oDiv.offsetHeight;
		IfrRef.style.top = oDiv.style.top;
		IfrRef.style.left = oDiv.style.left;
		IfrRef.style.zIndex = oDiv.style.zIndex - 1;
		IfrRef.style.display = "block";
	}
	else
	{
		IfrRef.style.display = "none";
	}
}

function HideMessage()
{
	var oDiv = document.getElementById("ErrorDiv");
	if(oDiv)
	{
		oDiv.style.display = "none";
		DivSetVisible(oDiv, false);
	}
}
-->