// ポイントすると、ボタンが緑色になる
function change_green(object_name, object_num, kaiso)
{
	if(kaiso == 0)
	{
		document.index[object_num].src = "pic/" + object_name + "g.jpg";
	}
	else if(kaiso == 1)
	{
		document.index[object_num].src = "../pic/" + object_name + "g.jpg";
	}
	else if(kaiso == 2)
	{
		document.index[object_num].src = "../../pic/" + object_name + "g.jpg";
	}
}

// ポイントアウトすると、ボタンが赤く戻る
function change_red(object_name, object_num, kaiso)
{
	if(kaiso == 0)
	{
		document.index[object_num].src = "pic/" + object_name + "r.jpg";
	}
	else if(kaiso == 1)
	{
		document.index[object_num].src = "../pic/" + object_name + "r.jpg";
	}
	else if(kaiso == 2)
	{
		document.index[object_num].src = "../../pic/" + object_name + "r.jpg";
	}
}

// ポイントすると、ボタンが黄色になる
function change_yellow(object_name, object_num, kaiso)
{
	if(kaiso == 0)
	{
		document.index2[object_num].src = "pic/" + object_name + "_y.jpg";
	}
	else if(kaiso == 1)
	{
		document.index2[object_num].src = "../pic/" + object_name + "_y.jpg";
	}
	else if(kaiso == 2)
	{
		document.index2[object_num].src = "../pic/" + object_name + "_y.jpg";
	}
}

// ポイントアウトすると、ボタンが白く戻る
function change_white(object_name, object_num, kaiso)
{
	if(kaiso == 0)
	{
		document.index2[object_num].src = "pic/" + object_name + "_w.jpg";
	}
	else if(kaiso == 1)
	{
		document.index2[object_num].src = "../pic/" + object_name + "_w.jpg";
	}
	else if(kaiso == 2)
	{
		document.index2[object_num].src = "../../pic/" + object_name + "_w.jpg";
	}
}

// 著作権の表示
function show_right(kaiso)
{
	var refer = document.referrer;		// リファラー
	var location = document.location;	// 現在表示しているファイルアドレス
	var platform = navigator.platform;	// OS
	var appName = navigator.appName;	// ブラウザ名
	var width = screen.width;			// 横幅
	var height = screen.height;			// 縦幅
	var colorDepth = screen.colorDepth; // 画素数
	
	var param;
	param =  "mode=get accesslog";
	param += "&kaiso=" + kaiso;
	param += "&refer=" + refer;
	param += "&location=" + location;
	param += "&platform=" + platform;
	param += "&appName=" + appName;
	param += "&width=" + width;
	param += "&height=" + height;
	param += "&colorDepth=" + colorDepth;
	
	document.write('<CENTER>');
	document.write('<TABLE>');
	document.write('  <TBODY>');
	document.write('    <TR>');
	document.write('      <TD>');
	
	if(kaiso == 0)
	{
		document.write('<IMG SRC="cgi-bin/count.cgi?'+ param + '">');
	}
	else if(kaiso == 1)
	{
		document.write('<IMG SRC="../cgi-bin/count.cgi?'+ param + '">');
	}
	else if(kaiso == 2)
	{
		document.write('<IMG SRC="../../cgi-bin/count.cgi?' + param + '">');
	}
	else
	{
		document.write('<IMG SRC="count.cgi?' + param + '">');
	}
	
	document.write('</TD>');
	document.write('    </TR>');
	document.write('  </TBODY>');
	document.write('</TABLE>');
	document.write('</CENTER>');
}

