function stili_on_off(indice_stile,valore) {
  document.styleSheets[indice_stile].disabled = valore
}

function cambiaSize(modo) {
	var bodyTag = document.getElementsByTagName('body')[0];
	var dimSize;
	if(modo=='piu') { 
		dimSize='110%';
	} else if(modo=='meno') { 
		dimSize='70%';
	
	} else if(modo=='std') { 
		dimSize='80%';
	} 
	 bodyTag.style.fontSize = dimSize;
	 
	var exp = new Date(); 
	exp.setTime(exp.getTime() + (365*24*60*60*1000));
	SetCookie('modocss', modo, exp, '/');
}

function SetCookie (name, value) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
}