// 文字エンコーディング:UTF-8 改行コード:CR+LF
//==============================================================================
// prefetch menu button images.

//(new Image()).src = "image/mb_index.png";
(new Image()).src = "image/mbon_index.png";

//(new Image()).src = "image/mb_eigyouannai.png";
(new Image()).src = "image/mbon_eigyouannai.png";

//(new Image()).src = "image/mb_shidakai.png";
(new Image()).src = "image/mbon_shidakai.png";

//(new Image()).src = "image/mb_schoollesson.png";
(new Image()).src = "image/mbon_schoollesson.png";

//(new Image()).src = "image/mb_junior.png";
(new Image()).src = "image/mbon_junior.png";

//(new Image()).src = "image/mb_golfshop.png";
(new Image()).src = "image/mbon_golfshop.png";

//(new Image()).src = "image/mb_restaurant.png";
(new Image()).src = "image/mbon_restaurant.png";

//(new Image()).src = "image/mb_bodycare.png";
(new Image()).src = "image/mbon_bodycare.png";

//(new Image()).src = "image/mb_access.png";
(new Image()).src = "image/mbon_access.png";

//==============================================================================

// DHTML用にドキュメントの仕様を判別。
if ( document.getElementById ) { var archdt = 'a' }// IE 5.x 以降、及び NN 6.x 以降
else if ( document.all ) { var archdt = 'b' }// IE 4.x 以前
else if ( document.layers ) { var archdt = 'c' }// NN 4.x 以前

// OSの種類を判別、取得。
if ( navigator.appVersion.indexOf ( 'Win' ) != -1 ) { var archos = 'Win'; }
else if ( navigator.appVersion.indexOf ( 'Mac' ) != -1 ) { var archos = 'Mac'; }

// Browser名を取得。
var archwb = navigator.appName.charAt ( 0 );

// BrowserのVersionを取得。
var archvr = navigator.appVersion.substr ( 0, 3 );

//==============================================================================

// サブウィンドウのポップアップ処理 ----------------
function popup ( locationid, nameid, widthid, heightid, leftid, topid, conditionid ) {
  var attribute01 = 'no';// scrollbars + resizable
  var attribute02 = 'no';// menubar + status
  var attribute03 = 'no';// toolbar

  if ( conditionid == 1 ) { attribute01 = 'yes'; }
  else if ( conditionid == 2 ) { attribute01 = 'yes'; attribute02 = 'yes'; }
  else if ( conditionid == 3 ) { attribute01 = 'yes'; attribute03 = 'yes'; }	

  if ( attribute01 == 'yes' ) {// スクロールバーによるウィンドウの有効幅の調整
    // Win IE 、及び Win NN 4.x 以前
    if ( archos == 'Win' && archwb == 'M' || archos == 'Win' && archdt == 'c' ) { widthid += 16; }
    // Mac IE
    else if ( archos == 'Mac' && archwb == 'M' ) { widthid -= 1; }
    // Mac NN 4.x 以前
    else if ( archos == 'Mac' && archdt == 'c' ) { widthid += 15; }
    // NN 7.x
    else if ( archdt == 'a' && archwb == 'N' && document.body.clientHeight ) { widthid += 15; }
    // NN 6.x
    else if ( archdt == 'a' && archwb == 'N' && !document.body.clientHeight ) { widthid += 14; }
  }

  var attributeid = 'width=' + widthid + ',height=' + heightid + ',left=' + leftid + ',top=' + topid + ',menubar=' + attribute02 + ',toolbar=' + attribute03 + ',location=no,directories=no,status=' + attribute02 + ',scrollbars=' + attribute01 + ',resizable=' + attribute01;
  var winop = window.open( locationid, nameid, attributeid );
  winop.focus();
}

//==============================================================================

function winopen(url,winName,features){
  var winop = window.open( url, winName, features );
  winop.focus();
}

//==============================================================================

