
/*　別窓ＯＰＥＮスクリプト　*/
function win_open(URLname,x_size,y_size){
     window.open(URLname,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + x_size + ",height=" + y_size).focus();
}

/*　別窓ＯＰＥＮスクリプト　*/
function win_openA(URLname,x_size,y_size){
     window.open(URLname,"_blank","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=" + x_size + ",height=" + y_size).focus();
}


/*　別窓ＯＰＥＮスクリプト　*/
function win_openS(URLname,x_size,y_size){
     window.open(URLname,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + x_size + ",height=" + y_size).focus();
}


/*　画像切り替え用スクリプト 　*/
function SetImage(flag,img_name,ON){
  if(on_buttonFlag != img_name){
    document.images[img_name].src = PhotoImage[flag].src;
    if(ON == 1){
      document.images[on_buttonFlag].src = PhotoImage[on_buttonFlag.slice(1)*3-2].src;
      on_buttonFlag = img_name;
      window.focus();
    }
  }
}

/*　OS＆ブラウザチェック　*/

  if (window.opera) CHECK_BRO = "OP"; // ブラウザはOPERA
  else if (navigator.appName.indexOf("Internet Explorer") != -1) CHECK_BRO = "IE"; // ブラウザはIE
  else if (navigator.appName.indexOf("Netscape") != -1) CHECK_BRO = "NS"; // ブラウザはNetscape
  else CHECK_BRO = ""; // ブラウザは不明

  if (navigator.platform.indexOf("Win") != -1) CHECK_OS = "WIN"; // OSはWindows
  else if (navigator.platform.indexOf("Mac") != -1) CHECK_OS = "MAC"; // OSはMac


/*　ID定義　*/

  if (document.all){ // ブラウザは IE4以上
    ID_CHECK = new Function("ID","return document.all[ID]");
  }
  else if (document.getElementById){ // ブラウザは NS6以上
    ID_CHECK = new Function("ID","return document.getElementById(ID)");
  }
  else if (document.layers){ // ブラウザは NN4
    ID_CHECK = new Function("ID","return document[ID]");
  }
  else if (window.opera){ // ブラウザは OP6以上
    ID_CHECK = new Function("ID","return document.getElementById(ID)");
  }


/* GO TO English Site */

function ChangeSite(){
  menu_URL = parent.menu.location.href.split("/");
  head_URL = parent.head.location.href;
  main_URL = parent.main.location.href.split("/");
  URL = main_URL[main_URL.length - 1];
  if (URL.substr(URL.length-1,1) == "#") URL = URL.substr(0,URL.length-1);
  SIDE_MENU = menu_URL[menu_URL.length - 1];
  if(head_URL.indexOf("e_header.html") != -1){
  parent.menu.location.href = "j_" + SIDE_MENU.slice(2);
  parent.main.location.href = "j_" + URL.slice(2);
  parent.head.location.href = "j_header.html";
  }
  else{
  parent.menu.location.href = "e_" + SIDE_MENU.slice(2);
  parent.main.location.href = "e_" + URL.slice(2);
  parent.head.location.href = "e_header.html";
  }
}

/* CALL SIDE MENU */
function CALLl_MENU(URL){
  menu_URL = parent.menu.location.href;
  if(menu_URL.indexOf(URL) == -1) parent.menu.location.href = URL;
}
