//------------------------------------------------------------
//javascript by ＠うさ http://www.usagi-js.com/
//------------------------------------------------------------
//表示する文字列
var strMoji = new Array("一つ目の説明", "二つ目の説明");
//マウスの座標
var nXPos = 0;
var nYPos = 0;
//レイヤーの座標
var nLayerXPos = 0;
var nLayerYPos = 0;
/////////////////////////////////////////////////////////////////////////////
//StartShow Function
//引数 nNumber:表示するstrMoji（０から）、 fType:True表示、false非表示
//strColor:フォントカラー(NC6とOpera以外)、strBackColor:バックカラー(NC6以外)
/////////////////////////////////////////////////////////////////////////////
function StartShow(nNumber, fType, text)
{
	strBackColor='white';
	//レイヤーの座標をセット。好きな値に変更してください。
	//X軸、Y軸を+値、もしくは-値にすれば、好きな場所に固定されます。
	nLayerXPos = nXPos - nNumber;
	nLayerYPos = nYPos + 10;
	//strHtml = "<font color = '"+strColor+"'>"+strMoji[nNumber]+"</a>";
	strHtml = "<TABLE CELLPADDING=\"1\" CELLSPACING=\"1\" BGCOLOR=\"000000\" border=\"0\"><TR><TD BGCOLOR=\"FFE0E0\"nowrap>" + text + "</TD></TR></TABLE>";
	//NNの場合
	if (document.layers)
	{
		if (fType)
		{
			//レイヤーの幅と高さをマウス座標にセット
			document.linklayer.left = nLayerXPos;
			document.linklayer.top = nLayerYPos;
			//内容設定変更
			document.linklayer.document.write(strHtml);
			document.linklayer.document.close();
			//背景色
			document.linklayer.bgColor = strBackColor;
			//表示
			document.linklayer.visibility = "show";
		}
		else
		{
			//非表示
			document.linklayer.visibility = "hide";	
		}
	}
	//IEとNC6の場合
	if (document.getElementById)
	{	
		if (fType)
		{	
			//レイヤーの幅と高さをマウス座標にセット
			document.getElementById("linklayer").style.left = nLayerXPos;
			document.getElementById("linklayer").style.top = nLayerYPos;
			//内容設定変更
			document.getElementById("linklayer").innerHTML = strHtml;
			//背景色
			document.getElementById("linklayer").style.background = strBackColor;
			//表示
			document.getElementById("linklayer").style.visibility="visible";
		}
		else
		{
			//非表示
			document.getElementById("linklayer").style.visibility="hidden";
		}
	}
	
}
//マウスが動くとここにまず入ります。
//Netscapeの場合
if (navigator.appName=="Netscape")
{
	function nMouse(e)
	{
		nXPos = e.pageX;
		nYPos = e.pageY;
	}
	//NN4
	if (document.layers)
	{
		window.captureEvents(Event.MOUSEMOVE);
		window.onMouseMove = nMouse;
	}
	//NC6
	else
	{
		document.onmousemove = nMouse;
	}
}
//IEの場合
else
{
	function iMouse()
	{
		nXPos = event.x+document.body.scrollLeft;
		nYPos = event.y+document.body.scrollTop;
	}
	document.onmousemove = iMouse;
}
