function class_cookielib(){
	this.getCookie = getCookie;
	this.setCookie = setCookie;
	this.removeCookie = removeCookie;
	
	var expireDate = new Date();
	expireDate.setFullYear(expireDate.getFullYear()+1);
	expireStr = "expires=" + expireDate.toUTCString();

	function getCookie(name){
		var gc=name+"=";
		var Cookie=document.cookie;
		if (Cookie.length>0) {
			var start=Cookie.indexOf(gc);
			if (start!=-1) {
				start+=gc.length;
				terminus=Cookie.indexOf(";",start);
				if (terminus==-1) terminus=Cookie.length;
				return unescape(Cookie.substring(start,terminus));
			}
		}
		return '';
	}
	function setCookie() {
		var key = arguments[0];
		var val = arguments[1];
		var path = (typeof(arguments[2]) != 'undefined' ? arguments[2] : '/');
		var exp = (typeof(arguments[3]) != 'undefined' ? arguments[3] : expireStr);
		var sc = key + "=" + escape(val) + "; path=" + path + "; " + exp;
		document.cookie = sc;
	}
	function removeCookie(key,path) {
		if(!path){
			path = '/';
		}
		var rc = key + "=; path=" + path + "; expires=Thu, 1 Jan 1970 00:00:00 UTC";
		document.cookie = rc;
	}
}
var cookieObj = new class_cookielib();

var fsize_val = 0;
var fsize_css_size = new Array();
fsize_css_size[0] = 'http://www.mosimo.net/share/css/font_m.css';
fsize_css_size[1] = 'http://www.mosimo.net/share/css/font_b.css';
function setFontSize(){
	if(cookieObj.getCookie('fsize') != ''){
		fsize_val = 1 * cookieObj.getCookie('fsize');
	}
	if(fsize_css_size[fsize_val]){
		document.write('<link rel="stylesheet" type="text\/css" href="' + fsize_css_size[fsize_val] + '" \/>');
	}
}
function changeFontSize(num){
	cookieObj.setCookie('fsize',num,'/','');
	window.location.reload();
}
function outputFontSizeCtrl(){
document.write('<div id="fontsize">');
document.write('<p><img src="/share/images/common/fontsize_ttl.gif" width="61" height="12" alt="文字サイズ調整" /></p><ul>');
	if(fsize_val != 0){
		document.write('<li><a href="#" onclick="changeFontSize(0);return false;"><img src="/share/images/common/fontsize_m.gif" width="30" height="22" alt="文字の大きさを標準にする" title="文字の大きさを標準にする" id="fontsizeM" /></a></li>');
	} else {
		document.write('<li><img src="/share/images/common/fontsize_m_off.gif" width="30" height="22" alt="文字の大きさを標準にする" title="文字の大きさを標準にする" id="fs_min" /></li>');
	}

	if(fsize_val != 1){
		document.write('<li><a href="#" onclick="changeFontSize(1);return false;"><img src="/share/images/common/fontsize_l.gif" width="30" height="22" alt="文字の大きさを大きくする" title="文字の大きさを大きくする" id="fontsizeL" /></a></li>');
	} else {
		document.write('<li><img src="/share/images/common/fontsize_l_off.gif" width="30" height="22" alt="文字の大きさを大きくする" title="文字の大きさを大きくする" id="fs_mid" /></li>');
	}
document.write('</ul>');
document.write('</div><!--fontsize-->');
}
