	/**
	 * 現在のフォントサイズをロード 
	 * 
	 */
	function fontSizeReader() {
		fontSizeInitializer();
		var fsize = loadCookie('fsize');
		document.body.style.fontSize=fsize;
		setCurrentFontClass(fsize);
	}

	/**
	 * フォントサイズ中を選択された場合はdefault値に戻す 
	 */
	function fontSizeReset() {
		saveCookie('fsize', '', 10, '/');
		document.body.style.fontSize = '';
		
		setCurrentFontClass('');
	}

	/**
	 * 指定したフォントサイズに変更 
	 * 
	 * @param Integer rate フォントサイズ(%) 
	 */
	function fontSizeChanger(rate) {
		saveCookie('fsize', rate + '%', 10, '/');
		document.body.style.fontSize = rate + '%';
		setCurrentFontClass(rate + '%');
	}

	/**
	 * クッキー保存 
	 * 
	 * @param String label
	 * @param Integer value
	 * @param Integer dy
	 */
	function saveCookie( label, value, dy, path ) {
		if(navigator.cookieEnabled){
			//document.cookie = label + '=' + value + ';expires=' + new Date((new Date()).getTime() + dy*24*3600000).toGMTString();
			document.cookie = label + '=' + value + '; path=' + path + '; expires=' + new Date((new Date()).getTime() + dy*24*3600000).toGMTString();
		}
	}

	/**
	 * クッキー読み込み 
	 * 
	 * @param String label 取得するキー名 
	 */
	function loadCookie(label) {
		var params = '';
		// IE6ではNGのため変更。
//		if(label && document.cookie){
//			var v = document.cookie.split(';');
//			for(i in v){ 
//				v[i].match(/^\s*(.*)=(.*)$/);
//				if(RegExp.$1 == label){
//					params = RegExp.$2;
//					break;
//				}
//			}
//		}
		if(label && document.cookie){
			label = label + "=";
			start = document.cookie.indexOf(label);
			if (start != -1) {
				end = document.cookie.indexOf(";", start);
				if (end != -1){
					params = unescape(document.cookie.substring(start + label.length, end));
				} else {
					params = unescape(document.cookie.substring(start + label.length));
				}
			}
		}
		return params;
	}

	/**
	 * JavaScriptがONのときの表示処理 
	 */
	function fontSizeInitializer(){
		var e = document.getElementById('fontSizeSwitch');
		if(e != null){
			e.style.visibility = 'visible'
		}
	}
	
	/**
	 * 現在使用されているフォントサイズのHTMLボタン要素を'current'クラスに設定する。 
	 */
	function setCurrentFontClass(fontRate){
		resetCurrentFontClass();
		var e;
		if (fontRate == "75%"){
			e = document.getElementById('fontSizeS');
		} else if (fontRate == "110%"){
			e = document.getElementById('fontSizeL');
		} else {
			e = document.getElementById('fontSizeM');
		}
		if(e != null){
			e.className = 'current';
		}
	}

	function resetCurrentFontClass(){
		document.getElementById('fontSizeS').className = "";
		document.getElementById('fontSizeM').className = "";
		document.getElementById('fontSizeL').className = "";
	}
	
	


