// CSS記述書き込み用スクリプト

/* set variable */
var cssDir = '../css/'; // default CSS Directory
var cssTags = '<link rel="stylesheet" type="text/css" href="';
var flag = null;
var _poor = 'CSS no support';

/* correction of pathname 06.07.27 */
var cssPath = window.location.pathname;
if (cssPath.search(/fund/ && /search/ && /31/) != -1) {
	cssDir = '../../../css/';
}	else	{
	cssDir = '../css/';
}

/* css diverge for cross platform & cross browser */
if (_win) { // win os
	if (_ns6) { // Windows Netscape6.X
		flag = 'winnn6';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="WinNS6_style">');
		document.close();
		//alert('Windows Netscape6.X');
	}
	else if (_ns4 || _ns4up || _nav) { // Windows Netscape4.X
		flag = 'winnn4';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="WinNS_style">');
		document.close();
		//alert('Windows Netscape4.X');
	}
	else if (_ie4 || _ie4up || _ie5 || _ie5up) { // Windows IE
		flag = 'winie';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="WinIE_style">');
		document.close();
		//alert('Windows IE');
	}
	else if (_ns2 || _ns3 || _ie3) { // WindowsでCSS未対応のブラウザ
		flag = _poor + ' browser...';
		alert(flag);
	}
	else if (_opera) { // Windows OPERA
		flag = 'winope';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="WinOpera_style">');
		document.close();
		//alert('Windows OPERA');
	}
	else { // Windowsその他のブラウザ
		flag = 'other';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="other_style">');
		document.close();
		//alert('other');
	}
}

else if (_mac) { // mac os
	if (_ns6) { // Mac Netscape6.X
		flag = 'macnn6';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="MacNS6_style">');
		document.close();
		//alert('Mac Netscape6.X');
	}
	else if (_ns4 || _ns4up || _nav) { // Mac Netscape4.X
		flag = 'macnn4';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="MacNS_style">');
		document.close();
		//alert('Mac Netscape4.X');
	}
	else if (_ie5 || _ie5up) { // Mac IE5
		flag = 'macie';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="MacIE_style">');
		document.close();
		//alert('Mac IE5');
	}
	else if (_ie4 || _ie45 || _ie4up) { // Mac IE4.X
		flag = 'macie';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="MacIE_style">');
		document.close();
		//alert('Mac IE4.X');
	}
	else if (_ns2 || _ns3 || _ie3) { // MacでCSS未対応のブラウザ
		flag = _poor + ' browser...';
		//alert(flag);
	}
	else if (_opera) { // Mac OPERA
		flag = 'macope';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="MacOpera_style">');
		document.close();
		//alert('Mac OPERA');
	}
	else if (_safari) { // Mac safari
		flag = 'macsaf';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="Macsafari_style">');
		document.close();
		//alert('Mac Safari');
	}
	else { // Macその他のブラウザ
		flag = 'other';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="other_style">');
		document.close();
		//alert('other');
	}
}

else { // その他のブラウザ
		flag = 'other';
		document.open();
		document.write(cssTags + cssDir + flag + '.css" title="other_style">');
		document.close();
		//alert('other');
}

