//オブジェクト変数設定
var osName = navigator.appVersion ;
var browser = navigator.appName ;
var agent = navigator.userAgent ;
//IBMホームページ・リーダー用
var ibmHPR = "";
for(i in navigator){
	ibmHPR += i
}
//各種スタイルシートのパス設定
var winIEstylesheet = "/scripts/style_winIE.css" ;
var winNNstylesheet = "/scripts/style_winNN.css" ;
var winOPERAstylesheet = "/scripts/style_winOPERA.css" ;
var winIBMstylesheet = "/scripts/style_winIBM.css" ;
var macIEstylesheet = "/scripts/style_macIE.css" ;
var macNNstylesheet = "/scripts/style_macNN.css" ;
var maciCabstylesheet = "/scripts/style_maciCab.css" ;
//IBMホームページ・リーダー有
if(ibmHPR.indexOf("IBM",0)!="-1"){
	document.write( "<link rel=\"stylesheet\" href=\"" + winIBMstylesheet +  "\" type=\"text/css\">" );
}
//IBMホームページ・リーダー無
else if(ibmHPR.indexOf("IBM",0)=="-1"){
	//Macintoshのスタイルシート
	if(osName.indexOf('Mac')!=-1){
		//Netscape Navigator用
		if(browser.charAt(0)=="N"){
			document.write( "<link rel=\"stylesheet\" href=\"" + macNNstylesheet +  "\" type=\"text/css\">" );
		}
		//iCab用
		else if(agent.indexOf("iCab",0)!="-1"){
			document.write( "<link rel=\"stylesheet\" href=\"" + maciCabstylesheet +  "\" type=\"text/css\">" );
		}
		//Internet Explorer用
		else if(browser.charAt(0)=="M"){
			document.write( "<link rel=\"stylesheet\" href=\"" + macIEstylesheet +  "\" type=\"text/css\">" );
		}
	}
	//windowsのスタイルシート
	else if(osName.indexOf('Win')!=-1){
		//Netscape Navigator用
		if(browser.charAt(0)=="N"){
			document.write( "<link rel=\"stylesheet\" href=\"" + winNNstylesheet +  "\" type=\"text/css\">" );
		}
		//Opera用
		else if(agent.indexOf("Opera",0)!="-1"){
			document.write( "<link rel=\"stylesheet\" href=\"" + winOPERAstylesheet +  "\" type=\"text/css\">" );
		}
		//Internet Explorer用
		else if(browser.charAt(0)=="M"){
			document.write( "<link rel=\"stylesheet\" href=\"" + winIEstylesheet +  "\" type=\"text/css\">" );
		}
	}
}