

function dm_show_supplement( target, explain, event )
{
	if( ( document.getElementById ) && navigator.appName.indexOf( "Netscape" ) != -1 )
	{
		x = scrollX + event.clientX + 10;
		y = scrollY + event.clientY + 10;

		if ( x + ( window.innerWidth / 2 - 40 ) > window.innerWidth )
		{
			x = window.innerWidth - ( window.innerWidth / 2 - 40 ) - 40;
		}

		document.getElementById("dmsupplement").style.left = x + "px";
		document.getElementById("dmsupplement").style.top = y + "px";
		document.getElementById("dmsupplement").style.width = ( window.innerWidth / 2 - 40 ) + "px";
		document.getElementById("dmsupplement").innerHTML = "<b>" + target + "</b><br>" + explain + "<br>";
		document.getElementById("dmsupplement").style.visibility = "visible";
	}

	else if ( document.all ) // for IE 4.0 or later
	{
		var CANVAS = document
		[ 'CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];

		document.all.dmsupplement.innerHTML = "<b>" + target + "</b><br>" + explain;

		x = event.x + 10 + CANVAS.scrollLeft;
		y = event.y + 10 + CANVAS.scrollTop;
		if ( x + ( document.body.clientWidth / 2 - 20 ) > document.body.clientWidth - 20)
		{
			x = document.body.clientWidth - ( document.body.clientWidth / 2 - 20 ) - 20;
		}
		document.all.dmsupplement.style.left = x;
		document.all.dmsupplement.style.top = y;
		document.all.dmsupplement.style.width = document.body.clientWidth / 2 - 20;
		document.all.dmsupplement.style.visibility = "visible";
	}

}


function dm_move_supplement( event )
{
	if ( document.all ) // for IE 4.0 or later
	{
		x = event.x + 10 + document.body.scrollLeft;
		y = event.y + 10 + document.body.scrollTop;
		if ( x + ( document.body.clientWidth / 2 - 20 ) > document.body.clientWidth - 20 )
		{
			x = document.body.clientWidth - ( document.body.clientWidth / 2 - 20 ) - 20;
		}

		document.all.dmsupplement.style.left = x;
		document.all.dmsupplement.style.top = y;
		document.all.dmsupplement.style.width = document.body.clientWidth / 2 - 20;
	}

}


function dm_hide_supplement()
{
	if( ( document.getElementById ) && navigator.appName.indexOf( "Netscape" ) != -1 )
	{
		document.getElementById("dmsupplement").style.visibility = "hidden";
		document.getElementById("dmsupplement").style.left = 0;
		document.getElementById("dmsupplement").style.top = 0;
		document.getElementById("dmsupplement").style.width = 1;
		document.getElementById("dmsupplement").style.height = 1;
	}
	else if ( document.all ) // for IE 4.0 or later
	{
		document.all.dmsupplement.innerHTML = "";
		document.all.dmsupplement.style.visibility = "hidden";
		document.all.dmsupplement.style.left = 0;
		document.all.dmsupplement.style.top = 0;
		document.all.dmsupplement.style.width = 1;
		document.all.dmsupplement.style.height = 1;
	}
}


