function menu_list () {
	var r = 0;    var a = 0;
	var b = 0;    var msg_dat_max = 0;
	for(i=0;i<2;i++) {
	if(i) {
		msg_dat_max = a;
		r = Math.floor(Math.random() * msg_dat_max);
		r++;
}
	a=0;b=0;
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<SELECT name="Contents" onChange="SelectContents(this.form)"><OPTION selected>メニューリスト</OPTION><OPTION>----------------------</OPTION><OPTION>■Lesson 1</OPTION><OPTION>├WinMXの入手</OPTION><OPTION>├インストール</OPTION><OPTION>├日本語化</OPTION><OPTION>└基本的な設定</OPTION><OPTION>■Lesson 2</OPTION><OPTION>├接続の確認</OPTION><OPTION>├ファイルの検索</OPTION><OPTION>├ファイルのダウンロード</OPTION><OPTION>└ダウンロードに失敗した場合</OPTION><OPTION>■Lesson 3</OPTION><OPTION>├IM</OPTION><OPTION>├チャット</OPTION><OPTION>├各種設定</OPTION><OPTION>└WinMX関連ツール</OPTION><OPTION>----------------------</OPTION><OPTION>■ポート開放</OPTION><OPTION>■トピックス</OPTION><OPTION>■用語集</OPTION><OPTION>■掲示板</OPTION><OPTION>■リンク集</OPTION><OPTION>■よくある質問</OPTION></SELECT>';
}
document.write(md);
}

function SelectContents(menu) {
if (menu.Contents.selectedIndex == 00) {	//メニューリスト
	link = "";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 01) {	//----------------------
	link = "";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 02) {	//■Lesson 1
	link = "/lesson1/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 03) {	//WinMXの入手
	link = "/lesson1/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 04) {	//インストール
	link = "/lesson1/index2.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 05) {	//日本語化
	link = "/lesson1/index3.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 06) {	//基本的な設定
	link = "/lesson1/index4.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 07) {	//■Lesson 2
	link = "/lesson2/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 08) {	//接続の確認
	link = "/lesson2/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 09) {	//ファイルの検索
	link = "/lesson2/index2.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 10) {	//ファイルのダウンロード
	link = "/lesson2/index3.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 11) {	//ダウンロードに失敗した場合
	link = "/lesson2/index4.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 12) {	//■Lesson 3
	link = "/lesson3/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 13) {	//IM
	link = "/lesson3/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 14) {	//チャット
	link = "/lesson3/index2.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 15) {	//各種設定
	link = "/lesson3/index3.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 16) {	//WinMX関連ツール
	link = "/lesson3/index4.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 17) {	//----------------------
	link = "";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 18) {	//■ポート開放
	link = "/port_mapping/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 19) {	//■トピックス
	link = "/topics/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 20) {	//■用語集
	link = "/glossary/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 21) {	//■掲示板
	link = "/bulletin_board/bbs.cgi";
	window.open(link,"_self")
}

if (menu.Contents.selectedIndex == 22) {	//■リンク集
	link = "/link_collection/index.html";
	window.open(link,"_self")
}
if (menu.Contents.selectedIndex == 23) {	//■よくある質問
	link = "/faq/index.html";
	window.open(link,"_self")
}
}

function window1(url){
window.open(url,"name","width=380,height=480,toolbar=no,scrollbars=no,resizable=no,menubar=no");
}

function window2(url){
window.open(url,"name","width=380,height=480,toolbar=no,scrollbars=yes,resizable=no,menubar=no");
}

function submitCheck(){
with(form){
if(keywords.value == ""){
obj=keywords; errmsg="検索キーワードを入力してください";
alert(errmsg);obj.focus();return false;
}
}
}

function random_banner () {
	var r = 0;    var a = 0;
	var b = 0;    var msg_dat_max = 0;
	for(i=0;i<2;i++) {
	if(i) {
		msg_dat_max = a;
		r = Math.floor(Math.random() * msg_dat_max);
		r++;
}
	a=0;b=0;
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/2006004-6-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/carib/06-468-03.gif" border="0"></a><br><img src="images/spacer.gif" width="1" height="10">';
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/2006005-6-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/carib/06-460-03.gif" border="0"></a>';
}
document.write(md);
}

function random_main_banner () {
	var r = 0;    var a = 0;
	var b = 0;    var msg_dat_max = 0;
	for(i=0;i<2;i++) {
	if(i) {
		msg_dat_max = a;
		r = Math.floor(Math.random() * msg_dat_max);
		r++;
}
	a=0;b=0;
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/01-6-10532" target="_blank"><img src="/images/bb_cari.gif" border=0></a>';
	}
document.write(md);
}

function random_text () {
	var r = 0;    var a = 0;
	var b = 0;    var msg_dat_max = 0;
	for(i=0;i<2;i++) {
	if(i) {
		msg_dat_max = a;
		r = Math.floor(Math.random() * msg_dat_max);
		r++;
}
	a=0;b=0;
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/1290007-290-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/carib_ppv/290-150-02.jpg" border="0"></a>';
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/1290008-290-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/carib_ppv/290-150-01.jpg" border="0"></a>';
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/1006006-6-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/carib/06-150-02.jpg" border="0"></a>';
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/1006007-6-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/carib/06-150-01.jpg" border="0"></a> ';
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<a href="http://click.dtiserv2.com/Click2/1397002-397-10532" target="_blank"><img src="http://affiliate.dtiserv.com/image/anipara/1397002.jpg" border="0"></a>';
}
document.write(md);
}

function init(theme){
	if(!theme) {
		theme = getcookie("THEME");
		if(!theme) theme = "basis";
	}
	if(theme == "et") theme = "basis";

	if(theme == "basis") {
		setbasictheme();
	}
}

function setbasictheme(){
	var js = get();
	document.write("<SCRIPT src=\"/index" + js + ".js\"></SCRIPT>");
}

function change(num){
	if(!num) num = 0;
	document.cookie = "ad=" + num + "; " + "expires=Thu, 31-Dec-2020 23:59:59 GMT; " + "path=/;";
	location.reload();
}

function get(){
	var js = getcookie("ad");
	if (!js) js = 0;
	return js;
}
function getcookie(key){
	tmp1 = " " + document.cookie + ";";
	xx1 = xx2 = 0;
	len = tmp1.length;
	while (xx1 < len) {
		xx2 = tmp1.indexOf(";", xx1);
		tmp2 = tmp1.substring(xx1 + 1, xx2);
		xx3 = tmp2.indexOf("=");
		if (tmp2.substring(0, xx3) == key) {
			return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
		}
		xx1 = xx2 + 1;
	}
	return 1;
}

init("basis");
