// performed onclick
function changeFontSize(fontSize) {
	//set cookie
	document.cookie = "FontSize = " + fontSize + ";" + "Path =/";
	// reload the page
	window.location.reload();
	return false;
}


// performed onload
var FontCookie;
function checkFontSize() {
	//check cookie
	FontSizeCookie = "FontSize = ";
	Cookies = document.cookie.split(';');
	for(var i=0; i < Cookies.length; i++) {
		var Cookie = Cookies[i];
		while (Cookie.charAt(0) == ' ') {
			Cookie = Cookie.substring(1,Cookie.length);
		}
		if (Cookie.indexOf(FontSizeCookie) == 0) {
			return Cookie.substring(FontSizeCookie.length,Cookie.length);
		}
		if (Cookie.substring(0,8) == "FontSize") {
			FontCookie = Cookie;
		}
	}
	// if yes cookie perform function
	switch (FontCookie) {
		case "FontSize=default": var setFontSize = "1"; break;
		case "FontSize=larger": var setFontSize = "1.15"; break;
		case "FontSize=largest": var setFontSize = "1.3"; break;
		default: var setFontSize = "1";
	}
	document.write('<style type="text/css" media="screen">div#content.homepage, div#information, div#isi { font-size: ' + setFontSize + 'em; }</style>');
	return null;
}

/* perform and write out the Font Size */
checkFontSize();