/*
============================================================
	font size
============================================================
*/

/* cookie path */
var p = "/";

var _os = getOSType ();
var _browser = getBrowserName ();

var textSize = getCookie ("totalSize") * 2;
var fontSize = new Array ();

document.open ();
if (_os == "win") {
	if (_browser == "ie") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "fx") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "ns") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "op") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");
	}

} else if (_os == "vista") {
	if (_browser == "ie") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "fx") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "ns") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "op") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: Arial, '‚l‚r ƒSƒVƒbƒN', sans-serif; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");
	}

} else if (_os == "mac") {
	if (_browser == "sf") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "fx") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "ie") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: 'Hiragino Kaku Gothic Pro'; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: 'Hiragino Kaku Gothic Pro'; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: 'Hiragino Kaku Gothic Pro'; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: 'Hiragino Kaku Gothic Pro'; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: 'Hiragino Kaku Gothic Pro'; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: 'Hiragino Kaku Gothic Pro'; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "ns") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 110%; }")
		document.write ("--></style>");

	} else if (_browser == "op") {
		fontSize[1] = 10;
		fontSize[2] = 12;
		fontSize[3] = 15;
		setSize ();
		document.write ("<style type='text/css'><!--")
		document.write (".txt1j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; line-height: 180%; }")
		document.write (".txt2j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 180%; }")
		document.write (".txt3j  { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 135%; }")
		document.write (".ntxt1j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[1] + "px; }")
		document.write (".ntxt2j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[2] + "px; line-height: 110%; }")
		document.write (".ntxt3j { font-family: 'ƒqƒ‰ƒMƒmŠpƒS Pro W3', 'Hiragino Kaku Gothic Pro', Osaka; font-size: " + fontSize[3] + "px; line-height: 110%; }")
	}
}
document.close ();


// OSŽæ“¾
// Macintosh                     ->  mac
// Windows Vista                 ->  vista
// Windows95/98/NT/2000/XP2003/  ->  win
function getOSType () {
	var uAgent  = navigator.userAgent.toUpperCase ();
	if (uAgent.indexOf ("MAC") >= 0) return "mac";
	if (uAgent.indexOf ("WIN") >= 0) {
		if (uAgent.indexOf ("NT 6.0") != -1 || uAgent.indexOf ("WS V") != -1) {
			return "vista";
		} else {
			return "win";
		}
	}
	return;
}

// ƒuƒ‰ƒEƒUŽæ“¾
// Safari             ->  sf
// Opera              ->  op
// Firefox            ->  fx
// Netscape           ->  ns
// Internet Explorer  ->  ie
function getBrowserName () {
	var aName  = navigator.appName.toUpperCase ();
	var uName = navigator.userAgent.toUpperCase ();
	if (uName.indexOf ("SAFARI") >= 0) return "sf";
	if (uName.indexOf ("OPERA") >= 0) return "op";
	if (uName.indexOf ("FIREFOX") >= 0) return "fx";
	if (aName.indexOf ("NETSCAPE") >= 0) return "ns";
	if (aName.indexOf ("MICROSOFT") >= 0) return "ie";
	return;
}

// ƒeƒLƒXƒgƒTƒCƒY•ÏX
function changeTxt (changeStatus) {
	var changeSize = getCookie ("totalSize");

	if (changeStatus == "up") {
		changeSize ++;

	}else if (changeStatus == "down") {
		changeSize --;

	}else if (changeStatus == "reset") {
		changeSize = 0;
	}

/*
	limitDay = 30;
	t = new Date;
	t.setTime(t.getTime () + limitDay * 24 * 60 * 60 * 1000);
	document.cookie = "totalSize=" + changeSize + '; path=' + p + '; expires=' + t.toGMTString();
*/
	document.cookie = "totalSize=" + changeSize + '; path=' + p;

	if (document.all) {
		var coll = document.all;
	} else if (document.getElementsByTagName ("*")) {
		var coll = document.getElementsByTagName ("*");
	} else {
		location.reload ();
		return;
	}

	var chgFontSize = new Array ();
	for(var i = 1; i <= 3; i ++) {
		if (changeStatus == "reset") {
			chgFontSize[i] = fontSize[i] - textSize;
		} else {
			chgFontSize[i] = fontSize[i] - textSize + changeSize * 2;
			if (chgFontSize[i] < 2) {
				chgFontSize[i] = 2;
			}
		}
	}

	for (var i = 0, j = coll.length; i < j; i ++){
		var txtClass = coll[i].className;
		if (txtClass) {
			if (txtClassArray = txtClass.match (/txt(\d)j/)) {
				if (txtClassArray[1] <= 4) {
					coll[i].style.fontSize = chgFontSize[txtClassArray[1]] + "px";
				}
			}
		}
	}
}


// Cookie‚Ì’lŽæ“¾
function getCookie (key) {
	tmp = document.cookie + "; path=" + p;
	tmp1 = tmp.indexOf (key, 0);
	if (tmp1 != -1) {
		tmp = tmp.substring (tmp1, tmp.length);
		start = tmp.indexOf ("=", 0) + 1;
		end = tmp.indexOf (";", start);
		return (unescape (tmp.substring (start, end)));
	} else {
		return ("");
	}
}


// ƒtƒHƒ“ƒgƒTƒCƒYŒˆ
function setSize () {
	for (i = 1; i <= 3; i ++) {
		fontSize[i] += textSize;
		if (fontSize[i] < 2) {
			fontSize[i] = 2;
		}
	}
}
