/**********************************/
/* ブラウザの種類をチェックします */
/**********************************/

bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
if (bName == "Netscape" && bVer >= 5) { ver = 'n6'; }
else if (bName == "Netscape" && bVer == 4) { ver = 'n4'; }
else if (bName == "Netscape" && bVer == 3) { ver = 'n3'; }
else if (bName == "Netscape" && bVer == 2) { ver = 'n2'; }
else if (bName == "Microsoft Internet Explorer" && bVer >= 4) { ver = 'e4'; }
else if (bName == "Microsoft Internet Explorer" && bVer <= 3) { ver = 'e3'; }
else if (bName == "Opera" && bVer >= 6) { ver = 'o6'; }
else { ver = 'ot'; }




/************/
/* 関数定義 */
/************/

function getnum( CATEGORY ){
/* CATEGORY と文字列を比較して value を返します */
/* ※あまり使用しないでしょう。                 */

	if ( CATEGORY == 'home' ) { value = 0; }

	value;
}



function switchImg( CATEGORY, MODE ){
/* 表示されている画像を別な画像に変更します。     */
/* ※マウスをあてると変化する画像に利用できます。 */
/*                                                */
/* 呼び出し方：                                   */
/* <IMG id="home"                                 */
/*    onMouseOver="switchImg( 'home', 'over' )"   */
/*    onMouseOut="switchImg( 'home', 'out' )">     */
/*                                                */
/* 対象画像に name を入れること。                 */

	if( ver != 'ot' ) {

	switch( MODE ) {
		case 'over':
			document.images[CATEGORY].src = onImg[CATEGORY].src;
			break;
		case 'out':
			document.images[CATEGORY].src = offImg[CATEGORY].src;
			break;
	}
	}
	return true;
}



function verWarn() {
/* 文字列を定義します */

	strWARN = new String();

	if( bVer < 4 ) {
	strWARN =
	'<P class=doc>'+
	'Internet Explorer 4 以上 または Netscape 6 以上での閲覧をおすすめします。<BR>'+
	'他のブラウザでは表示がくずれる場合があります。<BR>'+
	'</P>';
	}
}


function np( PATH, STR ) {
/* 現在閲覧しているページと PATH を調べ、同じならば STR を返します */
/* 例：'<A href="./01.html"'+ np( '01.html', 'id=selected' ) +'>原型</A>' */

	check = location.href.indexOf( PATH, 0 );
	if( check != -1 ) {
		insStr = STR;
	} else {
		insStr = '';
	}
	return insStr;
}


function LinkSelect(form, sel)
/* ポップアップメニューからリンクジャンプ */
{
	adrs = sel.options[sel.selectedIndex].value;
	if (adrs != "-" ) location.href = adrs;
}


function showMsg( BNAME, SWON, SWOFF ) {
/* イベント発生により該当個所を表示します。(DHTML) */

	if ( ver != 'ot' ) {
	BNAME.style.display = "block";
	SWON.style.display  = "none";
	SWOFF.style.display = "inline";
	}
}
function hideMsg( BNAME, SWON, SWOFF ) {
/* イベント発生により該当個所を隠します。(DHTML) */

	if ( ver != 'ot' ) {
	BNAME.style.display = "none";
	SWON.style.display  = "inline";
	SWOFF.style.display = "none";
	}
}



function toggleMenu(mID) {
/* クリックする毎にメニューを表示／非表示します。 */
	flag = document.getElementById(mID).style.visibility;
	if( flag == "visible" ) {
		resetMenu();
		document.getElementById(mID).style.visibility = "hidden";
		document.getElementById(mID).style.display = "none";
	} else {
		resetMenu();
		document.getElementById(mID).style.visibility = "visible";
		document.getElementById(mID).style.display = "block";
	}
}



function resetMenu() {
/* ホームページのメニューを閉じた状態にします。 */
	if ( ver != 'n4' ) {
		for( i=1; i<=2; i++ ) {
			rID = 'menu' + i;
			document.getElementById(rID).style.visibility = "hidden";
			document.getElementById(rID).style.display = "none";
		}
	}
}



