//フォントサイズ変更
//イベントハンドラから受け取った値を元にクッキーに値を書き込む関数

function fontChange(str){
	var targetFile;
	switch(str){
	case "small":
		targetFile="http://www.janis.or.jp/users/kakeyuh2/css/small.css";
	break;
	case "medium":
		targetFile="http://www.janis.or.jp/users/kakeyuh2/css/medium.css";
	break;
	case "big":
		targetFile="http://www.janis.or.jp/users/kakeyuh2/css/large.css";
	break;
	default:
		alert("error");
	break;
	}
	//フォント用CSSのファイル名をクッキーの値として保存
	//フォント切り替え機能をサイト全体適用するためpathに/（ルート）を指定
	document.cookie="fontstyle="+targetFile+";path=/;";
	window.location.reload(); //ページをリロードして設定を反映。
}



//以下はページが読み込まれる際必ず実行される処理

var name="fontstyle";
var cookie=document.cookie; //クッキーを取得
if(-1==cookie.indexOf(name)){ //クッキーがなければsmallを指定（デフォルト）
	var file='../css/medium.css';
}else{
	var pos_s=cookie.indexOf(name)+name.length+1; //クッキーの値の開始位置
	var pos_e=cookie.indexOf(";",pos_s); //クッキーの値の終了位置
	if(-1==pos_e){ //末尾にセミコロンがあるか？
		var file=cookie.slice(pos_s); //無い
	}else{
		var file=cookie.slice(pos_s,pos_e); //有る
	}
}
//クッキーの値に対応するCSSを読み込む。
document.write('<link rel="stylesheet" href="'+file+'" type="text/css" />');

//メニュー(ルート)
function menu( ) {
	document.write( "<UL> ");
	document.write( "<LI id='menu-home'><A href='index2.html'>トップページ</A></LI> ");
	document.write( "<LI id='menu-rek'><A href='recruit/rec1.html'>研修医募集</A></LI> ");
	document.write( "<LI id='menu-rec'><A href='recruit/rec2.html'>職員募集</A></LI> ");
	document.write( "<LI id='menu-dock'><A href='dock/dock1.html'>人間ドックのすすめ</A></LI> ");
	document.write( "<LI id='menu-nyuin'><A href='hosp/hosp1.html'>入院案内</A></LI> ");
	document.write( "<LI id='menu-kango'><A href='kaigo/index.html'>介護支援</A></LI> ");
	document.write( "<LI id='menu-01'><A href='est/message.html'>ごあいさつ</A></LI> ");
	document.write( "<LI id='menu-02'><A href='est/center.html'>センター概要</A></LI> ");
	document.write( "<LI id='menu-03'><A href='est/est3.html'>事業所案内</A></LI> ");
	document.write( "<LI id='menu-04'><A href='est/access.html'>交通案内</A></LI> ");
	document.write( "<LI id='menu-05'><A href='inq/inq.html'>お問い合わせ</A></LI> ");
	document.write( "<LI id='menu-06'><A href='topix/hot.html'>ほっとすまいるニュース</A></LI> ");
	document.write( "</UL> ");
}

//メニュー(サブフォルダ)
function menu2( ) {
	document.write( "<UL> ");
	document.write( "<LI id='menu-home'><A href='../index2.html'>トップページ</A></LI> ");
	document.write( "<LI id='menu-rek'><A href='../recruit/rec1.html'>研修医募集</A></LI> ");
	document.write( "<LI id='menu-rec'><A href='../recruit/rec2.html'>職員募集</A></LI> ");
	document.write( "<LI id='menu-dock'><A href='../dock/dock1.html'>人間ドックのすすめ</A></LI> ");
	document.write( "<LI id='menu-nyuin'><A href='../hosp/hosp1.html'>入院案内</A></LI> ");
	document.write( "<LI id='menu-kango'><A href='../kaigo/index.html'>介護支援</A></LI> ");
	document.write( "<LI id='menu-01'><A href='../est/message.html'>ごあいさつ</A></LI> ");
	document.write( "<LI id='menu-02'><A href='../est/center.html'>センター概要</A></LI> ");
	document.write( "<LI id='menu-03'><A href='../est/est3.html'>事業所案内</A></LI> ");
	document.write( "<LI id='menu-04'><A href='../est/access.html'>交通案内</A></LI> ");
	document.write( "<LI id='menu-05'><A href='../inq/inq.html'>お問い合わせ</A></LI> ");
	document.write( "<LI id='menu-06'><A href='../topix/hot.html'>ほっとすまいるニュース</A></LI> ");
	document.write( "</UL> ");
}

//迷惑メール対策
function mail()	{
	document.write( "<A href=mailto:kakeyuhp" + "&#64;" + "janis.or.jp>" );
	document.write( "kakeyuhp" + "&#64;" + "janis.or.jp" );
	document.write( "</A>" );
}

