//　メニュー画像のプレロード
img1 = new Image();
img1.src = "../cmn_img/m_ucar_on.gif";
                
img2 = new Image();
img2.src = "../cmn_img/m_buy_on.gif";
                
img3 = new Image();
img3.src = "../cmn_img/m_garage_on.gif";
                
img4 = new Image();
img4.src = "../cmn_img/m_carlife_on.gif";
                
img5 = new Image();
img5.src = "../cmn_img/m_link_on.gif";

img6 = new Image();
img6.src = "../cmn_img/m_bike_on.gif";

img7 = new Image();
img7.src = "../cmn_img/m_sitemap_on.gif";


//　ブラウザ判定初期設定
var uAgt = navigator.userAgent;
var apVer = navigator.appVersion;
var chkAgt = uAgt.indexOf("MSIE",0);
var chkApVer = apVer.indexOf("Win",0);
var pFm;
var bRw;
var vSn;

//　ブラウザの判定用関数
function chkBrws() {
	if (chkAgt != -1 ) {
		bRw = "IE";
		return
	}else{
		chkAgt = uAgt.indexOf("Mozilla",0);
		if (chkAgt != -1 ) {
			bRw = "NN";
			return
		}else{
			bRw = "";
			return
		}
	}
}

//　プラットフォームの判定用関数
function chkPltfrm() {
	if (chkApVer != -1 ) {
		pFm = "Win";
			return
	}else{
		chkApVer = apVer.indexOf("Mac",0);
		if (chkApVer != -1 ) {
			pFm = "Mac";
			return
		}else{
			pFm = "";
			return
		}
	}
}

//　Netscape6の判定用関数
function nnV6() {
	chkApVer = apVer.indexOf("5",0);
	if (bRw == "NN") {
		if (chkApVer != -1 ) {
			bRw = "NN6";
			return
		}else{
			bRw = "NN";
			return
		}
	}else{
		return
	}
}

//　プラットフォーム、ブラウザ判定実行
chkBrws();
chkPltfrm();
nnV6();

//document.write (pFm+"の"+bRw+"です");

//　スタイルシートの振り分け
if (pFm == "Win" && bRw == "IE") {
	document.write ('<link rel="stylesheet" href="/css/win_ie.css" type="text/css" title="Win IE">');
} else if (pFm == "Mac" && bRw == "IE") {
	document.write ('<link rel="stylesheet" href="/css/mac_ie.css" type="text/css" title="Mac IE">');
} else if (pFm == "Mac" && bRw == "NN") {
	document.write ('<link rel="stylesheet" href="/css/mac_nn.css" type="text/css" title="Mac NN">');
} else if (pFm == "Win" && bRw == "NN") {
	document.write ('<link rel="stylesheet" href="/css/win_nn.css" type="text/css" title="Win NN">');
} else {
	document.write ('<link rel="stylesheet" href="/css/non.css" type="text/css" title="Ather">');
}


//　オプション解説オープン
function swinopen(){
	window.open('option.html','opt','dependent=yes,height=330,width=300,directories=no,location=no,resizable=no,status=no,toolbar=no,scrollbars=yes');
}
