var ButtonType;

var Unit;

var Obj;

var LinkColor;

var SelectedColor;

var SelectedBold;

Img = new Array();

ImgOn = new Array();

SizeList = new Array();

Text = new Array();

Obj = 'body';
fontSize = '0';
ExpireDays = 30;
Default=0;

var tags = new Array('div','td','tr');

/* サイズ選択肢 10段階の設定が可能*/
var sizing = new Array('62.5%','70%','75%','80%','85%','90%','95%','100%','105%','110%','115%');

//ReadCookie();

function FontChange(target,tarF){

if (!document.getElementById) return
var dore = document,tarS = null,fontSize = Default,value,su,cTags;
		
n = parseInt(fontSize);	
		
fontSize = n + tarF;

if (fontSize < 0) fontSize = 0;

if (fontSize > 10) fontSize = 10;

Default = fontSize;
Write(Default);


if (!(tarS = dore.getElementById(target))) tarS = dore.getElementsByTagName(target)[0];

tarS.style.fontSize = sizing[fontSize];


for (value = 0 ; su < tags.length ; value++){

cTags= tarS.getElementsByTagName(tags[value]);

for (su = 0 ; su < cTags.length ; su++) cTags[su].style.fontSize = sizing[fontSize];

}
}

/* Cookie呼出 */

function ReadCookie() {
	if (document.cookie) {

		Cookie = document.cookie;
		if (Cookie.match(/fontSize=([\d.]*)/)) {

			fontSize = RegExp.$1;
			Default = fontSize;
		}
		SizeChange() ;

	}

}

/* フォントサイズ変更 */


function SizeChange() {
		document.getElementsByTagName(Obj)[0].style.fontSize = sizing[fontSize];
}

/* Cookie書込 */

function Write(Size) {

	// 日付の計算
		
	var toDay = new Date;
	var xDay = new Date;
	parseInt(ExpireDays);
	xDay.setDate(toDay.getDate()+ExpireDays);
	ExpireText = xDay.toGMTString();
	
	// 書込
	document.cookie = "fontSize = " + Size + "; path=/;expires=" + ExpireText;
	// 再読込
	location.reload();

}

window.onload = function(){
		ReadCookie();
		initRollovers();

}


