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

//+++++0.ウィンドウオープン関連
//+++++1.CSS振り分け
//+++++2.グループリンク
//+++++3.メインメニュー（書き出し）
//+++++4.gotop（書き出し）
//+++++5.copyright（書き出し）

//+++0.ウィンドウオープン関連：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,'photos',prop);
}
// プロフィール用
function profwin(shop,girl){
  window.open('http://www.km-' + shop + '.com/zaiseki/' + girl + '/',girl,'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=750,height=655');
}
// メイド＆マッティプロフィール用
function popprof(shop,girl){
  filez = 'http://www.km-' + shop + '.com/zaiseki/' + girl + '/';
  prop  = 'SCROLLBARS=1,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=795';
  girls = girl;
  window.open(filez,girls,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 pophare(di,wi,he){
  filez = 'http://www.harenchi.co.jp/kumamoto/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 popEvent(shop,di,wi,he){
  if(shop == 'kumamoto'){
    filez = 'http://www.harenchi.co.jp/kumamoto/events/' + di;
  }else{
    filez = 'http://www.km-' + shop + '.com/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 popgra(){
  filez = 'http://www.harenchi.co.jp/kumamoto/extra/gravure/';
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=730,height=600';
  nam = 'gravure';
  win_name = window.open(filez,nam,prop);
}

// トップグラビア
function popgra2(girl){
  filez = 'http://www.harenchi.co.jp/kumamoto/extra/gravure/' + girl + '/';
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=730,height=600';
  nam = 'gravure';
  win_name = window.open(filez,nam,prop);
}

// トップグラビア
function popgra3(girl){
  filez = 'http://www.harenchi.co.jp/kumamoto/extra/newgravure/' + girl + '/';
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=760,height=660';
  nam = 'gravure';
  win_name = window.open(filez,nam,prop);
}

// トップグラビア
function popokinawa(){
  filez = 'http://www.harenchi.co.jp/kumamoto/extra/gravure/k_okinawa/';
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=772,height=554';
  nam = 'gravure';
  win_name = window.open(filez,nam,prop);
}

// クリスマストップグラビア
function popxmas(){
  filez = 'http://www.harenchi.co.jp/kumamoto/extra/gravure/0812xmas/';
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=700,height=575';
  nam = 'gravure';
  win_name = window.open(filez,nam,prop);
}

// トップ晴れ着
function popharegi(){
  filez = 'http://www.harenchi.co.jp/kumamoto/extra/gravure/anna2/';
  prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=730,height=600';
  nam = 'gravure';
  win_name = window.open(filez,nam,prop);
}

// カプリ娘コスチューム
function zukanwin(id){
  var dir = 'http://www.km-caprico.com/costume/page/' + id + '.htm';
  var prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=220,height=460';
  window.open(dir,id,prop);
}
// ハレンチ女学園コスチュームのウィンドウを開くスクリプト
function coswin(no,girls){
  filez = 'http://www.km-harejo.com/costume/' + no + '/' + girls + '.htm';
  prop  = 'SCROLLBARS=1,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=765';
  girls = girls + 'cos';
  window.open(filez,girls,prop);
}
// メイド服コスチュームのウィンドウを開くスクリプト
function maidCosWin(no){
  filez = 'http://www.km-maid.com/costume/' + no + '/';
  prop  = 'SCROLLBARS=1,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=780';
  cosno = 'cos' + no;
  window.open(filez,cosno,prop);
}


// コンテンツのウィンドウを開くスクリプト
function popSeifuku(no,girls){
  filez = 'http://www.km-harejo.com/costume/' + no + '/' + girls + '.htm';
  prop  = 'SCROLLBARS=1,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=765';
  girls = girls + 'cos';
  window.open(filez,girls,prop);
}

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

// ポップアップ スタッフからのコメント
function popPr(di){
  var files = '/zaiseki/' + di + '/staff.htm';
  var names = di + 'pr'
  window.open(files,names,'width=600,height=612,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');
}

//TOPプライベートショット 
function pshot(no){
	filez = 'http://www.harenchi.co.jp/kumamoto/extra/pshot/index.php?page=' + no;
	prop = 'SCROLLBARS=no,resizable=no,menubar=no,directories=no,status=0,locationbar=no,width=410,height=300';
	nam = 'pshot' + no;
	win_name = window.open(filez,nam,prop);
}

//プライベートショット一覧をメインウィンドウに読み込む
function pslistLoad(url){
	if(!window.opener || window.opener.closed) // メインウィンドウの存在をチェック
		window.open('http://www.harenchi.co.jp/kumamoto/extra/pshot/'); // 存在しない場合は別窓で表示
	else
		window.opener.location.href = url; // 存在する場合はページを切りかえる
} 


//+++1.CSSの振り分け
// set Variable
  var Agent = navigator.userAgent;
  var cssDir = 'http://www.harenchi.co.jp/kumamoto/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();
  }
}

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


//+++2.グループリンク
var kmurl = 'http://www.harenchi.co.jp/kumamoto/';
var hjurl = 'http://www.km-harejo.com/';
var cpurl = 'http://www.km-caprico.com/';
var mdurl = 'http://www.km-maid.com/';
var bgurl = 'http://www.km-boing.com/';
var mturl = 'http://www.km-matto.com/';
var mfurl = 'http://www.km-matty.com/';
var km = '/kumamoto/';


//+++3.メインメニュー（書き出し）
function menu(thisPage){
  var mmenu = '';
  mmenu += '<div id="navi">';
  mmenu += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
  mmenu += '<tr>';
  mmenu += '<td class="orange">&nbsp;</td>';
  mmenu += '<td id="title">';
  mmenu += '<dl>';
  mmenu += '<dt><a href="http://www.harenchi.co.jp/main.htm">ハレ系</a></dt>';
  mmenu += '<dd><a href="/sapporo/main.htm">札幌</a>｜</dd>';
  mmenu += '<dd><a href="/tokyo/main.htm">東京埼玉</a>｜</dd>';
  mmenu += '<dd><a href="/yokohama/main.htm">横浜川崎</a>｜</dd>';
  mmenu += '<dd><a href="/fukuoka/main.htm">福岡</a></dd>';
  mmenu += '</dl>';
  mmenu += '<h1><a href="' + km + 'main.htm">熊本ハレ系</a></h1>';
  mmenu += '</td>';
  mmenu += '<td id="menu">';
  mmenu += '<div id="menu1">';
  mmenu += '<dl>';
  mmenu += '<dt>一括情報</dt>';
  if(thisPage=="up"){
    mmenu += '<dd><em>ＵＰ速報</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'up">ＵＰ速報</a></dd>';
  }if(thisPage=="search"){
    mmenu += '<dd><em>女の子検索</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'search">女の子検索</a></dd>';
  }if(thisPage=="sinjin"){
    mmenu += '<dd><em>もぎたて新人</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'sinjin/">もぎたて新人</a></dd>';
  }if(thisPage=="sitemap"){
    mmenu += '<dd><em>エリアナビ</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'sitemap/navi.htm">エリアナビ</a></dd>';
  }if(thisPage=="syukkin"){
    mmenu += '<dd><em>出勤一覧</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'extra/syukkin/">出勤一覧</a></dd>';
  }if(thisPage=="map"){
    mmenu += '<dd><em>店舗ＭＡＰ</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'map/">店舗ＭＡＰ</a></dd>';
  }if(thisPage=="mass"){
    mmenu += '<dd><em>マスコミ速報</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'mass/">マスコミ速報</a></dd>';
  }if(thisPage=="events"){
    mmenu += '<dd><em>イベント一覧</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'events/">イベント一覧</a></dd>';
  }
  mmenu += '</dl>';
  mmenu += '</div>';
  mmenu += '<div id="menu2">';
  mmenu += '<dl>';
  mmenu += '<dt>書込一覧</dt>';
  if(thisPage=="bbs"){
    mmenu += '<dd><em>質問掲示板</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'bbs/bbs.php">質問掲示板</a></dd>';
  }if(thisPage=="faq"){
    mmenu += '<dd><em>ハレンチの教え</em></dd>';
  }else{
    mmenu += '<dd><a href="' + km + 'bbs/faq/">ハレンチの教え</a></dd>';
  }if(thisPage=="exp"){
    mmenu += '<dd class="exp"><em>体験談</em></dd>';
  }else{
    mmenu += '<dd class="exp"><a href="' + km + 'exp/">体験談</a></dd>';
  }if(thisPage=="peach"){
    mmenu += '<dd class="peach"><em>チクリ箱</em></dd>';
  }else{
    mmenu += '<dd class="peach"><a href="' + km + 'mail/peach/">チクリ箱</a></dd>';
  }
  mmenu += '</dl>';
  mmenu += '</div>';
  mmenu += '<div id="ather">';
  mmenu += '<ul><li class="shoplink"><a href="' + hjurl + 'main.htm"><img src="/kumamoto/images/icon/harejo.gif" alt="ハレンチ女学園" /></a> <a href="' + mdurl + 'main.htm"><img src="/kumamoto/images/icon/maid.gif" alt="メイドin熊本" /></a> <a href="' + mturl + 'main.htm"><img src="/kumamoto/images/icon/matto.gif" alt="熊本DEマットっ" /></a> <a href="' + mfurl + 'main.htm"><img src="/kumamoto/images/icon/matty.gif" alt="熊本マッティー夫人" /></a></li><li><a href="/kumamoto/extra/gravure/">フォトグラビア</a>｜</li><li><a href="/kumamoto/vip/">常連様とは</a>｜</li><li><a href="' + km + 'links/">リンク</a>｜</li><li><a href="' + km + 'mail/">お問い合わせ</a>｜</li><li><a href="' + km + 'sitemap/">サイトマップ</a>｜</li><li><a href="' + km + 'help/">ＦＡＱ</a></li></ul>';
  mmenu += '</div><!--end_#pan-->';
  mmenu += '</td>';
  mmenu += '<td class="space">&nbsp;</td>';
  mmenu += '<td>&nbsp;</td>';
  mmenu += '</tr>';
  mmenu += '</table>';
  mmenu += '</div><!--end_#navi-->';
  document.write(mmenu);
}


  
//+++4.gotop
function gotop(){
  document.write('<p id="gotop"><a href="#navi">[ このページの先頭へ戻る ]</a></p>');
  }
  
//+++5.copyright
function copyright(){
  document.write('<div id="copyright">Copyright(C)<a href="/kumamoto/">熊本ハレ系</a> All rights reserved.</div>');
  }
  
  
  
//+++9.googleAnalytics用コード出力
function AnalyticsPrint(){
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-948941-5']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}


