//=======================================================
//　CSS振り分け 第2階層以降対応 ver1.0
//	create 2006.04.26
//	studio e-space Inc
//=======================================================

//------------------------------------------------
//　commonディレクトリの設置場所を指定する
//	※最後は/で終わるように
	var this_dir = '/';
//------------------------------------------------

var os = navigator.userAgent.toUpperCase();
var browser = navigator.appName.toUpperCase();
var version = navigator.appVersion.toUpperCase();
var this_path = location.pathname.replace(/\\/g, '/');
this_path = this_path.replace(/\/\/\//, '/');
this_path = this_path.replace(/\/\//, '/');
this_host = document.location.host;
/*
this_url = document.location.host + '/' + this_dir;
if (this_host == '' | this_host == 'localhost') {
	this_url = '/local/' + this_dir;
}
*/
var this_url = this_dir;
var split_path = this_path.split('/');
var split_url = this_url.split('/');
var direc_num = split_path.length - split_url.length;
var user = '';
if (os.indexOf('WIN') >= 0) {
	user += 'win_';
}
else if (os.indexOf('MAC') >= 0) {
	user += 'mac_';
}
if (version.indexOf('SAFARI') >= 0) {
	user += 'sa';
}
else if (browser.indexOf('EXPLORER') >= 0) {
	user += 'ie';
}
else if (browser.indexOf('NETSCAPE') >= 0) {
	user += 'nn';
}
var css_file = 'common/css/font/standard.css';
var print_css = 'common/css/print.css';
var win = 'common/css/font/win.css';
switch (user){
	case 'win_ie' : css_file = win; break;
	case 'win_nn' : css_file = win; break;
	case 'mac_sa' : css_file = 'common/css/font/mac_sa.css'; break;
	case 'mac_ie' : css_file = 'common/css/font/mac_ie.css'; break;
	case 'mac_nn' : css_file = 'common/css/font/mac_nn.css'; break;
}
/*
var directory = '';
for (var i = 0 ; i < direc_num ; i++) {
	directory = '../' + directory;
}
*/
document.write('<link href="' + this_url + css_file + '" type="text/css" rel="StyleSheet" media="screen,print">');
