//　サイズ設定css読み込み用引数

fDate = new Date();
fDay = fDate.getDate();
fHour = fDate.getHours();
fMinute = fDate.getMinutes();

//　文字サイズ変更

function setCookie(name, value, days){
	var exDays = new Date();
	exDays.setDate(exDays.getDate() + days);
	var exDay = exDays.toGMTString();
	document.cookie = name + "=" + value + ";expires=" + exDay + ";path=/;";
}
function readCookie(name){
	var cookie_value;
	var the_cookie = document.cookie;
	var start_cookie = the_cookie.indexOf(name + "=");
	if(start_cookie != -1){
		var cookie_value = the_cookie.charAt(start_cookie+name.length+1);
	}
	else cookie_value=3;
	return cookie_value;
}

var actSize = readCookie('actSizeStyle');
document.write('<link rel="stylesheet" type="text/css" href="http://www.goodtimehome.com/tanashi/common/css/size/t_size'+actSize+'.css" />');
for(i=1; i<6; i++){
	document.write('<link rel="alternate stylesheet" type="text/css" href="http://www.goodtimehome.com/tanashi/common/css/size/t_size'+i+'.css" title="t_size'+i+'" />');
}
function setCharSize(ope) {
	var i, a, s=actSize;
	if(ope == "sizePlus"){
		s++;
		if(s>5) s=5;
	}
	else if(ope == "sizeMinus"){
		s--;
		if(s<1) s=1;
	}
	else{
		s=3;
	}
	actSize=s;
	setCookie('actSizeStyle', actSize, 7);
	title = "t_size"+actSize;
	for(i=0; a = document.getElementsByTagName("link")[i]; i++){
		if(a.getAttribute("rel").indexOf("alt") != -1){
			a.disabled = true;
			if(a.getAttribute("title") == title) a.disabled = false;
		}
	}
}
