 /////////このファイルのメニュー/////////

//+++++0.ウィンドウオープン関連
//+++++1.CSS振り分け
//+++++2.グループリンク(上)
//+++++3.各店共通右メニュー
//+++++4.オープン時間
//+++++5.テキストインデックス
//+++++6.更新の履歴の書き出し


//+++0.ウィンドウオープン関連+++//

// コンテンツのウィンドウを開くスクリプト
function contwin(dir,file,wid,hei){
  filez = dir + '/' + file;
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wid + ',height=' + hei;
  win_name = 'window' + file;
  win_name = window.open(filez,file,prop);
}

// ポップアップ
function popup(di,na,wi,he){
  filez = di;
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wi + ',height=' + he;
  nam = na;
  window.open(filez,nam,prop);
}

// ポップアップ イベント
function popEvent(di,wi,he){
  filez = 'http://www.harenchi.co.jp/fukuoka/events/' + di;
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wi + ',height=' + he;
  nam = di;
  win_name = window.open(filez,nam,prop);
}

// ポップアップ イベントスクロール
function popEvent2(di,wi,he){
  filez = 'http://www.harenchi.co.jp/fukuoka/events/' + di;
  prop = 'SCROLLBARS=yes,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wi + ',height=' + he;
  nam = di;
  win_name = window.open(filez,nam,prop);
}

//イベントカレンダー用イベントポップアップ
function popEventCal(shop,di,wi,he){
  if(shop == 'fukuoka'){
    filez = 'http://www.harenchi.co.jp/fukuoka/events/' + di;
  }else{
    filez = 'http://www.fk-' + shop + '.com/events/' + di;
  }
  if(he){
    prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wi + ',height=' + he;
  }else{
    prop = 'SCROLLBARS=yes,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wi + ',height=' + he;
  }
  nam = di;
  win_name = window.open(filez,nam,prop);
}

// メイド服コスチュームのウィンドウを開くスクリプト
function maidCosWin(no){
  filez = '/costume/' + no + '/';
  prop  = 'SCROLLBARS=1,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=765';
  cosno = 'cos' + no;
  window.open(filez,cosno,prop);
}

// もぎたて新人
function mogitate(shops,girlone){
  filez = 'http://www.harenchi.co.jp/fukuoka/sinjin/girl.php?shop=' + shops + '&girl=' + girlone;
	prop = 'SCROLLBARS=auto,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=750,height=600';
	nam = girlone;
  window.open(filez,'mogitate',prop);
}

//ハレンチイベント
function pophare(di,wi,he){
  filez = 'http://www.harenchi.co.jp/fukuoka/events/' + di;
  popup(filez,di,wi,he);
}

//ハレンチイベント袋とじ
function popfukuro(di,wi,he){
  filez = 'http://www.harenchi.co.jp/fukuoka/member/events/' + di;
  popup(filez,di,wi,he);
}

// プロフィール用
function profwin(shop,girl){
  popup('http://www.fk-' + shop + '.com/zaiseki/' + girl,girl,'750','652');
}

//欠勤情報
function restwin(dir,file,wid,hei){
  filez = dir + '/' + file;
  prop = 'SCROLLBARS=auto,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wid + ',height=' + hei;
  win_name = 'window' + file;
  win_name = window.open(filez,'photos',prop);
}

//期間限定
function restwin2(dir,file,wid,hei){
  filez = dir + '/' + file;
  prop = 'SCROLLBARS=yes,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=' + wid + ',height=' + hei;
  win_name = 'window' + file;
  win_name = window.open(filez,'photos',prop);
}

//欠勤情報2
function restlist(shop){
  filez = 'http://www.fk-' + shop + '.com/syukkin/rest.htm';
  prop = 'SCROLLBARS=auto,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=750,height=300';
  win_name = window.open(filez,'restlist',prop);
}

