﻿message=document.getElementById("campeggio").innerHTML;distance=50;speed=200;var txt="",num=0,num4=0,campeggioofle="",campeggioofwi="",campeggioofto="",campeggio=document.getElementById("campeggio");function stcampeggio(){for(i=0;i!=message.length;i++){if(message.charAt(i)!="$")
txt+="<span style='position:relative;visibility:hidden;color: #ffffff;' id='n"+i+"'>"+message.charAt(i)+"<\/span>";else
txt+="<br>";}
campeggio.innerHTML=txt;txt="";campeggioofle=campeggio.offsetLeft;campeggioofwi=campeggio.offsetWidth;campeggioofto=campeggio.offsetTop;campeggio2b();}
function campeggio2b(){if(num4!=message.length){if(message.charAt(num4)!="$"){var then=document.getElementById("n"+num4);then.style.left=campeggioofle-then.offsetLeft+campeggioofwi/2;then.style.top=campeggioofto-then.offsetTop+distance;campeggio3(then.id,parseInt(then.style.left),parseInt(then.style.left)/5,parseInt(then.style.top),parseInt(then.style.top)/5);}
num4++;setTimeout("campeggio2b()",speed);}}
function campeggio3(target,lef2,num2,top2,num3){if((Math.floor(top2)!=0&&Math.floor(top2)!=-1)||(Math.floor(lef2)!=0&&Math.floor(lef2)!=-1)){if(lef2>=0)
lef2-=num2;else
lef2+=num2*-1;if(Math.floor(lef2)!=-1){document.getElementById(target).style.visibility="visible";document.getElementById(target).style.left=Math.floor(lef2);}else{document.getElementById(target).style.visibility="visible";document.getElementById(target).style.left=Math.floor(lef2+1);}
if(lef2>=0)
top2-=num3
else
top2+=num3*-1;if(Math.floor(top2)!=-1)
document.getElementById(target).style.top=Math.floor(top2);else
document.getElementById(target).style.top=Math.floor(top2+1);setTimeout("campeggio3('"+target+"',"+lef2+","+num2+","+top2+","+num3+")",50)}}
stcampeggio()
