function baloon(e,crea,foto,foto_h)
{
	if (crea == 1)
	{  
		this.foto = foto;
		this.foto_h = foto_h;
		//due hack; se usassi solo e, alla fine del calcolo posx diventa null perchè è stato fatto risalire fino al body e oltre
		e_x = e;
		e_y = e;
		
		// ricavo la posizione assoluta x
		var posx = 0;
		if (e_x.offsetParent)
			while(1) 
			{
				posx += e_x.offsetLeft;
				if (!e_x.offsetParent)
					break;
				e_x = e_x.offsetParent;
			}
		else 
			if (e_x.x)
				posx += e_x.x;
		
		// ricavo la posizione assoluta y	
		var posy = 0;
		if (e_y.offsetParent)
			while(1)
			{
				posy += e_y.offsetTop;
				if (!e_y.offsetParent)
					break;
				e_y = e_y.offsetParent;
			}
		else 
			if (e_y.y)
				posy += e_y.y;

		// contenitore
		// devo stare attento che l'altezza della foto + margine non sia superiore alla posy, ovvero il baloon non esca dallo schermo in alto
		if (posy < (foto_h+102))
		{
			var contenitore = document.createElement("div");
			contenitore.setAttribute("id","baloon");
			contenitore.style.cssText = "position:absolute;top:"+(posy+20)+"px;left:"+(posx-260)+"px;width:250px;height:200px;";
			// header contenitore
			var header = document.createElement("div");
			header.style.cssText = "height:41px;background-image:url('img/fumetto_sopra_alt.gif');";
			contenitore.appendChild(header);
			// corpo contenitore
			var corpo = document.createElement("div");
			corpo.style.cssText = "background-image:url('img/fumetto_lati.gif');text-align:center;padding-bottom:70px;";
			contenitore.appendChild(corpo);
			// piedi contenitore
			var piedi = document.createElement("div");
			piedi.style.cssText = "height:21px;background-image:url('img/fumetto_sotto_alt.gif');";
			contenitore.appendChild(piedi);
		}
		else
		{			
			var contenitore = document.createElement("div");
			contenitore.setAttribute("id","baloon");
			contenitore.style.cssText = "position:absolute;top:"+(posy-this.foto_h-111)+"px;left:"+(posx-260)+"px;width:250px;height:200px;";	
			// header contenitore
			var header = document.createElement("div");
			header.style.cssText = "height:21px;background-image:url('img/fumetto_sopra.gif');";
			contenitore.appendChild(header);
			// corpo contenitore
			var corpo = document.createElement("div");
			corpo.style.cssText = "background-image:url('img/fumetto_lati.gif');text-align:center;padding-bottom:70px;";
			contenitore.appendChild(corpo);
			// piedi contenitore
			var piedi = document.createElement("div");
			piedi.style.cssText = "height:41px;background-image:url('img/fumetto_sotto.gif');";
			contenitore.appendChild(piedi);
		}
		// foto
		var foto = document.createElement("img");
		foto.setAttribute("src",this.foto);
		foto.setAttribute("alt","Promo");
		corpo.appendChild(foto);
		// appendo al body
		var body = document.getElementsByTagName("body");
		body[0].appendChild(contenitore);
	}
	else
		var div = document.getElementById("baloon");
		if (div)
			div.parentNode.removeChild(div);

}
