/*****************************************/
/* ブラウザの判定用定数 */
var BROWSER_IE = "INTERNET EXPLORER";
var BROWSER_FF = "FIRE FOX";
var BROWSER_UB = "UNKOWN BROWSER";
var CACHE_BROWSER_TYPE = "";
var CACHE_BROWSER_VERSION = -1;
/*****************************************/
/* メニューボタンの設定 */
/* メニューボタンIDのPREFIX文字列 */
var STR_MENU_BUTTON_ID = "menu_button_id_";
var STR_MENU_AREA_ID = "_menu_area";
var TOP_MENU_BUTTON_ON = "url(/images/ZZ_ESPA_COMMON_left_btn_on.gif)";
var TOP_MENU_BUTTON_OFF = "url(/images/ZZ_ESPA_COMMON_left_btn.gif)";
/* 選択されたボタンの文字色 */
var SELECTED_STRING_COLOR = "#CC0000";
/* メニューボタンの設定リスト */
var topMenuList = new Array();
/* 独立ページの親メニューを格納する配列 */
var parentMenuList = new Array();
var parentMenuListMatch = new Array();

/*************************************************************************************************************************/
/*****************************************/
/* メニューボタンのサブメニューを開く処理 */
/* 対象ページに該当するサブメニューを開く */
function openTargetMenuButtonArea(){
var pageURL = location.pathname;
if (parentMenuList[pageURL] != undefined){
// 子階層と関連付けられた浮動ページの場合、子階層であるかのようにふるまう。
pageURL=parentMenuList[pageURL];
}
for (key in parentMenuListMatch){
rObj = new RegExp(key);
if (pageURL.match(rObj)) {
pageURL=parentMenuListMatch[key];
}
}


var objMenuArea = document.getElementById("menuListArea");
openTargetMenuButton(objMenuArea, pageURL);
}
/******************************************/
/* 対象ページに該当するサブメニューを開く */
function openTargetMenuButton(objMenuArea, pageURL){
var i = 0;
var rv = false;
// ボタンとURLの比較
for(i=0 ; i<objMenuArea.childNodes.length ; i++){
rv = rv || openButtonURL(objMenuArea.childNodes[i], pageURL);
}
return rv;
}
/******************************************/
/* pageURLがボタンのURL情報に一致するかの判定 */
function openButtonURL(objButtonContext, pageURL){
var rv = false;
if(!objButtonContext.id) return rv;
// ボタンIDのPREFIXでボタンの階層を分割
var menuLevel = objButtonContext.id.split(STR_MENU_BUTTON_ID);
// 一番後ろが数字でないときはボタンではない（ボタンエリア）ので無視する
if(isNaN(menuLevel[menuLevel.length - 1])) return rv;
// ボタン自身のリンク情報とURLをチェック
if(isEqualManagementURL(objButtonContext.menuContext.managementURL, pageURL)){
// ボタン自身のURL情報と一致したとき
if(objButtonContext.id.indexOf(STR_MENU_AREA_ID) < 0){
// TOP階層が選択表示
// objButtonContext.style.backgroundImage = TOP_MENU_BUTTON_ON;
objButtonContext.onmouseover();
objButtonContext.onmouseover = function () {};
objButtonContext.onmouseout = function () {};
if(objButtonContext.childNodes && objButtonContext.childNodes[0]){
objButtonContext.childNodes[0].style.display = "block";
}
}else{
// サブ階層の場合は選択表示
objButtonContext.style.color = SELECTED_STRING_COLOR;

}
rv = true;
}
// 下の階層を持っているか？
if(document.getElementById(objButtonContext.id + STR_MENU_AREA_ID)) {
// 下の階層にあるボタンのURL情報とpageURLが一致するかを判定
if(openTargetMenuButton(document.getElementById(objButtonContext.id + STR_MENU_AREA_ID), pageURL)) {
objButtonContext.onmouseover();
objButtonContext.onmouseover = function () {};
objButtonContext.onmouseout = function () {};
document.getElementById(objButtonContext.id + STR_MENU_AREA_ID).style.display = "block";
openTargetMenuButton(document.getElementById(objButtonContext.id + STR_MENU_AREA_ID), pageURL)
rv = true;
}
}
return rv;
}

