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

//+++++1.ウィンドウオープン関連
//+++++2.CSS振り分け
//+++++3.メインメニュー（書き出し）
//+++++5.システムナビ（/system以外の）+++//



//+++++++++++++++1.ウィンドウオープン関連：javascript++++++++++++++++++//

// コンテンツのウィンドウを開くスクリプト
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 profwin(shop,girl){
  popup('http://www.fk-' + shop + '.com/zaiseki/' + girl,girl,'750','652');
}

// ポップアップ
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 pophare(di,wi,he){
  filez = 'http://www.harenchi.co.jp/fukuoka/events/' + di;
  popup(filez,di,wi,he);
}

//イベントカレンダー用イベントポップアップ
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 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);
}

// もぎたて新人
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 popfukuro(di,wi,he){
  filez = 'http://www.harenchi.co.jp/fukuoka/member/events/' + di;
  popup(filez,di,wi,he);
}

// 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 OpenMovieWindow(pid){
    var file = 'movie.php?id=' + pid;
    window.open(file,'profmovie','width=400,height=400,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}

// 袋とじムービーのポップアップ
function OpenFukuroMovieWindow(pid){
    var file = '/member/zaiseki/movie.php?id=' + pid;
    window.open(file,'profmovie','width=400,height=400,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}
//+++++++++++++++1.以上++++++++++++++++++//

//+++++++++++++++2.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) {
    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) {
    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();
    }
}

// for debug
/*
alert(flag);
*/
//+++++++++++++++2.以上++++++++++++++++++//

//+++++++++++++++3.メインメニュー++++++++++++++++++//
function mainmenu(thisPage)
{
    document.write('<div id="menu">');
    document.write('<h2>当店について</h2>');
    //--------------------------リンク切り振り分け
        if(thisPage=='intro'){
        document.write('<span><em>お店のご紹介</em></span>');
    }else{
        document.write('<span><a href="/system/intro.htm">お店のご紹介</a></span>');
    }
    if(thisPage=='guide'){
        document.write('<span><em>ご来店の手引き</em></span>');
    }else{
        document.write('<span><a href="/system/guide.htm">ご来店の手引き</a></span>');
    }
    if(thisPage=='system'){
        document.write('<span><em>料金とシステム</em></span>');
    }else{
        document.write('<span><a href="/system/index.htm">料金とシステム</a></span>');
    }
    if(thisPage=='map'){
        document.write('<span><em>交通アクセス</em></span>');
    }else{
        document.write('<span><a href="/map/index.htm">交通アクセス</a></span>');
    }
    if(thisPage=='option'){
        document.write('<span><em>オプション&3P</em></span>');
    }else{
        document.write('<span><a href="/play/option.htm">オプション&3P</a></span>');
    }
    if(thisPage=='mail'){
        document.write('<span><em>お問い合わせ</em></span>');
    }else{
        document.write('<span><a href="/mail/index.htm" title="お問い合わせ">お問い合わせ</a></span>');
    }
    if(thisPage=='sitemap'){
        document.write('<span><em>サイトマップ</em></span>');
    }else{
        document.write('<span><a href="/sitemap/index.htm" title="サイトマップ">サイトマップ</a></span>');
    }
    document.write('</ul>');
    document.write('<h2>コンテンツ</h2>');
    if(thisPage=='news'){
        document.write('<span><em>更新情報</em></span>');
    }else{
        document.write('<span><a href="/news/index.htm">更新情報</a></span>');
    }
    if(thisPage=='syukkin'){
        document.write('<span><em>出勤予定表</em></span>');
    }else{
        document.write('<span><a href="/syukkin/index.htm">出勤予定表</a></span>');
    }
    if(thisPage=='list'){
        document.write('<span><em>在籍の女の子</em></span>');
    }else{
        document.write('<span><a href="/zaiseki/index.htm">在籍の女の子</a></span>');
    }
    if(thisPage=='bbs'){
        document.write('<span><em>掲示板</em></span>');
    }else{
        document.write('<span><a href="/bbs/index.htm">掲示板</a></span>');
    }
    if(thisPage=='link'){
        document.write('<span><em>オススメリンク</em></span>');
    }else{
        document.write('<span><a href="/links/">オススメリンク</a></span>');
    }
    document.write('<div>');
//イベント関係の出勤（GW・お盆・年末年始）
//    document.write('<a href="/syukkin/holiday_view.php?target=bon"><img src="/images/bana_obon.gif" alt="お盆の出勤" /></a>');
    document.write('<a href="/extra/diary/index.htm" title="マット日記"><img src="/images/bana_diary.jpg" alt="マット日記" /></a>');
    document.write('<a href="/extra/kapa/"><img src="/extra/kapa/images/bana.gif" alt="カパちゃんねる" /></a>');
    document.write('</div>');
    document.write('<div>');
    if(thisPage=='fukuro'){
    	document.write('<em id="fukuro">袋とじパスについて</em>');
	} else {
	    document.write('<a href="/system/fukuro.htm" id="fukuro">袋とじパスについて</a>');
	}
    document.write('<a href="/member/play/"><img src="/extra/play/bana100.gif" alt="マットの遊び方" /></a>');
    document.write('<a href="/member/tech/" title="骨抜きマット技集をご紹介"><img src="/images/bana_hone.jpg" alt="骨抜きマット技集" /></a>');
    document.write('</div>');
    document.write('</div>');
    }
	
//+++5.システムナビ（/system以外の）+++//
function syslink()
{
 var slink;
 slink = '<ul id="syslink">';
 slink += '<li>｜<a href="/system/intro.htm" title="福岡マットDEいってミルクとはどんなお店なのかをご紹介">お店のご紹介</a>｜</li>';
 slink += '<li><a href="/system/guide.htm" title="お遊びまでの流れをご紹介">ご来店の手引き</a>｜</li>';
 slink += '<li><a href="/system/" title="福岡マットDEいってミルクの料金などのシステムについてご紹介">料金とシステム</a>｜</li>';
 slink += '<li><a href="/system/map.htm" title="福岡マットDEいってミルクの周辺地図と交通手段ごとのアクセス方法をご紹介">アクセスマップ</a>｜</li>';
 slink += '<li><a href="/system/faq.htm" title="福岡マットDEいってミルク初心者の方からよくある質問をまとめました">FAQ</a>｜</li>';
 slink += '</ul>';
document.write(slink);
}
