


function animoPrevisione(){
	var obj = $("#txt_scorre");
	var pixPerSec = 7;

	var posaEnd = -obj.height();
	var dista = obj.position().top-posaEnd;
	var tempo = (dista/pixPerSec)*1000;
	obj.animate({top: posaEnd}, tempo,'linear',animoPrevisioneNew);
}

function animoPrevisioneNew(){
	var obj = $("#txt_scorre");
	var contiene = $("#box_txt_scorre");
	obj.css('top',contiene.height());
	animoPrevisione();
}


function animoPrevisioneStop(){
	var obj = $("#txt_scorre");
	obj.clearQueue();
	obj.stop();
}


function doAltPanelOn(e){
	var imago = $(this);
	var strato = $("#box_stratotop");
	
	var topoX = e.pageX;
	var topoY = e.pageY;

	var txt = "";
	txt+= "<div class='alt_panel'>" +imago.attr("alt")+ "</div>";
	
	strato.html(txt);
	strato.css("left",topoX+20);
	strato.css("top",topoY+20);
	strato.css("width","200px");
	strato.css("display","block");
}

function doAltPanelOff(){
	$("#box_stratotop").css("display","none");
}



function doTraceObj(obj){
	var testo = "";
	for(var p in obj){
		//testo += p+" = "+obj[p]+"\r";
		testo += p+"        ";
	}
	alert(testo);
}


$(document).ready(function(){
	animoPrevisione();
	$("#txt_scorre").mouseover(animoPrevisioneStop);
	$("#txt_scorre").mouseout(animoPrevisione);
	
	//$("#box_panel img").mousemove(doAltPanelOn);
	//$("#box_panel img").mouseout(doAltPanelOff);
});

