
//□初期設定とパスをセット
var load_path;

//■ページの初期設定
//引数：ルート(設定ファイルの設置ディレクトリ)からの相対パス
//戻値：無し
//説明：ページの初期設定群
//備考：css読込で使用する「@import」は、Netscape 4.x及びWindows IE 4以前で無効
function init_set(path){
	//パスを設定(グローバル)
	load_path = path;
	
	//rollover
	load_rollover();
	
	//stylesheet
	set_stylefile (load_path+'css/');
}

//■css分岐
//引数：パス
//戻値：無し
//説明：ブラウザ(UserAgent)により、フォント設定用cssを分岐させる
//備考：css読込で使用する「@import」は、Netscape 4.x及びWindows IE 4以前で無効
//　　　Windows[IE6.0以降、FF1.5以降、NS7.1以降、OP8.5以降]、Mac OS 9[NS7.02以降]、Mac OS X[SF2.02以降]に対応
//　　　他OS、ブラウザの場合other.cssに分岐
function set_stylefile(filepath) {
	document.write('<style type="text/css">'+"\n");
	document.write('<!--'+"\n");
	
	//base.css
	document.write('@import url('+filepath+'base.css);'+"\n");
	
	if(navigator.userAgent.indexOf("Win") != -1){
		//Windows
		if(navigator.userAgent.indexOf("Firefox") != -1){
			//Firefox
			document.write('@import url('+filepath+'win_ff.css);'+"\n");
		}else if(navigator.userAgent.indexOf("Netscape") != -1){
			//Netscape
			document.write('@import url('+filepath+'win_ns.css);'+"\n");
		}else if(navigator.userAgent.indexOf("Opera") != -1){
			//Netscape
			document.write('@import url('+filepath+'win_op.css);'+"\n");
		}else if(navigator.userAgent.indexOf("MSIE") != -1){
			//Internet Explorer
			document.write('@import url('+filepath+'win_ie.css);'+"\n");
		}else{
			//Other
			document.write('@import url('+filepath+'other.css);'+"\n");//未対応
		}
	}else if(navigator.userAgent.indexOf("Mac OS X") != -1){
		//Mac OS X
		if(navigator.userAgent.indexOf("Safari") != -1){
			//Safari
			document.write('@import url('+filepath+'macx_sf.css);'+"\n");
		}else if(navigator.userAgent.indexOf("Firefox") != -1){
			//Firefox
			document.write('@import url('+filepath+'other.css);'+"\n");//未対応
		}else{
			//Other
			document.write('@import url('+filepath+'other.css);'+"\n");//未対応
		}
	}else if(navigator.userAgent.indexOf("Mac") != -1){
		//Mac OS 9
		if(navigator.userAgent.indexOf("Netscape") != -1){
			//Netscape
			document.write('@import url('+filepath+'mac9_ns.css);'+"\n");
		}else{
			//Other
			document.write('@import url('+filepath+'other.css);'+"\n");//未対応
		}
	}else{
		//Other
		document.write('@import url('+filepath+'other.css);'+"\n");//未対応
	}
	
	document.write('-->'+"\n");
	document.write('</style>'+"\n");
}

//■ロールオーバー設定
//引数：無し
//戻値：無し
//説明：ロールオーバーの設定
//備考：
function load_rollover(){
		m01=new Image();m01.src = load_path+"img/head_mn01.gif";
		m01r=new Image();m01r.src = load_path+"img/head_mn01_o.gif";
		m02=new Image();m02.src = load_path+"img/head_mn02.gif";
		m02r=new Image();m02r.src = load_path+"img/head_mn02_o.gif";
		m03=new Image();m03.src = load_path+"img/head_mn03.gif";
		m03r=new Image();m03r.src = load_path+"img/head_mn03_o.gif";
		m04=new Image();m04.src = load_path+"img/head_mn04.gif";
		m04r=new Image();m04r.src = load_path+"img/head_mn04_o.gif";
		m05=new Image();m05.src = load_path+"img/head_mn05.gif";
		m05r=new Image();m05r.src = load_path+"img/head_mn05_o.gif";
		m06=new Image();m06.src = load_path+"img/head_mn06.gif";
		m06r=new Image();m06r.src = load_path+"img/head_mn06_o.gif";
		m07=new Image();m07.src = load_path+"img/head_mn07.gif";
		m07r=new Image();m07r.src = load_path+"img/head_mn07_o.gif";
		m08=new Image();m08.src = load_path+"img/inq_btn01.gif";
		m08r=new Image();m08r.src = load_path+"img/inq_btn01_o.gif";
		check="ok";
}
function chimg(n){
		if(n=="a"){document.menu01.src=m01r.src;}
		if(n=="b"){document.menu02.src=m02r.src;}
		if(n=="c"){document.menu03.src=m03r.src;}
		if(n=="d"){document.menu04.src=m04r.src;}
		if(n=="e"){document.menu05.src=m05r.src;}
		if(n=="f"){document.menu06.src=m06r.src;}
		if(n=="g"){document.menu07.src=m07r.src;}
		if(n=="h"){document.menu08.src=m08r.src;}
}

