function resizeText(dir) {
	var currentTextSize;
	currentTextSize = document.getElementsByTagName('body')[0].style.fontSize;
	if (currentTextSize == '') currentTextSize = '1em';
	currentTextSize = currentTextSize.substring(0, currentTextSize.length - 2);
	if (dir == '+' && parseFloat(currentTextSize) < 1.5) document.getElementsByTagName('body')[0].style.fontSize = (parseFloat(currentTextSize) + 0.1) + 'em';
	if (dir == '-' && parseFloat(currentTextSize) > 0.5) document.getElementsByTagName('body')[0].style.fontSize = (parseFloat(currentTextSize) - 0.1) + 'em';
	document.cookie = "textsize=" + document.getElementsByTagName('body')[0].style.fontSize + "; expires=2020-01-01;"
}

function readCookie(cookieName) {
	var theCookie = "" + document.cookie;
	var ind = theCookie.indexOf(cookieName);
	if (ind == -1 || cookieName == "") return "";
	var ind1 = theCookie.indexOf(';',ind);
	if (ind1 == -1) ind1 = theCookie.length;
	return unescape(theCookie.substring(ind + cookieName.length + 1, ind1));
}

function setTextSize() {
	if (readCookie("textsize").length > 0) document.getElementsByTagName('body')[0].style.fontSize = readCookie("textsize");
}

window.onload = setTextSize;