dir0 = "../";
dir1 = "./"; 

function goto(newurl){
   window.location.href= newurl;
}

function setColor(elm){
   elm.style.backgroundImage = "url(" + dir0 + "images/topbtns.png)";   
}

function rstColor(elm){
   elm.style.backgroundImage = "url(" + dir0 + "images/topbtn.png)";   
}

function show(url, wd, ht){
   var wd = window.open(dir1 + "panelimg.html?" + url + "&" + wd + "&" + ht, "info" + wd + ht,
                        "width=" + wd + ", height=" + ht);
   wd.focus();
}

function selectBtn(activno, dir0, dir1){
   this.dir0 = dir0;
   this.dir1 = dir1;
   var btnlabel = new Array("HOME", "スクール案内", "スタッフ", "料金表", "競技会", "写真集", "お知らせ", "ブログ", "リンク集");
   var btnlink  = new Array(dir0 + "index.html", dir1 + "studio.html", dir1 + "stuff.html",
		        dir1 + "lesson.html", dir1 + "compe.html", dir1 + "photo.html",
		        dir1 + "info.jsp", "http://ameblo.jp/ichiroayumi/", dir1 + "link.html");
   document.open();
   document.write("<table align=CENTER border=0 cellspacing=1 cellpadding=0 " +
                  "style='width:806px; padding:0; border:2px solid black; background-color:#7777AA'>");
   document.write("<tr>");
   document.write("  <td align=LEFT valign=TOP style='padding:2px 0px 0px 2px;'>");
   document.write("    <img src='" + dir0 + "images/sida.png' width=63 height=25 style='vertical-align:baseline'>");
   document.write("  </td>");
   document.write("  <td colspan=8 align=CENTER valign=CENTER " +
	               "style='padding:2px 0px 0px 2px; color:LightYellow; font:14px \"ＭＳ ゴシック\";' id='topinfo'>" +
	                 message + "</td>");
   document.write("</tr>");
   document.write("<tr><td colspan=9 style='background:black; line-height:1px'>&nbsp;</td></tr>");
   document.write("<tr align=CENTER>");
   for(btn = 0; btn < btnlabel.length; btn++){
      if(btn == activno){
         document.write("<td class=btns>" + btnlabel[btn] + "</td>");
      } else { 
         document.write("<td onMouseOver='setColor(this)' onMouseOut='rstColor(this)' onClick='goto(\"" + btnlink[btn] + "\")' " +
                             "class=btnn>" + btnlabel[btn] + "</td>");
      }
   }
   document.write("</tr>");
   document.write("</table>");
   document.close();
}

