var fontSize;
var cookie = readCookie('fontSize');
if (cookie) {
	fontSize = parseFloat(cookie);
} else {
	fontSize = 0.8;
	createCookie('fontSize', fontSize, 0);
}

function fontSizeSet() {
	fontSize = Math.round(fontSize*100)/100;
	document.body.style.fontSize = fontSize + 'em';
	createCookie('fontSize', fontSize, 0);
	return false;
}

function fontSizeUp() {
	if (fontSize < 1.1) {
		fontSize += 0.1;
		document.getElementById('buttonTxtSmaller').className = 'button';
	} else if (fontSize == 1.1) {
		document.getElementById('buttonTxtBigger').className = 'button disabled';
	}
	return fontSizeSet();
}

function fontSizeDown() {
	if (fontSize > 0.8) {
		fontSize -= 0.1;
		document.getElementById('buttonTxtBigger').className = 'button';
	} else if (fontSize == 0.8) {
		document.getElementById('buttonTxtSmaller').className = 'button disabled';
	}
	return fontSizeSet();
}

function activateFontSize() {
	document.body.style.fontSize = fontSize + 'em';
	if (fontSize == 0.8) {
		document.getElementById('buttonTxtSmaller').className = 'button disabled';
	} else if (fontSize == 1.1) {
		document.getElementById('buttonTxtBigger').className = 'button disabled';
	}
}