function newWindow(sHref) {
	finestra=window.open(sHref, '_blank');
	finestra.focus();
	return false;
}


function home() {
if(document.all)
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.newsrimini.it');
}


function pref() { 
window.external.AddFavorite(window.location.href, 'Le news di Newsrimini.it')
}

function createCookie(name,value,days) {
  if (days) {
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = '; expires='+date.toGMTString();
  }
  else expires = '';
  document.cookie = name+'='+value+expires+'; path=/';
}

function readCookie(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;
}

function setFontSize(size) {
	var articolo = document.getElementById('testo-articolo');
	var percentuale = "16px";
	if (size == 1) percentuale = "12px";
	if (size == 2) percentuale = "14px";
	if (size == 3) percentuale = "16px";
	if (size == 4) percentuale = "18px";
	if (size == 5) percentuale = "22px";
	articolo.style.fontSize = percentuale;
	createCookie('NRFontSize',size,365);
}

function readcookie() {
	size = readCookie('NRFontSize');
	setFontSize(size);
}
