// JavaScript Document
window.addEvent('domready', function() { 
	minSize = 12;
	maxSize = 18;	
	
	
	if ($('newcomment')){
		var fx = new Fx.Slide('newcomment', {transition: Fx.Transitions.Quad.easeOut, duration: 800});
		fx.hide();
		$('showcomment').addEvent('click', function(){
			fx.toggle();
		});
	}
	
	
});

function increaseFontSize(){
	$$('#content').each(function(el, i){
      if(el.style.fontSize) { var s = parseInt(el.style.fontSize.replace("px","")); }
	  else { var s = minSize; }
      if(s != maxSize) { s += 1; }
      el.style.fontSize = s+"px"	
	});	
}

function decreaseFontSize(){
	$$('#content').each(function(el, i){
      if(el.style.fontSize) { var s = parseInt(el.style.fontSize.replace("px","")); }
	  else { var s = minSize; }
      if(s != minSize) { s -= 1; }
      el.style.fontSize = s+"px"	
	});	
}

function addToFav() { 
	if (window.ie) { 
		window.external.AddFavorite('http://www.energiainnatura.it', 'Energia in Natura');
	} else { 
		window.sidebar.addPanel('Energia in Natura', 'http://www.energiainnatura.it', '');
		}
}
