/** change font size **/
function change_fontsize(f){
		//set font size
		var small_setting = "10pt"; // small size (default)
		var mid_setting   = "12pt"; // middle size
		var big_setting   = "14pt"; // big size

		//swap image
		btn_fontsize_shoImg_on = new Image();
		btn_fontsize_chuImg_on = new Image();
		btn_fontsize_daiImg_on = new Image();
		btn_fontsize_shoImg_on.src = "http://rengo-soken.or.jp/img/font_s_on.gif";
		btn_fontsize_chuImg_on.src = "http://rengo-soken.or.jp/img/font_m_on.gif";
		btn_fontsize_daiImg_on.src = "http://rengo-soken.or.jp/img/font_l_on.gif";

		btn_fontsize_shoImg = new Image();
		btn_fontsize_chuImg = new Image();
		btn_fontsize_daiImg = new Image();
		btn_fontsize_shoImg.src = "http://rengo-soken.or.jp/img/font_s.gif";
		btn_fontsize_chuImg.src = "http://rengo-soken.or.jp/img/font_m.gif";
		btn_fontsize_daiImg.src = "http://rengo-soken.or.jp/img/font_l.gif";

		document.images["btn_fontsize_sho"].src = btn_fontsize_shoImg.src;
		document.images["btn_fontsize_chu"].src = btn_fontsize_chuImg.src;
		document.images["btn_fontsize_dai"].src = btn_fontsize_daiImg.src;


		// cookie check
		fontHandle = fsizeGetCookie("baseFsize");
		if(!f){
			f = fontHandle;
		}
		// set cookie
		fsizeSetCookie("baseFsize",f);
	if(document.all){
		// ie browser
		if(f == "small"){
			document.all('fsize_base').style.fontSize = small_setting;
			document.images["btn_fontsize_sho"].src = btn_fontsize_shoImg_on.src;
		}else if(f == "mid"){
			document.all('fsize_base').style.fontSize = mid_setting;
			document.images["btn_fontsize_chu"].src = btn_fontsize_chuImg_on.src;
		}else if(f == "big"){
			document.all('fsize_base').style.fontSize = big_setting;
			document.images["btn_fontsize_dai"].src = btn_fontsize_daiImg_on.src;
		}else{
			document.all('fsize_base').style.fontSize = small_setting;
			document.images["btn_fontsize_sho"].src = btn_fontsize_shoImg_on.src;
		}
	}else if(document.getElementById){
		// other browser
		if(f == "small"){
			document.getElementById('fsize_base').style.fontSize = small_setting;
			document.images["btn_fontsize_sho"].src = btn_fontsize_shoImg_on.src;
		}else if(f == "mid"){
			document.getElementById('fsize_base').style.fontSize = mid_setting;
			document.images["btn_fontsize_chu"].src = btn_fontsize_chuImg_on.src;
		}else if(f == "big"){
			document.getElementById('fsize_base').style.fontSize = big_setting;
			document.images["btn_fontsize_dai"].src = btn_fontsize_daiImg_on.src;
		}else{
			document.getElementById('fsize_base').style.fontSize = small_setting;
			document.images["btn_fontsize_sho"].src = btn_fontsize_shoImg_on.src;
		}
	}
	if (typeof(changeGuideSpotListFrameHeight) != "undefinded"){
	    if (typeof(changeGuideSpotListFrameHeight) == "function"){
	        changeGuideSpotListFrameHeight();
	    }
	}
}

/** get cookie **/
function fsizeGetCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
		tmp1 = " " + document.cookie + ";";
		xx1 = xx2 = 0;
		len = tmp1.length;
		while (xx1 < len) {
			xx2 = tmp1.indexOf(";", xx1);
			tmp2 = tmp1.substring(xx1 + 1, xx2);
			xx3 = tmp2.indexOf("=");
			if (tmp2.substring(0, xx3) == key) {
				return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
			}
			xx1 = xx2 + 1;
		}
		return("");
}

/** set cookie **/
function fsizeSetCookie(key, val, tmp) {
		/*tmp = key + "=" + escape(val) + "; ";
		tmp += "expires=Tue, 31-Dec-2030 23:59:59; ";
		document.cookie = tmp;*/
		document.cookie = key + "=" + escape(val) + "; path=/; expires=" + new Date(2030, 12, 31, 23, 59, 59).toGMTString();
}


/** clear cookie **/
//function clearCookie(key) {
//		document.cookie = "baseFsize =" + "xx; expires=Tue, 1-Jan-1980 00:00:00;";
//}