// ヘッダの表示
// |Top| |Game| |Wine| |Free Soft| |BBS| |Link| |Mail| |Back|
// 引数で背景が白か壁紙色かに振り分ける
function show_header_wine(back)
{
	var index_pic;
	
	if(back == "color")	// 背景壁紙
	{
		index_pic = "index_c.jpg";
	}
	else				// 背景白
	{
		index_pic = "index_w.jpg";
	}
	
	document.write('<TABLE>');
	document.write('  <TBODY>');
	document.write('    <TR>');
	document.write('      <TD width="200"><IMG src="../pic/' + index_pic + '" width="200" height="35" border="0"></TD>');
	document.write('      <TD align="right" width="430">');
	document.write('        <A href="../index.htm"><IMG src="../pic/top_r.jpg" width="100" height="15" border="0" alt="トップページ" name="index" onmouseover="change_green(\'top_\', \'0\', 1)" onmouseout="change_red(\'top_\' , \'0\', 1)"></A> ');
	document.write('        <A href="../cgi-bin/index.htm"><IMG src="../pic/game_r.jpg" width="100" height="15" border="0" alt="ワインゲーム" name="index" onmouseover="change_green(\'game_\', \'1\', 1)" onmouseout="change_red(\'game_\' , \'1\', 1)"></A>  ');
	document.write('        <A href="index.htm"><IMG src="../pic/wine_r.jpg" width="100" height="15" border="0" alt="ワイン" name="index" onmouseover="change_green(\'wine_\', \'2\', 1)" onmouseout="change_red(\'wine_\' , \'2\', 1)"></A> ');
	document.write('        <A href="../free_soft/index.htm"><IMG src="../pic/free_soft_r.jpg" width="100" height="15" border="0" alt="フリーソフト" name="index" onmouseover="change_green(\'free_soft_\', \'3\', 1)" onmouseout="change_red(\'free_soft_\' , \'3\', 1)"></A><BR>');
	document.write('        <A href="../cgi-bin/board.cgi"><IMG src="../pic/bbs_r.jpg" width="100" height="15" border="0" alt="掲示板" name="index" onmouseover="change_green(\'bbs_\', \'4\', 1)" onmouseout="change_red(\'bbs_\' , \'4\', 1)"></A> ');
	document.write('        <A href="../link/index.htm"><IMG src="../pic/link_r.jpg" width="100" height="15" border="0" alt="リンク集" name="index" onmouseover="change_green(\'link_\', \'5\', 1)" onmouseout="change_red(\'link_\' , \'5\', 1)"></A> ');
	document.write('        <A href="mailto:twclub@hotmail.co.jp"><IMG src="../pic/mail_r.jpg" width="100" height="15" border="0" alt="メール" name="index" onmouseover="change_green(\'mail_\', \'6\', 1)" onmouseout="change_red(\'mail_\' , \'6\', 1)"></A> ');
	document.write('        <A href="javascript:history.back()"><IMG src="../pic/back_r.jpg" width="100" height="15" border="0" alt="戻る" name="index" onmouseover="change_green(\'back_\', \'7\', 1)" onmouseout="change_red(\'back_\' , \'7\', 1)"></A>');
	document.write('      </TD>');
	document.write('    </TR>');
	document.write('    </TBODY>');
	document.write('</TABLE>');
}

// フッタの表示
// |Top| |Game| |Wine| |Free Soft| |BBS| |Link| |Mail| |Back|
function show_footer_wine()
{
	document.write('<TABLE>');
	document.write('  <TBODY>');
	document.write('    <TR>');
	document.write('      <TD width="600">');
	document.write('      <HR><BR>');
	document.write('      Index　　');
	document.write('      | <A href="../index.htm">Top</A> |　');
	document.write('      | <A href="../cgi-bin/index.htm">Game</A> |　');
	document.write('      | <A href="index.htm">Wine</A> |　');
	document.write('      | <A href="../free_soft/index.htm">Free Soft</A> |　');
	document.write('      | <A href="../cgi-bin/board.cgi">BBS</A> |　');
	document.write('      | <A href="../link/index.htm">Link</A> |　');
	document.write('      | <A href="mailto:twclub@hotmail.co.jp"> Mail </A> |　');
	document.write('      | <A href="javascript:history.back()">Back</A> |');
	document.write('      <BR><BR><BR>');
	document.write('      </TD>');
	document.write('    </TR>');
	document.write('    </TBODY>');
	document.write('</TABLE>');
}
