if(navigator.appName.indexOf("Internet Explorer") == -1){
   document.addEventListener('mousemove', funcMouseMove, false);
}

function menuopen(text,x){
   el = document.getElementById("menu_text");
   if(window.event){
      el.style.left = event.clientX - (32*x);
      el.style.top = event.clientY + 21;
   }else{
      el.style.left = mouseX - (30*x);
      el.style.top = mouseY + 21;
   }
   el.style.display = "block";
   el.style.visibility = "visible";
   menu_text.innerHTML = text;
}

function funcMouseMove(event) {
   mouseX = event.clientX;
   mouseY = event.clientY;
}

function menuclose(){
   el.style.display = "none";
   el.style.visibility = "hidden";
}

function check(){
   if(typeof parent.wmw == 'undefined'){
      location.href="/index.html";
   }
}

function title(flag){	//サイト名・メニュー
   title = '<DIV id="sitename" onmouseover="menuopen(\'トップに戻るよ\',0);" onmouseout="menuclose();" onclick="location.href=\'http://wmw.x0.com/html/top.html\';"></DIV>';
   title += '<TABLE id="counter">';
   title += '<TD><IFRAME SRC="http://now-visitor3.ziyu.net/c.php?wmwmaple/default/10/5a7edc/ffffff/Now+Visitor+:+/+/" WIDTH=100 HEIGHT=13 SCROLLING=NO FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0><A href="http://www.ziyu.net/"><IMG SRC="http://now-visitor3.ziyu.net/nojs_cnt.php?wmwmaple/default/" alt="ブログパーツ"></IFRAME></TD>';
//   title += '<TD>Total :</TD>';
//   title += '<TD><A href="http://ct1.xrea.com/cgi-bin/link.cgi?site=maple_anzu" target="_blank"><IMG src="http://ct1.xrea.com/cgi-bin/count.fcg?site=maple_anzu&img=02001&ovlp=1&max=7&day=0&pic=3&tp=1"></A></TD>';
//   title += '<TD>Today :</TD>';
//   title += '<TD><A href="http://ct1.xrea.com/cgi-bin/link.cgi?site=maple_anzu" target="_blank"><IMG src="http://ct1.xrea.com/cgi-bin/count.fcg?site=maple_anzu&img=02001&ovlp=1&max=4&day=2&pic=3&tp=1" border="0"></A></TD>';
//   title += '<TD>Yesterday :</TD>';
//   title += '<TD><A href="http://ct1.xrea.com/cgi-bin/link.cgi?site=maple_anzu" target="_blank"><IMG src="http://ct1.xrea.com/cgi-bin/count.fcg?site=maple_anzu&img=02001&ovlp=1&max=4&day=1&pic=3&tp=1"></A></TD>';
   title += counter;
   title += '</TABLE>';
   title += '<TABLE id="menu">';
   title += '<TR>';
   if(flag == 1){
      title += '<TD class="menu_error menu_style">−</TD>';
      title += '<TD class="menu_error menu_style">−</TD>';
      title += '<TD class="menu_error menu_style">−</TD>';
      title += '<TD class="menu_error menu_style">−</TD>';
      title += '<TD class="menu_error menu_style">−</TD>';
   }else{
      title += '<TD id="menu1" class="menu_style" onmouseover="stylechange1(\'menu1\');menuopen(\'MapleStory関連のコンテンツ<BR>アバターシミュレーターがメイン\',0);" onmouseout="stylechange2(\'menu1\');menuclose();" onclick="location.href=\'/html/maple.html\';">MapleStory</TD>';
      title += '<TD id="menu2" class="menu_style" onmouseover="stylechange1(\'menu2\');menuopen(\'様々なブラウザゲームがプレイ可能\',1);" onmouseout="stylechange2(\'menu2\');menuclose();" onclick="location.href=\'/html/game.html\';">Game</TD>';
      title += '<TD id="menu3" class="menu_style" onmouseover="stylechange1(\'menu3\');menuopen(\'準備中。\',2);" onmouseout="stylechange2(\'menu3\');menuclose();" onclick="location.href=\'/html/hobby/index.html\';">Hobby</TD>';
      title += '<TD id="menu4" class="menu_style" onmouseover="stylechange1(\'menu4\');menuopen(\'未分類・その他<BR>現在は配布物メイン\',3);" onmouseout="stylechange2(\'menu4\');menuclose();" onclick="location.href=\'/html/etc/index.html\';">Etc</TD>';
      title += '<TD id="menu5" class="menu_style" onmouseover="stylechange1(\'menu5\');menuopen(\'他サイトへのリンク集\',4);" onmouseout="stylechange2(\'menu5\');menuclose();" onclick="location.href=\'/html/link/index.html\';">Link</TD>';
   }
   title += '</TR>';
   title += '<TR>';
   title += '<TD id="menu6" class="menu_style" onmouseover="stylechange1(\'menu6\');menuopen(\'質問・雑談共用の掲示板<BR>※別枠でオープン\',0);" onmouseout="stylechange2(\'menu6\');menuclose();" onclick="window.open(\'/cgi-bin/fbbs/fbbs.cgi?id=maple\');">BBS</TD>';
   title += '<TD id="menu7" class="menu_style" onmouseover="stylechange1(\'menu7\');menuopen(\'管理人のブログ<BR>※別枠でオープン\',1);" onmouseout="stylechange2(\'menu7\');menuclose();" onclick="window.open(\'http://blog.livedoor.jp/wmwb/\');">Blog</TD>';
//   title += '<TD id="menu8" class="menu_style" onmouseover="stylechange1(\'menu8\');menuopen(\'ミラーのメイプルメーカー<BR>※別枠でオープン\',2);" onmouseout="stylechange2(\'menu8\');menuclose();" onclick="window.open(\'http://tasaito.dip.jp/~wmw/\');">Mirror</TD>';
   title += '<TD id="menu8" class="menu_style" onmouseover="stylechange1(\'menu8\');menuopen(\'ミラーのメイプルメーカー\',2);" onmouseout="stylechange2(\'menu8\');menuclose();" onclick="location.href=\'/html/mirror.html\';">Mirror</TD>';
   title += '<TD id="menu9" class="menu_style">−</TD>';
   title += '<TD id="menu10" class="menu_style" onmouseover="stylechange1(\'menu10\');menuopen(\'いわゆるWeb拍手<BR>管理人へのコメントも可能\',4);" onmouseout="stylechange2(\'menu10\');menuclose();" onclick="location.href=\'/cgi-bin/webclap/clap.cgi\';">WebClap</TD>';
   title += '</TR>';
   title += '</TABLE>';
   header.innerHTML = title;
}