function reimg(n){
		if(n=="a"){document.menu01.src=m01.src;}
		if(n=="b"){document.menu02.src=m02.src;}
		if(n=="c"){document.menu03.src=m03.src;}
		if(n=="d"){document.menu04.src=m04.src;}
		if(n=="e"){document.menu05.src=m05.src;}
		if(n=="f"){document.menu06.src=m06.src;}
		if(n=="g"){document.menu07.src=m07.src;}
		if(n=="h"){document.menu08.src=m08.src;}
}


//■メニュー：一元管理
//引数：アクティブ状態にするコンテンツ名
//戻値：無し
//説明：メニューの表示
//備考：アクティブ状態が有るメニューの場合はこちらを使用する
function print_menu_2nd(data){	
	document.write('<table width="800" border="0" cellspacing="0" cellpadding="0">'+"\n");
	document.write('<tr>'+"\n");
	document.write('<td width="15" align="left" valign="top"><img src="' + load_path + 'img/head_mn_bg.gif" width="15" height="59" border="0" alt=""></td>'+"\n");
	document.write('<td width="90" align="left" valign="top" ><a href="' + data + 'company/index.html" onMouseOver="chimg(\'a\')" onMouseOut="reimg(\'a\')"><img src="' + load_path + 'img/head_mn01.gif" width="90" height="59" border="0" alt="会社案内" name="menu01"></a></td>'+"\n");
	document.write('<td width="90" align="left" valign="top"><a href="' + data + 'business/index.html" onMouseOver="chimg(\'b\')" onMouseOut="reimg(\'b\')"><img src="' + load_path + 'img/head_mn02.gif" width="90" height="59" border="0" alt="事業内容" name="menu02"></a></td>'+"\n");
	document.write('<td width="196" align="left" valign="top"><a href="' + data + 'interview/index.html" onMouseOver="chimg(\'c\')" onMouseOut="reimg(\'c\')"><img src="' + load_path + 'img/head_mn03.gif" width="196" height="59" border="0" alt="新卒採用をお考えの企業様へ" name="menu03"></a></td>'+"\n");
	document.write('<td width="123" align="left" valign="top"><a href="' + data + 'recruit/index.html" onMouseOver="chimg(\'d\')" onMouseOut="reimg(\'d\')"><img src="' + load_path + 'img/head_mn04.gif" width="123" height="59" border="0" alt="採用情報" name="menu04"></a></td>'+"\n");
	document.write('<td width="63" align="left" valign="top"><a href="http://www.j-broad.co.jp/" onMouseOver="chimg(\'e\')" onMouseOut="reimg(\'e\')"><img src="' + load_path + 'img/head_mn05.gif" width="63" height="59" border="0" alt="HOME" name="menu05"></a></td>'+"\n");
	document.write('<td width="90" align="left" valign="top"><a href="' + data + 'sitemap/index.html" onMouseOver="chimg(\'f\')" onMouseOut="reimg(\'f\')"><img src="' + load_path + 'img/head_mn06.gif" width="90" height="59" border="0" alt="サイトマップ" name="menu06"></a></td>'+"\n");
	document.write('<td width="118" align="left" valign="top"><a href="' + data + 'privacy/index.html" onMouseOver="chimg(\'g\')" onMouseOut="reimg(\'g\')"><img src="' + load_path + 'img/head_mn07.gif" width="118" height="59" border="0" alt="プライバシーポリシー" name="menu07"></a></td>'+"\n");
	document.write('<td width="15" align="left" valign="top"><img src="' + load_path + 'img/head_mn_bg.gif" width="15" height="59" border="0" alt=""></td>'+"\n");
	document.write('</tr>'+"\n");
	document.write('</table>'+"\n");
}
