/*		javascript for webni ongakuwo tools ver1		*/
var curraddr = String(location);
if(curraddr.indexOf("cgi.members.interq.or.jp") != -1){
 filepath = curraddr.split("inside/");
 location.replace("http://www.interq.or.jp/blue/inside/"+filepath[1]);
}
/*		ranking			*/
function writeRankHTML() {
  webniURL = 'http://www.interq.or.jp/blue/inside/';
  rURL = String(location);
  rLen = rURL.length-1;
  if(rURL.charAt(rLen)=="/"){
    rURL = rURL + "index.html";
  }
  if(rURL.indexOf(webniURL) != -1){
    rID = rURL.split(webniURL);
    document.write('<img src="http://cgi.members.interq.or.jp/blue/inside/rank/lime.cgi?page='+rID[1]+'&name='+document.title+'&hp='+rURL+'" width="2" height="2">');
  }
}
/*		tools.js		*/
/*		画像プリロード			*/
if(document.getElementById){
  fS0 = new Image();fM0 = new Image();fL0 = new Image();
  fS1 = new Image();fM1 = new Image();fL1 = new Image();
  fS0.src="../img/tool/tool_fsS0.gif";fM0.src="../img/tool/tool_fsM0.gif";fL0.src="../img/tool/tool_fsL0.gif";
  fS1.src="../img/tool/tool_fsS1.gif";fM1.src="../img/tool/tool_fsM1.gif";fL1.src="../img/tool/tool_fsL1.gif";
  ST0 = new Image();ST1 = new Image();ST0.src="../img/mn_stepup.gif";ST1.src="../img/mn_stepup_h.gif";
}
/*		ツールバー部分HTML変数宣言	*/
// bookmark判別
if(window.external){
  b='<A href="#" onClick="bmk();return false" name="bmk"><img src="../img/tool/tool_bookmark1.gif" alt="現在のページをブックマーク" title="現在のページをブックマーク" width="38" height="27" border="0" name="bmIcon"></a>';
} else {
  b='<img src="../img/tool/tool_bookmark0.gif" alt="IEのみ" title="IEのみ" width="38" height="27">';
  }
// printable判別 
if(curraddr.indexOf("index.html") == -1){
  p ='<a href="http://cgi.members.interq.or.jp/blue/inside/print.cgi?'+location+'"><img src="../img/tool/tool_print1.gif" width="45" height="27" alt="印刷用ページを表示" title="印刷用ページを表示" border="0"></a>';
} else {
  p = '<img src="../img/tool/tool_print0.gif" width="45" height="27" alt="このページは印刷用ページを表示できません" title="このページは印刷用ページを表示できません" border="0">';
}
// fontsize判別
if(document.getElementById){
  fsAlt = "フォントサイズを変更";
  fsImg = '<a href="#" onclick="fSize(\'fsS\');return false" onMouseOver="omF(\'fS\',1);return null" onMouseOut="omF(\'fS\',0);return null"><img src="../img/tool/tool_fsS0.gif" width="32" height="21" border="0" alt="フォントサイズ：小" title="フォントサイズ：小" name="fS"></a>'
    + '<a href="#" onclick="fSize(\'fsM\');return false" onMouseOver="omF(\'fM\',1)" onMouseOut="omF(\'fM\',0)"><img src="../img/tool/tool_fsM0.gif" width="41" height="21" border="0" alt="フォントサイズ：中" title="フォントサイズ：中" name="fM"></a>'
    + '<a href="#" onclick="fSize(\'fsL\');return false" onMouseOver="omF(\'fL\',1)" onMouseOut="omF(\'fL\',0)"><img src="../img/tool/tool_fsL0.gif" width="31" height="21" border="0" alt="フォントサイズ：大" title="フォントサイズ：大" name="fL"></a>';
} else {
  fsAlt = "フォントサイズ変更にはIE5、Netscape6以上もしくはMozillaが必要です";
  fsImg = '<img src="../img/tool/tool_fsS0.gif" width="32" height="21" alt="">'
    + '<img src="../img/tool/tool_fsM0.gif" width="41" height="21" alt="">'
    + '<img src="../img/tool/tool_fsL0.gif" width="31" height="21" alt="">';
}

var tlb = p + b + '<a href="#" onClick="eml();return false"><img src="../img/tool/tool_mail1.gif" width="42" height="27" alt="このページをメールで知らせる" title="このページをメールで知らせる" border="0"></a>'
+ '<a href="../etc/help.html"><img src="../img/tool/tool_help1.gif" width="35" height="27" alt="ヘルプを表示" title="ヘルプを表示" border="0"></a><br>'
+ '<img src="../img/tool/tools_tt.gif" width="160" height="12" alt="TOOLS"><br>'
+ '<img src="../img/sp.gif" width="11" height="26">'
+ '<img src="../img/tool/tool_font.gif" width="19" height="26" alt="'+fsAlt+'">'
+ '<img src="../img/sp.gif" width="26" height="26">' + fsImg;
/*		function			*/
function bmk(){if(window.external){window.external.addFavorite(location,document.title);}else{alert("IE以外では手動でお願いします");}}
function eml(){location.href="mailto:?subject="+document.title+"&body="+document.title+"%0D%0A"+location;}
function omF(lct,fN){document.images[lct].src=eval(lct+fN).src;}
/*							
			fontsize.js			
						      */
// cookieを取得
if((document.cookie)&& (document.getElementById)) {
  with(document.cookie){
    fsLct=indexOf('fontsize=');
    sepLct=indexOf(';',fsLct);
    if(sepLct==-1){
      sepLct=length;
    }
  getfSize = substring(fsLct+9,sepLct);
  }
} else {
  getfSize = 'fsS';
}
/*		フォントサイズ変更			*/
function fSize(size){
  if (document.getElementById){
    for(i=0; i<3; i++){
      css = document.getElementsByTagName("link")[i];
      if(size == css.getAttribute("fsz")){
        css.disabled = false;
      }else{
        css.disabled = true;
      }
    }
  document.cookie = "fontsize="+size+"; expires=Fri, 31-Dec-2030 23:59:59; path =/";
  }
}
fSize(getfSize);