/******************************************/
/* 引数がメニュー直下のボタンのURLに一致するかの判定 */
function isEqualManagementURL(managementURL, pageURL){
var i=0;
for(i=0; i<managementURL.length ; i++){
if(managementURL[i] == pageURL){
return true;
}
}
return false;
}
/*************************************************************************************************************************/
/* メニューボタン作成処理 */
/******************************************/
/* メニューオブジェクトの設定 */
/* メニューオブジェクト */
function menuContext(paramViewName, paramLinkURL){
// 表示名称
this.viewName = paramViewName;
// リンク先URL
this.linkURL = paramLinkURL;
// メニューの配下のURLの一覧
this.managementURL = new Array(paramLinkURL);
// サブメニューの一覧
this.subMenuList = null;
// 特殊な処理
this.exFunction = null;
}
/*****************************************/
/* メニューボタンの作成処理 */
/* メニューボタンの作成 */
function createMenu(menuList){
// メニューの表示エリア取得
var objMenuArea = document.getElementById("menuListArea");
// メニューの作成
var i=0;
for (i=0 ; i<menuList.length ; i++) {
addMenuContext(objMenuArea, menuList[i], i);
}
}
/******************************************/
/* メニューボタンの追加処理 */
/* メニューボタンのリストからボタンを作成する */
/* リストに階層がある場合は下の階層も作成する */
/* 下の階層を作成する場合はサブメニューボタンのエリアを作り、その中にボタンを作成する */
/* ボタンの作成は再起呼出を行う */
function addMenuContext(objMenuArea, objMenuContext, count){
// ボタンID
var buttonID = objMenuArea.id + "_" + STR_MENU_BUTTON_ID + count;
// メニューボタンの作成
var objMenuButton = document.createElement("div");
objMenuButton.id = buttonID;
objMenuButton.menuContext = objMenuContext;
// メニューエリアにボタンを追加
objMenuButton.appendChild(getMenuButtonStringObject(objMenuContext, buttonID));
objMenuArea.appendChild(objMenuButton);
// ボタンのデザイン設定
if(objMenuArea.id == "menuListArea"){
appendButtonProperties(objMenuButton);
}else{
appendSubButtonProperties(objMenuButton);
}
// メニューに下の階層があれば再帰呼出
if(objMenuContext.subMenuList && objMenuContext.subMenuList.length > 0){
// サブメニューのエリアの作成
var objSubMenuButtonArea = document.createElement("div");
objSubMenuButtonArea.id = buttonID + STR_MENU_AREA_ID;
objSubMenuButtonArea.className = "sub_tree_button";
objSubMenuButtonArea.style.display = "none";
objMenuArea.appendChild(objSubMenuButtonArea);
// サブメニューボタンの作成
var i = 0;
for(i=0 ; i<objMenuContext.subMenuList.length ; i++){
addMenuContext(objSubMenuButtonArea, objMenuContext.subMenuList[i], i);
}
}
}
/******************************************/
/* メニューボタンの文字列の設定 */
/* 文字列に改行があった場合などを考慮して処理を分けた */
function getMenuButtonStringObject(objMenuContext, buttonID){
// メニューボタン文字列の作成
var objMenuButtonString = document.createElement("div");
// BRタグがあったときのタグの処理
var viewNameElements = objMenuContext.viewName.split("<br>");
var i = 0;
for(i = 0 ; i < viewNameElements.length ; i++){
// 改行処理
if(i > 0){
objMenuButtonString.appendChild(document.createElement("br"));
}
objMenuButtonString.appendChild(document.createTextNode(viewNameElements[i]));
}
return objMenuButtonString;
}

