var xmlhttp;

function flashPP(url)
{
xmlhttp=null;

	if (window.XMLHttpRequest)
	{// code for Firefox, Opera, IE7, etc.
	xmlhttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
  		{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}

	if (xmlhttp!=null)
  	{
  	xmlhttp.onreadystatechange=cambiaPP;
  	xmlhttp.open("GET",url,true);
  	xmlhttp.send(null);
	}
	else
  	{
  	alert("Non stai usando un browser AJAX compatibile!");
  	}
}

function cambiaPP()
{
		//controllo se il browser è IE
		function isIE()
		{
		if(navigator.userAgent.toLowerCase().indexOf("msie") != -1)
		{
		return true;
		} 
		}
		//faccio apparire la casella in maniera sfumata
		function ingresso(op, id, durata)
		{
		elemento=document.getElementById(id);

		if(isIE())
		{
		elemento.style.filter='alpha(opacity='+op*1+')';
		}
		else
		{
		elemento.style.opacity = op/100;
		}
		op++
		if(op <= 100)
		{
		setTimeout(function() {ingresso(op, id, durata)}, durata)
		}
		}

if (xmlhttp.readyState==4)
{// 4 = "loaded"
	if (xmlhttp.status==200)
	{// 200 = "OK" (0 = "OK" se offline!)	
	ingresso(20, 'contenutoPP', 10);
	document.getElementById('contenutoPP').innerHTML=xmlhttp.responseText;
	}
else
	{
	alert("Errore di recupero dati:" + xmlhttp.statusText);
	}
}

}