function NEKOIKE_displaySelects( selectVisibility ) {
	for ( var i = 0; i < document.forms.length; i++ ) {
		for ( var j = 0; j < document.forms[i].elements.length; j++ ) {
			if ( document.forms[i].elements[j].type.indexOf( "select" ) != -1 ) {
				document.forms[i].elements[j].style.visibility = selectVisibility;
			}
		}
	}
}

function NEKOIKE_showSubNav(NEKOIKE_subnav){
			
			var NEKOIKE_nav;
			var NEKOIKE_complete;
			
			if(document.getElementById){
				NEKOIKE_complete = "document.getElementById('" + NEKOIKE_subnav + "Menu')";
			}
			else if(document.all){
				NEKOIKE_complete = "document.all['" + NEKOIKE_subnav + "Menu']";
			}
			
			NEKOIKE_nav = eval(NEKOIKE_complete);
				
			if (NEKOIKE_nav){
				NEKOIKE_nav.style.visibility = 'visible';	
			}
			
			NEKOIKE_displaySelects( 'hidden' );
}

function NEKOIKE_hideSubNav(NEKOIKE_subnav){
		
			var NEKOIKE_nav;
			var NEKOIKE_complete;
			
			if(document.getElementById){
				NEKOIKE_complete = "document.getElementById('" + NEKOIKE_subnav + "Menu')";
			}
			else if(document.all){
				NEKOIKE_complete = "document.all['" + NEKOIKE_subnav + "Menu']";
			}
			
			NEKOIKE_nav = eval(NEKOIKE_complete);
				
			if (NEKOIKE_nav){
				NEKOIKE_nav.style.visibility = 'hidden';	
			}
			
			NEKOIKE_displaySelects( 'visible' );
}

//<!-- Adds a suffix onto the image name so that the program calls the on state of the image -->
function NEKOIKE_imgOn(iname) {
	if (document.images) {
		document[iname].src = eval(iname + "on.src");
	}
}

//<!-- Adds a suffix onto the image name so that the program calls the off state of the image -->
function NEKOIKE_imgOff(iname) {
	if (document.images) {
		document[iname].src = eval(iname + "off.src");
	}
}

var NEKOIKE_arMenu = new Array();

	NEKOIKE_arMenu[0] = new Array(
			"NEKOIKE_about",
			555,		// Pixel offset from right edge.
			110,	// Width of menu.
			"近況と著作", 	"http://homepage1.nifty.com/soyama/syoukai/sigoto.html",
			"プロフィール", 		"http://homepage1.nifty.com/soyama/syoukai/prof.html",
			"更新履歴", 	"http://homepage1.nifty.com/soyama/syoukai/rireki.html",
	"このサイトについて", 	"http://homepage1.nifty.com/soyama/syoukai/map.html"		
			);

	NEKOIKE_arMenu[1] = new Array(
			"NEKOIKE_travels",
			444,	// Pixel offset from right edge.
			110,	// Width of menu.
			"旅日記NEW", 			"http://homepage1.nifty.com/soyama/travel03/travel_03.html",
			"旅日記１", 	"http://homepage1.nifty.com/soyama/travel01/travel_01.html",
			"旅日記２", 		"http://homepage1.nifty.com/soyama/travel02/travel_02.html",
			"旅日記４", 	"http://homepage1.nifty.com/soyama/syoukai/sindai/prom.html",
			"寝台列車", 		"http://homepage1.nifty.com/soyama/syoukai/sindai/prom.html"
			);

	NEKOIKE_arMenu[2] = new Array(
			"NEKOIKE_cats",
			333,	// Pixel offset from right edge.
			110,	// Width of menu.
			"ネコじまんNEW","http://homepage1.nifty.com/soyama/neko/neko_07.html",
			"ネコじまん１","http://homepage1.nifty.com/soyama/neko/neko_01.html",
			"ネコじまん２", 			"http://homepage1.nifty.com/soyama/neko/neko_02.html",
			"ネコじまん３", 		"http://homepage1.nifty.com/soyama/neko/neko_03.html",
			"ネコじまん４ ", 	"http://homepage1.nifty.com/soyama/neko/neko_04.html",
			"ネコじまん５", 			"http://homepage1.nifty.com/soyama/neko/neko_05.html",
			"ネコじまん６ ", 		"http://homepage1.nifty.com/soyama/neko/neko_06.html",
			"ネコじまん７ ", 	"http://homepage1.nifty.com/soyama/neko/neko_07.html"
			);

	NEKOIKE_arMenu[3] = new Array(
			"NEKOIKE_dialy",
			222,	// Pixel offset from right edge.
			110,	// Width of menu.
			"a Tocsin(blog)","http://tocsin.blog.shinobi.jp/",
			"日々是雑感04","http://homepage1.nifty.com/soyama/nikki_prom.html",
			"日々是雑感05",			"http://homepage1.nifty.com/soyama/nikki_prom2.html",
			"日々是雑感06",	"http://homepage1.nifty.com/soyama/nikki_prom3.html",
			"つれなのふりや(blog)", 		"http://nekoike.moe-nifty.com/turenanohuriya/",
			"その他", 	"http://nekoike.moe-nifty.com/turenanohuriya/"
			);

	NEKOIKE_arMenu[4] = new Array(
			"NEKOIKE_etc",
			111,	// Pixel offset from right edge.
			110,	// Width of menu.
			"熱愛小説",	"http://homepage1.nifty.com/soyama/novels/entrance.html",
			"祖山＆腐ったの",		"http://homepage1.nifty.com/soyama/game.html",
			"今日の運勢",		"http://nd555.hp.infoseek.co.jp/unsei.html",
			"つれなのふりや(blog)", 	"http://nekoike.moe-nifty.com/turenanohuriya/"
			);

	NEKOIKE_arMenu[5] = new Array(
			"NEKOIKE_links",
			0,	// Pixel offset from right edge.
			110,	// Width of menu.
			"リンク",			"http://homepage1.nifty.com/soyama/syoukai/links.html",
			"トピック",			"http://homepage1.nifty.com/soyama/syoukai/topics.html",
			"掲示板",	"http://homepage1.nifty.com/soyama/bbsent.html",
			"メール", 		"http://homepage1.nifty.com/soyama/maildec.html",
			"ホーム", 		"http://homepage1.nifty.com/soyama/index.html"
			);
		