// Flashムービーのポップアップ
function OpenFlashWindow(pid){
  var file = 'flash.php?id=' + pid;
  window.open(file,'profmovie','width=400,height=410,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}
// 袋とじFlashムービーのポップアップ
function OpenFukuroFlashWindow(pid){
  var file = '/special/zaiseki/flash.php?id=' + pid;
  window.open(file,'profmovie','width=400,height=400,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}

// ムービーのポップアップ
function OpenSwfWindow(pid,pname){
  var file = 'flash.php?id=' + pid + '&name=' + pname;
  window.open(file,'profmovie','width=400,height=400,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}

// 袋とじムービーのポップアップ
function OpenFukuroSwfWindow(pid,pname){
  var file = '/special/zaiseki/movie.php?id=' + pid + '&name=' + pname;
  window.open(file,'profmovie','width=400,height=400,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}
//シスナビ
function sysnavi(thisPage){
  navi  = '<div id="navigation"><ul>';
  if(thisPage!='intro'){
    navi += '<li class="sys"><a href="/system/intro.htm">お店のご紹介</a></li>';
  }else{
    navi += '<li class="sys"><em>お店のご紹介</em></li>';
  }
  if(thisPage!='guide'){
    navi += '<li class="guid"><a href="/system/guide.htm">ご来店の手引き</a></li>';
  }else{
    navi += '<li class="guid"><em>ご来店の手引き</em></li>';
  }
  if(thisPage!='system'){
    navi += '<li class="fee"><a href="/system/index.htm">料金とシステム</a></li>';
  }else{
    navi += '<li class="fee"><em>料金とシステム</em></li>';
  }
  if(thisPage!='map'){
    navi += '<li class="map"><a href="/system/map.htm">アクセスマップ</a></li>';
  }else{
    navi += '<li class="map"><em>アクセスマップ</em></li>';
  }
  if(thisPage!='faq'){
    navi += '<li class="faq"><a href="/system/faq.htm">FAQ</a></li>';
  }else{
    navi += '<li class="faq"><em>FAQ</em></li>';
  }
  navi += '</ul>';
  navi += '</div>';
  document.write(navi);
}

// 初めての方ナビゲーター下部
function syslink(thisPage){
  slink = '<ul id="syslink">';
  if(thisPage!='intro'){
    slink += '<li><a href="/system/intro.htm">お店のご紹介</a>｜</li>';
  }else{
    slink += '<li><em>お店のご紹介</em>｜</li>';
  }
  if(thisPage!='guide'){
    slink += '<li><a href="/system/guide.htm">ご来店の手引き</a>｜</li>';
  }else{
    slink += '<li><em>ご来店の手引き</em>｜</li>';
  }
  if(thisPage!='system'){
    slink += '<li><a href="/system/">料金とシステム</a>｜</li>';
  }else{
    slink += '<li><em>料金とシステム</em>｜</li>';
  }
  if(thisPage!='map'){
    slink += '<li><a href="/system/map.htm">アクセスマップ</a>｜</li>';
  }else{
    slink += '<li><em>アクセスマップ</em>｜</li>';
  }
  if(thisPage!='faq'){
    slink += '<li><a href="/system/faq.htm">FAQ</a></li>';
  }else{
    slink += '<li><em>FAQ</em></li>';
  }
  slink += '</ul>';
  document.write(slink);
}


//+++1.CSSの振り分け+++//
// set Variable
var Agent = navigator.userAgent;
var cssDir = '/css/navigator/';
var cssTags = '<link rel="stylesheet" type="text/css" href="';
var flag = null;

// CSS deverge for Cross Platform & Cross Browser
if (Agent.indexOf('Safari') != -1){// safari
  flag = "safari";
  document.open();
  document.write(cssTags + cssDir + flag + '.css" title="safari_style" />');
  document.close();
}
  
if (Agent.indexOf('Firefox') != -1){// Firefox
  flag = "fox";
  document.open();
  document.write(cssTags + cssDir + flag + '.css" title="firefox_style" />');
  document.close();
}

if ((Agent.indexOf('Win') != -1) && (flag == null)){
  if (Agent.indexOf('MSIE 7') != -1){
    flag = "ie7";
    document.open();
    document.write(cssTags + cssDir + flag + '.css" title="WinIE_style" />');
    document.close();  
  }else if (document.all){ // Win_IE
    flag = "wie";
    document.open();
    document.write(cssTags + cssDir + flag + '.css" title="WinIE_style" />');
    document.close();
  } else { // Win_NS
    flag = "wns";
    document.open();
    document.write(cssTags + cssDir + flag + '.css" title="WinNS_style" />');
    document.close();
  }
}

if ((Agent.indexOf('Mac') != -1) && (flag == null)){
  if (document.all){ // Mac_IE
    flag = "mie";
    document.open();
    document.write(cssTags + cssDir + flag + '.css" title="MacIE_style" />');
    document.close();
  } else { // Mac_NS
    flag = "mns";
    document.open();
    document.write(cssTags + cssDir + flag + '.css" title="MacNS_style" />');
    document.close();
  }
}

if (flag == null){
  flag = "fox";
  document.open();
  document.write(cssTags + cssDir + flag + '.css" title="firefox_style" />');
  document.close();
}

//+++6.更新の履歴の書き出し
log_file = new Array('','index.htm','index0.htm','index1.htm');
function chglog(obj){
  location.href = log_file[obj.selectedIndex];
}

function newshtml(){
  var news = '';
  news += '<form action="">';
  news += '<select name="log" onChange="chglog(this);">';
  news += '<option value="" selected>過去の履歴はこちら</option>';
  news += '<option value="index.htm">更新の履歴　　</option>';
  news += '<option value="index0.htm">今月の更新履歴</option>';
  news += '<option value="index1.htm">先月の更新履歴</option>';
  news += '</select></form>';
  document.write(news);
}