/******************************************/
/* メニューボタンの詳細設定 */
function appendButtonProperties(objMenuButton){
objMenuButton.onclick = function () {menuButtonClick(this);};
objMenuButton.onmouseover = function () {this.style.backgroundImage = TOP_MENU_BUTTON_ON;};
objMenuButton.onmouseout = function () {this.style.backgroundImage = TOP_MENU_BUTTON_OFF;};
// メニューボタンのデザインを設定
objMenuButton.className = "main_tree_button";
if(objMenuButton.menuContext && objMenuButton.menuContext.exFunction){
objMenuButton.menuContext.exFunction(objMenuButton);
}
}
/******************************************/
/* サブメニューボタンの詳細設定 */
function appendSubButtonProperties(objMenuButton){
objMenuButton.onclick = function () {menuButtonClick(this);};
// メニューボタンのデザインを設定
objMenuButton.className = "sub_tree_button";
if(objMenuButton.menuContext && objMenuButton.menuContext.exFunction){
objMenuButton.menuContext.exFunction(objMenuButton);
}
}
/******************************************/
/* メニューボタンの詳細設定 */
function menuButtonClick(objMenuButton){
if(!objMenuButton || !document.getElementById(objMenuButton.id) ){
alert("ボタンが見つかりません。(" + (objMenuButton ? objMenuButton.id : "objMenuButton is Null") + ")");
return;
}
location.href = objMenuButton.menuContext.linkURL;
}
/*************************************************************************************************************************/
/* 消防協会用の設定 */
/******************************************/
/* 情報館ボタンの装飾追加処理 */
function jyouhouKanButton(objMenuButton){
objMenuButton.style.marginTop = "10px";
objMenuButton.style.height = "37px";
objMenuButton.childNodes[0].style.paddingTop = "10px";
objMenuButton.childNodes[0].style.height = "23px";
objMenuButton.style.backgroundImage = "url(/images/ZZ_ESPA_COMMON_btn_shobodan_off.jpg)";
objMenuButton.onmouseover = function () {this.style.backgroundImage = "url(/images/ZZ_ESPA_COMMON_btn_shobodan_on.jpg)";};
objMenuButton.onmouseout = function () {this.style.backgroundImage = "url(/images/ZZ_ESPA_COMMON_btn_shobodan_off.jpg)";};
}
/******************************************/
/* 情報館サブボタンの装飾追加処理 */
function jyouhouKanSubButton(objMenuButton){
objMenuButton.style.backgroundImage = "url(/images/ZZ_ESPA_COMMON_eft_bg_shobodan.jpg)";
objMenuButton.childNodes[0].style.backgroundImage = "url(/images/ZZ_ESPA_COMMON_eft_bg_shobodan.jpg)";

}
/******************************************/
/* 改行ありのボタンの装飾追加処理 */
function brButton(objMenuButton, brCount){
if(objMenuButton.childNodes[0]){
objMenuButton.childNodes[0].style.padding = brCount > 1 ? "1px 0 0 10px" : "1px 0 0 20px";
objMenuButton.childNodes[0].style.height = "32px";
}
}
/******************************************/
/* ボタンのCSSを調整する処理 */
function buttonCssText(objMenuButton, cssText){
objMenuButton.style.cssText = cssText;
}
/******************************************/
/* ボタンを開きっぱなしにする */
function allwaysOpenButton(objMenuButton){
objMenuButton.onmouseover();
objMenuButton.onmouseover = function () {};
objMenuButton.onmouseout = function () {};
}
/******************************************/
/* ボタンを開きっぱなしにする */
function allwaysOpenSubButton(objMenuButton){
objMenuButton.parentNode.style.display = "block";
}
/******************************************/
/* ボタンの設定一覧 */
function initMenu(){
// **********
topMenuList.push(new menuContext("会長あいさつ", "http://www.nissho.or.jp/contents/static/kaichou.html"));

topMenuList.push(new menuContext("日本消防協会の沿革・組織", "http://www.nissho.or.jp/contents/static/soshiki/sosiki-top.html"));
topMenuList[topMenuList.length - 1].exFunction = function (obj) {brButton(obj, 1)};
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("組織に関する情報", "/contents/static/soshiki/sosiki-top.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("業務に関する情報", "/contents/static/soshiki/gyoumu-top.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("財務に関する情報", "/contents/static/soshiki/zaimu-top.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("各種規程", "/contents/static/soshiki/kitei-top.html"));

topMenuList.push(new menuContext("主要な行事", "http://www.nissho.or.jp/contents/static/soho/soho.html"));
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("全国消防操法大会", "/contents/static/soho/soho.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("全国消防殉職者慰霊祭", "/contents/static/gyouji/jyunsyokusya.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("定例表彰式", "/contents/static/gyouji/hyousyousiki.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("その他の行事", "/contents/static/gyouji/sonota-gyouji.html"));

topMenuList.push(new menuContext("各種制度のご案内", "http://www.nissho.or.jp/contents/static/shouboufukushi/shoubou-fukushi.html"));
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].exFunction = function (obj) {allwaysOpenButton(obj)};
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("消防団員福祉共済制度", "http://www.nissho.or.jp/contents/static/shouboufukushi/shoubou-fukushi.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("消防互助年金制度", "http://www.nissho.or.jp/contents/static/nenkin/nenkin.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("防火防災訓練共済制度", "http://www.nissho.or.jp/contents/static/hoshou/hoshou.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("婦人消防隊員共済制度", "http://www.nissho.or.jp/contents/static/fujin/fujin-fukushi.html"));
topMenuList[topMenuList.length - 1].subMenuList[topMenuList[topMenuList.length - 1].subMenuList.length - 1].exFunction = function (obj) {allwaysOpenSubButton(obj)};
topMenuList.push(new menuContext("機関紙「日本消防」", "http://www.nissho.or.jp/contents/static/kikanshi/kikanshi-top.html"));
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("機関紙「日本消防」", "/contents/static/kikanshi/kikanshi-top.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("バックナンバー・2008年度", "/contents/static/kikanshi/kikanshi-2008.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("バックナンバー・2007年度", "/contents/static/kikanshi/backnumber.html"));
topMenuList.push(new menuContext("いきいき消防", "http://www.nissho.or.jp/2009/04/post-2755.html"));

topMenuList.push(new menuContext("消防団幹部の職章", "http://www.nissho.or.jp/contents/static/syokushou/shokushou-shokushou.html"));
topMenuList.push(new menuContext("日消グッズ", "http://www.nissho.or.jp/contents/static/whatnew/060814goods.html"));
topMenuList.push(new menuContext("消防団等へのリンク", "http://www.nissho.or.jp/contents/static/link/link.html"));
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("リンク先一覧", "/contents/static/link/link.html"));

topMenuList.push(new menuContext("消防団情報館", "http://www.nissho.or.jp/contents/static/syouboudan/gaiyou.html"));
topMenuList[topMenuList.length - 1].exFunction = function (obj) {jyouhouKanButton(obj)};
var jyouhoukanSubMenuButtons = new Array();
jyouhoukanSubMenuButtons.push(new menuContext("消防団の概要", "/contents/static/syouboudan/gaiyou.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("消防団の活動内容", "/contents/static/syouboudan/katudou-naiyou.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("消防団の統計データ", "/contents/static/syouboudan/toukei-data.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("消防の歴史", "/contents/static/syouboudan/rekishi.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("消防団ＰＲ", "/contents/daily/pr/pr-ken.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].managementURL.push("/contents/daily/pr/syouboudan-list.html");
jyouhoukanSubMenuButtons.push(new menuContext("消防団ＰＲ登録申請", "/contents/static/syouboudan/pr-entry.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("全国の消防団<br>（データベース）", "/contents/static/syouboudan/zenkoku.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("消防団情報閲覧コーナー", "/2008/12/post-200.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
jyouhoukanSubMenuButtons.push(new menuContext("ラジオ放送おはよう！<br>ニッポン全国消防団", "/contents/daily/radio-content-list.html"));
jyouhoukanSubMenuButtons[jyouhoukanSubMenuButtons.length - 1].exFunction = function (obj) {jyouhouKanSubButton(obj)};
topMenuList[topMenuList.length - 1].subMenuList = jyouhoukanSubMenuButtons;
topMenuList.push(new menuContext("消防団ＰＲ", "/contents/daily/pr/pr-ken.html"));

topMenuList.push(new menuContext("全日本消防人共済会", "http://www.nissho.or.jp/contents/static/kyousai/kyousai.html"));
topMenuList[topMenuList.length - 1].exFunction = function (obj) {buttonCssText(obj, "margin-top:10px")};
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("火災共済のご案内", "/contents/static/kyousai/kyousai.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("業務・財務等に関する資料", "/contents/static/kyousai/051227docu.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("各種申請書", "/contents/static/eikai/eika-shinsei.html"));

topMenuList.push(new menuContext("消防育英会", "http://www.nissho.or.jp/contents/static/eikai/eikai.html"));
topMenuList[topMenuList.length - 1].exFunction = function (obj) {buttonCssText(obj, "margin-top:10px")};
topMenuList[topMenuList.length - 1].subMenuList = new Array();
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("消防育英会のご案内", "/contents/static/eikai/eikai.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("事業概要", "/contents/static/eikai/eikai-gaiyou.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("事業詳細", "/contents/static/eikai/eikai-shousai.html"));
topMenuList[topMenuList.length - 1].subMenuList.push(new menuContext("その他の活動", "/contents/static/eikai/eikai-katsudou.html"));


// 孫階層を子階層に一致させる連想配列
//以降、メニューに関連したページを作成する場合はここにメニューリンクと、作成したページを関連付けてください。

  //消防団員福祉共済制度
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-shikaku.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-kakekin.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-toukyuu.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-taisaku.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-kyuufunaiyou.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-seikyuu.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
parentMenuList['/contents/static/shouboufukushi/shoubou-fukushi-shiharawanai.html']='/contents/static/shouboufukushi/shoubou-fukushi.html';
  //消防互助年金
parentMenuList['/contents/static/nenkin/nenkin-course1.html']='/contents/static/nenkin/nenkin.html';
parentMenuList['/contents/static/nenkin/nenkin-shisanhyou-1.html']='/contents/static/nenkin/nenkin.html';
parentMenuList['/contents/static/nenkin/nenkin-shikumi.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-course2.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-shisanhyou-2.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-seiritsu.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-haraikomi.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-zeihou.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-naiyou.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-shitsumon.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-kaigai.html']='/contents/static/nenkin/nenkin.html';
  parentMenuList['/contents/static/nenkin/nenkin-kanyuu.html']='/contents/static/nenkin/nenkin.html';
//消防育英会のご案内
//役員名簿
  parentMenuList['/contents/static/eikai/yakuinmeibo.html']='/contents/static/eikai/eikai.html';
  parentMenuList['/contents/static/eikai/keisan16.html']='/contents/static/eikai/eikai.html';
  parentMenuList['/contents/static/eikai/yosan17.html']='/contents/static/eikai/eikai.html';
  parentMenuList['/contents/static/eikai/060309shoruiichiran.html']='/contents/static/eikai/eikai.html';

}
/*************************************************************************************************************************/
/* その他 */
/******************************************/
/* debugger */
function getObjectChild(targetObject){
if(!targetObject) return "object is null";
var temp = new Array();
var childObject = null;
for(childObject in targetObject){
temp.push(childObject);
}
temp.sort();
var i = 0;
var rv = "";
for(i=0 ; i<temp.length ; i++){
rv += temp[i] + ":" + targetObject[temp[i]] + (i % 5 == 1 ? "\n" : " ");
i++;
}
return targetObject.id ? targetObject.id : targetObject.name + "\n" + rv;
}

/******************************************/
/* ブラウザ名 */
function getBrowserType(){
if(CACHE_BROWSER_TYPE != ""){
return CACHE_BROWSER_TYPE;
}
if(navigator.userAgent.indexOf("MSIE 7.") > -1){
CACHE_BROWSER_TYPE = BROWSER_IE;
CACHE_BROWSER_VERSION = 7;
}
else if(navigator.userAgent.indexOf("MSIE 6.") > -1){
CACHE_BROWSER_TYPE = BROWSER_IE;
CACHE_BROWSER_VERSION = 6;
}
else if(navigator.userAgent.indexOf("MSIE 5.") > -1){
CACHE_BROWSER_TYPE = BROWSER_IE;
CACHE_BROWSER_VERSION = 5;
}
else if(navigator.userAgent.indexOf("Firefox/2.") > -1){
CACHE_BROWSER_TYPE = BROWSER_FF;
CACHE_BROWSER_VERSION = 2;
}
else if(navigator.userAgent.indexOf("Firefox/1.5") > -1){
CACHE_BROWSER_TYPE = BROWSER_FF;
CACHE_BROWSER_VERSION = 1.5;
}
else {
CACHE_BROWSER_TYPE = BROWSER_UB;
CACHE_BROWSER_VERSION = 0;
}
return CACHE_BROWSER_TYPE;
}
/******************************************/
/* ブラウザのバージョン番号 */
function getBrowserVersion(){
if(CACHE_BROWSER_VERSION != -1){
return CACHE_BROWSER_VERSION;
}
getBrowserType();
return CACHE_BROWSER_VERSION;
}