/*** dhtmlによる表示非表示 ***/
function show(id) {
  if (document.all) {
    document.all.item(id).style.visibility = "visible";
  }
  else if (document.getElementById) {
    document.getElementById(id).style.visibility = "visible";
  }
}
function hide(id) {
  if (document.all) {
    document.all.item(id).style.visibility = "hidden";
  }
  else if (document.getElementById) {
    document.getElementById(id).style.visibility = "hidden";
  }
}
function displaynone(id) {
  if (document.all) {
    document.all.item(id).style.display = "none";
  }
  else if (document.getElementById) {
    document.getElementById(id).style.display = "none";
  }
}
function displayblock(id) {
  if (document.all) {
    document.all.item(id).style.display = "block";
  }
  else if (document.getElementById) {
    document.getElementById(id).style.display = "block";
  }
}


function resetrecommend() {
	displaynone('pdefault');
	displaynone('p1960');
	displaynone('p1970');
	displaynone('p1980');
	displaynone('p1990');
	displaynone('p2000');
	hide('pdefault');
	hide('p1960');
	hide('p1970');
	hide('p1980');
	hide('p1990');
	hide('p2000');
}


function infSTR() {
/* 文字列を定義します */

	BASEURL = '';
	strTabnav = new String();

	if( ver != 'ot' ) {

	/* ナビゲーション用ドキュメント */
	strTabnav =
	'<div id="tabnav">'+
	'<ul>'+
	'	<li class="tab"><a href="../index.html" id="btn_home">HOME<br>ホーム</a></li>'+
	'	<li class="tab" onmouseover="show(\'id1\')" onmouseout="hide(\'id1\')"><a href="../products/index.html"'+ np( '/products', ' class="on"' ) +'>PRODUCTS<br><img src="../css/logo_epigas_small.gif" alt="EPIgas" width="60" height="18" style="vertical-align: middle;">製品</a>'+
	'	<ul id="id1" class="m2">'+
	'		<li><a href="../products/stove.html">ストーブ</a></li>'+
	'		<li><a href="../products/lantern.html">ランタン</a></li>'+
	'		<li><a href="../products/cartridge.html">カートリッジ</a></li>'+
	'		<li><a href="../products/accessories.html">アクセサリー</a></li>'+
	'		<li><a href="../products/cooker.html">クッカー</a></li>'+
	'		<li><a href="../products/emergency.html">エマージェンシー</a></li>'+
	'	</ul></li>'+
	'	<li class="tab"><a href="../collection/index.html"'+ np( '/collection', ' class="on"' ) +'>COLLECTION<br>コレクション</a></li>'+
	'	<li class="tab" onmouseover="show(\'id3\')" onmouseout="hide(\'id3\')"><a href="../cartridge/index.html"'+ np( '/cartridge/', ' class="on"' ) +'>CARTRIDGE<br>カートリッジに関して</a>'+
	'	<ul id="id3" class="m2">'+
	'		<li><a href="../cartridge/caution.html">使用上のご注意</a></li>'+
	'		<li><a href="../cartridge/purchase.html">購入について</a></li>'+
	'		<li><a href="../cartridge/shop.html">販売店検索</a></li>'+
	'	</ul></li>'+
	'	<li class="tab" onmouseover="show(\'id4\')" onmouseout="hide(\'id4\')"><a href="../brands/index.html"'+ np( '/brands', ' class="on"' ) +'>OTHERS<br>取扱ブランド</a>'+
	'	<ul id="id4" class="m2">'+
	'		<li><a href="../dug/index.html">DUG</a></li>'+
	'		<li><a href="../lifeline/index.html">LIFELINE</a></li>'+
	'		<li><a href="../aladdin/index.html">Aladdin</a></li>'+
	'		<li><a href="../redfeather/index.html">REDFEATHER</a></li>'+
	'		<li><a href="../skywatch/index.html">SKYWATCH</a></li>'+
	'		<li><a href="../bcb/index.html">BCB</a></li>'+
	'		<li><a href="http://www.amanofoods.co.jp/product/pro01.php" target="_blank">AMANOFOODS</a></li>'+
	'		<li><a href="../acme/index.html">ACME</a></li>'+
	'		<li><a href="../hogwild/index.html">HOGWILD</a></li>'+
	'		<li><a href="../handyheros/index.html">handyheros</a></li>'+
	'	</ul></li>'+
	'	<li class="tab"><a href="../company/index.html"'+ np( '/company', ' class="on"' ) +'>COMPANY<br>会社概要</a></li>'+
	'	<!-- li class="tab"><a href="../blog/index.html"'+ np( '/blog', ' class="on"' ) +'>BLOG<br>新着情報</a></li -->'+
	'	<li class="tab"><a href="http://epiblog.sailog.jp/" target="epigasblog">レシピ<br><small>簡単おいしいODごはん</small></a></li>'+
	'</ul>'+
	'</div>'+
	'';

	strNavEpi =
	'<div id="docnav">'+
	'<ul>'+
	'	<li><a href="stove.html"><img src="img/btn_products_stove'+ np( 'stove.html', '-over' ) +'.gif" alt="ストーブ" width="130" height="75" id="stove" onmouseover="switchImg( \'stove\', \'over\' )" onmouseout="switchImg( \'stove\', \'out\' )"></a></li>'+
	'	<li><a href="lantern.html"><img src="img/btn_products_lantern'+ np( 'lantern.html', '-over' ) +'.gif" alt="ランタン" width="130" height="75" id="lantern" onmouseover="switchImg( \'lantern\', \'over\' )" onmouseout="switchImg( \'lantern\', \'out\' )"></a></li>'+
	'	<li><a href="cartridge.html"><img src="img/btn_products_cartridge'+ np( 'cartridge.html', '-over' ) +'.gif" alt="カートリッジ" width="130" height="75" id="cartridge" onmouseover="switchImg( \'cartridge\', \'over\' )" onmouseout="switchImg( \'cartridge\', \'out\' )"></a></li>'+
	'	<li><a href="accessories.html"><img src="img/btn_products_accessories'+ np( 'accessories.html', '-over' ) +'.gif" alt="アクセサリ" width="130" height="75" id="accessories" onmouseover="switchImg( \'accessories\', \'over\' )" onmouseout="switchImg( \'accessories\', \'out\' )"></a></li>'+
	'	<li><a href="cooker.html"><img src="img/btn_products_cooker'+ np( 'cooker.html', '-over' ) +'.gif" alt="クッカー" width="130" height="75" id="cooker" onmouseover="switchImg( \'cooker\', \'over\' )" onmouseout="switchImg( \'cooker\', \'out\' )"></a></li>'+
	'	<li><a href="emergency.html"><img src="img/btn_products_emergency'+ np( 'emergency.html', '-over' ) +'.gif" alt="エマージェンシー" width="130" height="75" id="emergency" onmouseover="switchImg( \'emergency\', \'over\' )" onmouseout="switchImg( \'emergency\', \'out\' )"></a></li>'+
	'</ul>'+
	'</div>'+
	'';




	strNavOther =
	'<div id="docnav">'+
	'<ul>'+
	'	<li><a href="../dug/index.html"><img src="../brands/img/btn_dug'+ np( 'dug/', '-over' ) +'.gif" alt="DUG" width="130" height="60" id="dug" onmouseover="switchImg( \'dug\', \'over\' )" onmouseout="switchImg( \'dug\', \'out\' )"></a></li>'+
	'	<li><a href="../aladdin/index.html"><img src="../brands/img/btn_aladdin'+ np( 'aladdin/', '-over' ) +'.gif" alt="Aladdin" width="130" height="50" id="aladdin" onmouseover="switchImg( \'aladdin\', \'over\' )" onmouseout="switchImg( \'aladdin\', \'out\' )"></a></li>'+
	'	<li><a href="../bcb/index.html"><img src="../brands/img/btn_bcb'+ np( 'bcb/', '-over' ) +'.gif" alt="BCB" width="130" height="60" id="bcb" onmouseover="switchImg( \'bcb\', \'over\' )" onmouseout="switchImg( \'bcb\', \'out\' )"></a></li>'+
	'	<li><a href="../lifeline/index.html"><img src="../brands/img/btn_lifeline'+ np( 'lifeline/', '-over' ) +'.gif" alt="LIFELINE" width="130" height="50" id="lifeline" onmouseover="switchImg( \'lifeline\', \'over\' )" onmouseout="switchImg( \'lifeline\', \'out\' )"></a></li>'+
	'	<li><a href="../skywatch/index.html"><img src="../brands/img/btn_jdc'+ np( 'skywatch/', '-over' ) +'.gif" alt="JDC" width="130" height="70" id="jdc" onmouseover="switchImg( \'jdc\', \'over\' )" onmouseout="switchImg( \'jdc\', \'out\' )"></a></li>'+
	'	<li><a href="../redfeather/index.html"><img src="../brands/img/btn_redfeather'+ np( 'redfeather/', '-over' ) +'.gif" alt="REDFEATHER" width="130" height="60" id="redfeather" onmouseover="switchImg( \'redfeather\', \'over\' )" onmouseout="switchImg( \'redfeather\', \'out\' )"></a></li>'+
	'	<li><a href="http://www.amanofoods.co.jp/product/pro01.php" target="_blank"><img src="../brands/img/btn_amanofoods'+ np( 'amanofoods.html', '-over' ) +'.gif" alt="amanofoods" width="130" height="50" id="amanofoods" onmouseover="switchImg( \'amanofoods\', \'over\' )" onmouseout="switchImg( \'amanofoods\', \'out\' )"></a></li>'+
	'	<li><a href="../acme/index.html"><img src="../brands/img/btn_acme'+ np( 'acme/', '-over' ) +'.gif" alt="ACME" width="130" height="50" id="acme" onmouseover="switchImg( \'acme\', \'over\' )" onmouseout="switchImg( \'acme\', \'out\' )"></a></li>'+
	'	<li><a href="../hogwild/index.html"><img src="../brands/img/btn_hogwild'+ np( 'hogwild/', '-over' ) +'.gif" alt="HOGWILD" width="130" height="70" id="hogwild" onmouseover="switchImg( \'hogwild\', \'over\' )" onmouseout="switchImg( \'hogwild\', \'out\' )"></a></li>'+
	'	<li><a href="../handyheros/index.html"><img src="../brands/img/btn_handyheros'+ np( 'handyheros/', '-over' ) +'.gif" alt="handyheros" width="130" height="60" id="handyheros" onmouseover="switchImg( \'handyheros\', \'over\' )" onmouseout="switchImg( \'handyheros\', \'out\' )"></a></li>'+
	'</ul>'+
	'</div>'+
	'';



	strFooter =
	'<div id="footer">'+
	'<p>ユニバーサルトレーディング株式会社<br>'+
	'〒332-0004 埼玉県川口市領家 2-16-26 TEL:048-225-7756 FAX:048-225-8256 E-Mail:info@epigas.com<br>'+
	'&copy; UNIVERSAL TRADING Co., Ltd.</p>'+
	'</div>'+
	'';


	}
}


function cssTune() {
/* CSS調整用 */

	strCSSIE50 = new String();

	strCSSIE50 =
	'<style type="text/css">'+
	'#body,#footer'+
	'{'+
	'	width: 740px;'+
	'	padding-right: 10px;'+
	'	padding-left: 10px;'+
	'}'+
	'</style>'+
	'';

	if ( navigator.userAgent.indexOf( "MSIE 5", 0 ) >= 0 ) {
		document.writeln( strCSSIE50 );
	}
}




/************/
/* 初期実行 */
/************/

verWarn();
cssTune();
infSTR();