function stylechange1(id){
   document.getElementById(id).style.background = "#000080";
   document.getElementById(id).style.border = "1px dotted #ffffff";
}

function stylechange2(id){
   document.getElementById(id).style.background = "#5a7edc";
   document.getElementById(id).style.border = "1px dotted #5a7edc";
}

function banner(type){
//   banner = '<a href="http://www.accesstrade.net/at/c.html?rk=010026qj001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=010026qj001atl" alt="" width="120" height="60" border="0" /></a>';	//ラグナロク
//   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=01002g7e001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=01002g7e001atl" alt="" width="120" height="60" border="0" /></a>';	//サドンアタック
   banner = '<a href="http://www.accesstrade.net/at/c.html?rk=01002chp001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=01002chp001atl" alt="" width="120" height="60" border="0" /></a>';	//ハンゲ
   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=01002o5r001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=01002o5r001atl" alt="" width="120" height="60" border="0" /></a>';	//ラテール
   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=010009ay001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=010009ay001atl" alt="" width="120" height="60" border="0" /></a>';	//メイプル
   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=010015xx001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=010015xx001atl" alt="" width="120" height="60" border="0" /></a>';	//テイルズウィーバー
//   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=01000azf001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=01000azf001atl" alt="『選べる外貨』誕生！" width="120" height="60" border="0" /></a>';
   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=01000ko8001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=01000ko8001atl" alt="" width="120" height="60" border="0" /></a>';	//マビノギ
   banner += '<a href="http://www.accesstrade.net/at/c.html?rk=01002stg001atl" target="_blank"><img src="http://www.accesstrade.net/at/r.html?rk=01002stg001atl" alt="" width="120" height="60" border="0" /></a>';	//モンハン
//   banner += '';

   if(type == 1){
      page_banner.innerHTML += banner;
   }else{
      page_banner2.innerHTML += banner;
   }
}

function top_image(){
   ban = Math.floor(Math.random()*1);
   image = new Array(//'0000.png',
		     '0004.png'
//		     '0005.png','0005.png','0005.png','0005.png'
//		     '0001.jpg',
//		     '0002.png','0002.png','0002.png',
//		     '0003.png','0003.png','0003.png',
//		     '0003.png','0003.png','0003.png'
);
   itext  = new Array(//'dietlindeさんより頂きました。',
		      '晒し上げ終了'
//		      '','','',''
//		      '今ちょこちょこプレイしてるめいぽとは似て異なるMMO。',
//		      'イラストは家にあった落書…？','メイプルしていないのは結構大きい。','そろそろ別方向に動こうかな…。',
//		      '真実はいつも一つ！','真実はいつも一つ！','真実はいつも一つ！','真実はいつも一つ！','真実はいつも一つ！','真実はいつも一つ！'
                     );
//   ilink  = new Array('./index.html');

   top_picture.innerHTML = '<DIV style="width:100%;height:100%;background:url(\'../image/top/' + image[ban] + '\');" onmouseover="menuopen(\'' + itext[ban] + '\',0);" onmouseout="menuclose();"></DIV>';
// onclick="location.href=\'' + ilink[ban] + '\';"></DIV>';
}
