function setCookie(name, value, days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

var act = getCookie('size');
if(act>1) setfont(act);

function setfont(s) {
//	for(i=0;i<document.styleSheets.length;i++) alert(document.styleSheets[i].href);
	if(s=='1') size = 'normal';
	else if(s=='2') size = 'big';
	else if(s=='3') size = 'bigger';
	else size = '_normal';
	document.getElementById('itellico-font').href = 'http://www.itellico.com/fileadmin/custom/templates/res/itellico_font_' + size + '.css';
	setCookie('size', s, 365);
}

function acroswitch(acro) {
	setCookie('acro', 1-acro, 365);
	window.location.reload();
}
