//攻城戦、ドミトロン、メビウス
function chg_game_info(id) {

  var tab = new Array(3);
  var obj;

  for (var i = 0; i < tab.length; i++ ) {

    if ( navigator.appName == "Netscape" ) {
      obj  = document.getElementById( "tab" + i );
    } else {
      obj  = eval( "document.all.tab" + i );
    }

    if ( id == i ) {
      obj.style.display = "block";
    } else {
      obj.style.display = "none";
    }
  }
}

//攻城戦
function chg_castle(id) {

  var tab = new Array(3);
  tab[0] = new Array("/images/index/data_b1_on.gif", "/images/index/data_b1.gif");
  tab[1] = new Array("/images/index/data_b2_on.gif", "/images/index/data_b2.gif");
  tab[2] = new Array("/images/index/data_b3_on.gif", "/images/index/data_b3.gif");

  var obj;
  var obj2;

  for (var i = 0; i < tab.length; i++ ) {

    if ( navigator.appName == "Netscape" ) {
      obj  = document.getElementById( "tab_castle" + i );
      obj2 = document.getElementById( "gserver" + i );
    } else {
      obj  = eval( "document.all.tab_castle" + i );
      obj2 = eval( "document.all.gserver" + i );
    }

    if ( id == i ) {
      obj.style.display = "block";
      obj2.src          = tab[i][0];
    } else {
      obj.style.display = "none";
      obj2.src          = tab[i][1];
    }
  }
}

function server_image() {

  var obj;
  var obj2;

  var tab = new Array(3);
  tab[0] = new Array("/images/index/data_b1_on.gif", "/images/index/data_b1.gif");
  tab[1] = new Array("/images/index/data_b2_on.gif", "/images/index/data_b2.gif");
  tab[2] = new Array("/images/index/data_b3_on.gif", "/images/index/data_b3.gif");

  for (var i = 0; i < tab.length; i++ ) {

    if ( navigator.appName == "Netscape" ) {
      obj  = document.getElementById( "tab_castle" + i );
      obj2 = document.getElementById( "gserver" + i );
    } else {
      obj  = eval( "document.all.tab_castle" + i );
      obj2 = eval( "document.all.gserver" + i );
    }

    if ( obj.style.display == "block" ) {
      obj2.src = tab[i][0];
    } else {
      obj2.src = tab[i][1];
    }
  }
}

//ニュース
function chg_list( id ) {

  var tab = new Array(4);

  tab[0] = new Array( "/images/index/info/info_top_tab_1_3.gif", "/images/index/info/info_top_tab_1.gif" );
  tab[1] = new Array( "/images/index/info/info_top_tab_2_3.gif", "/images/index/info/info_top_tab_2.gif" );
  tab[2] = new Array( "/images/index/info/info_top_tab_3_3.gif", "/images/index/info/info_top_tab_3.gif" );
  tab[3] = new Array( "/images/index/info/info_top_tab_4_3.gif", "/images/index/info/info_top_tab_4.gif" );

  var obj;
  var obj2;

  for (var i = 0; i < tab.length; i++ ) {
    if ( navigator.appName == "Netscape" ) {
      obj  = document.getElementById( "info_frame" + i );
      obj2 = document.getElementById( "info_top_tab_" + i );
    } else {
      obj  = eval( "document.all.info_frame" + i );
      obj2 = eval( "document.all.info_top_tab_" + i );
    }

    if ( id == i ) {
      obj.style.display  = "block";
      obj2.src           = tab[i][0];
    } else {
      obj.style.display  = "none";
      obj2.src           = tab[i][1];
    }
  }
}

function info_image( id ) {

  var tab = new Array(4);

  tab[0] = new Array( "/images/index/info/info_top_tab_1_3.gif", "/images/index/info/info_top_tab_1.gif" );
  tab[1] = new Array( "/images/index/info/info_top_tab_2_3.gif", "/images/index/info/info_top_tab_2.gif" );
  tab[2] = new Array( "/images/index/info/info_top_tab_3_3.gif", "/images/index/info/info_top_tab_3.gif" );
  tab[3] = new Array( "/images/index/info/info_top_tab_4_3.gif", "/images/index/info/info_top_tab_4.gif" );

  var obj;
  var obj2;

  for (var i = 0; i < tab.length; i++ ) {
    if (navigator.appName == "Netscape") {
      obj  = document.getElementById( "info_frame" + i );
      obj2 = document.getElementById( "info_top_tab_" + i );
    } else {
      obj  = eval( "document.all.info_frame" + i );
      obj2 = eval( "document.all.info_top_tab_" + i );
    }

    if ( obj.style.display == "block" ) {
      obj2.src = tab[i][0];
    } else {
      obj2.src = tab[i][1];
    }
  }
}
