var baseFontSize = 14;
var minFontSize=8
var maxFontSize=48;
var fontMeasure = "px";

function changeFontSize(targetID, fontIncrement) {

	var p = document.getElementById(targetID);
	var currentSize = p.style.fontSize;
   
	if (currentSize) {
		var s = parseFloat(currentSize.replace(fontMeasure,""));
	} else {
		var s = baseFontSize;
		var currentSize = baseFontSize + fontMeasure;
		//var fontIncrement = 0;
	}
	if(s <= maxFontSize && s >= minFontSize) {
		s += fontIncrement;
		var newSize = s+fontMeasure;
		
		//alert(currentSize + " => " + newSize);
		
		p.style.fontSize = newSize;
		p.style.lineHeight = newSize;

//		var myEffects = new Fx.Styles(targetID, {duration: 500, wait:false, transitions: Fx.Transitions.linear});
//		myEffects.start({
//		    'font-size': [currentSize, newSize],
//		    'line-height': [currentSize, newSize]
//		});
	
	}
}

function printpop(printwhat) {
	var testo = "";
	testo += "<ht" + "ml>";
	testo += "<he" + "ad>";
	testo += "<tit" + "le>Stampa</title>";
	testo += "<style type=\"text/css\">";
	//testo += "table, td ,th {border:1px solid #ddd;border-collapse:collapse;padding:3px}";
	testo += "#iconmenu, img, .add" + "this_to" + "olbox {display:none;}";
	testo += "</style>";
	testo += "</he" + "ad>";
	testo += "<bo" + "dy>";
	testo += document.getElementById(printwhat).innerHTML;
	testo += "</bo" + "dy>";
	testo += "</ht" + "ml>";
	var ident_finestra = window.open("","stampa","height=400,width=400");
	ident_finestra.document.open();
	ident_finestra.document.write(testo);
	ident_finestra.document.close(); 
	ident_finestra.print();
	ident_finestra.close(); 
}