function NEKOIKE_setUpMenus(NEKOIKE_backcolor, NEKOIKE_overcolor, NEKOIKE_textcolor, NEKOIKE_overtextcolor, NEKOIKE_linecolor){
	if ((document.all) || (document.getElementById)){

	var NEKOIKE_subnav = "";
			
			for (j = 0; j < NEKOIKE_arMenu.length; j++){
				NEKOIKE_subnav += "<div id=\"" + NEKOIKE_arMenu[j][0] + "Menu\" style=\"z-index:999;position: absolute; top: 35; right: " + NEKOIKE_arMenu[j][1] + "; width: " + NEKOIKE_arMenu[j][2] + ";  visibility: hidden\" onmouseover=\"NEKOIKE_showSubNav('" + NEKOIKE_arMenu[j][0] + "');\" onmouseout=\"NEKOIKE_hideSubNav('" + NEKOIKE_arMenu[j][0] + "');\">";
					NEKOIKE_subnav += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"" + NEKOIKE_arMenu[j][2] + "\">";
						
				for (i=3; i < NEKOIKE_arMenu[j].length-1; i=i+2){
					NEKOIKE_subnav += "<tr>";
					NEKOIKE_subnav += "<td width=\"110\" height=\"30\" bgcolor=\"" + NEKOIKE_backcolor + "\" onClick=\"document.location.href='" + NEKOIKE_arMenu[j][i+1] + "'\" onmouseover=\"this.bgColor='" + NEKOIKE_overcolor + "';this.style.color='" + NEKOIKE_overtextcolor+ "';\" onmouseout=\"this.bgColor='" + NEKOIKE_backcolor + "';this.style.color='" + NEKOIKE_textcolor + "'\" style=\"color: " + NEKOIKE_textcolor + "; font-family: arial,sans-serif; font-size: 10px;\"><div style=\"padding-left:12px;\">" + NEKOIKE_arMenu[j][i] + "</a></div></td>";
					NEKOIKE_subnav += "</tr>";
					NEKOIKE_subnav += "<tr>";
					NEKOIKE_subnav += "<td bgcolor=\"" + NEKOIKE_linecolor + "\" height=\"1\"></td>";
					NEKOIKE_subnav += "</tr>";
				}
					
				NEKOIKE_subnav += "</table>";
				NEKOIKE_subnav += "</div>";
			}

		document.write(NEKOIKE_subnav);
	}
}


   