
var divPubl;
var currentTop = 0;
var stepTop = 10;

function initDivPubblicita(){
	var ie=(document.all);
	var w3=(document.getElementById && !ie);
	if(!ie && !w3) return;
	
	divPubl=eval('document.getElementById("divAdds").style');
	
	divPubl.visibility="visible";
	divPubl.display="";
  
	showDivPubblicita();
}


function showDivPubblicita(){
	
	var ie=(document.all);
	var w3=(document.getElementById && !ie);
	
	
	if (ie)
	{	
		documentWidth  =document.body.offsetWidth+document.body.scrollLeft-20;
		documentHeight =document.body.offsetHeight+document.body.scrollTop-20;
	} 
	else if (w3)
	{		
			documentWidth=self.innerWidth+window.pageXOffset-20;
			documentHeight=self.innerHeight+window.pageYOffset-20;
	} 
	
	divPubl.left = (documentWidth/2)-(document.getElementById("divAdds").clientWidth/2);
	divPubl.top  = currentTop;
	
	var TopArrivo = (documentHeight/2)-(document.getElementById("divAdds").clientHeight/2); 
	
	if (currentTop < TopArrivo)
	{
		currentTop = currentTop + stepTop;
	} else
	{
		currentTop = TopArrivo;
	}
	
	
	setTimeout("showDivPubblicita()",10);
	
}

function closeDivPubblicita()
{
	if (divPubl != null)
	{
		divPubl.display="none";
	}
}
