var host		= "http://saibon.dyndns.org/";
var hostname	= "サイボン・ウェブ";
var child		= null;
var iBrowser	= "icon/browser.gif";
var iMail		= "icon/mail.gif";
var iFolder		= "icon/folder.gif";

function swMenu(menu){
	obj = document.getElementById(menu).style;
	if (obj.display == ""){
		obj.display = "none";
	}else{
		obj.display = "";
	}
	return false;
}

function goMain(page){
	var flg = 0;
	var opt = "width=600,height=500,scrollbars=yes,menubar=no,resizable=no,status=yes,dependent=yes";
	switch (page){
		case 0:
//			flg = 0;
//			location = host + "mt/archives/cat24/";
			break;
		case 1:
			flg = 0;
			location = host + "mt/archives/cat22/";
			break;
		case 2:
			flg = 0;
			location = host + "mt/archives/cat1/cat30/";
			break;
		case 3:
			flg = 1;
			url =  host + "saibon/main.html";
			break;

		case 11:
			if(!confirm(hostname + "管理者にメールを送りますか？")){
			  return false;
			  break;
			}else{
				location.href = "mailto:&#109;&#97;&#105;&#108;&#116;&#111;:&#99;&#111;&#110;&#116;&#97;&#99;&#116;&#64;&#115;&#97;&#105;&#98;&#111;&#110;&#46;&#112;&#111;&#98;&#111;&#120;&#46;&#110;&#101;&#46;&#106;&#112";
				return true;
				break;
			}
		case 21:
			flg = 1;
			url =  host + "newbeetle/mileage.html";
			break;
		case 31:
			flg = 1;
			url =  host + "cgi-bin/bbs/bbs.cgi?log=n";
			break;
		case 32:
			flg = 1;
			url = host + "saibon/saizeriya.html";
			break;

		case 33:
			flg = 1;
			url = host + "euph/internal/main.html";
			break;

		case 40:
			flg = 0;
			location = host + "mt/archives/cat24/cat25/index.html";
			break;
		case 41:
			flg = 1;
			url =  host + "cgi-bin/bbs/bbs.cgi?log=p";
			break;
		case 42:
			flg = 1;
			url =  host + "cgi-bin/pure/psche.cgi";
			break;
		case 43:
			url =  host + "cgi-bin/pure/member.cgi";
			flg = 1;
			break;
		case 44:
			flg = 1;
			url =  host + "pure/form.html";
			break;
		default:
			break;
	}

	if (flg){
		if (child != null && child.closed != true){
			child.close();
		}
		child = window.open(url,'child',opt) ;
		return false;
	}else{
		return false;
	}
}

//お気に入り
function add_favorite(){
	window.external.addfavorite(host, hostname);
	return false;
}

//ウィンドウを閉じる
function closeWin(){
    window.close();
}
