function starter(xsp){

$("#loading").hide("drop");
$("#loading").html("");

$.get("speeks.php", {sp: xsp}, function(data){
	
	
	if(data!="end"){
		$("#hopper").prepend(data);
	todel = xsp - 4;
	
	if(todel<=0){
		if(xsp%2==0){
		$("#sp"+xsp).show("slide", {direction: "right"});
	}else{
		$("#sp"+xsp).show("slide", {direction: "left"});
	}
	}else{
		$("#sp"+todel).hide("blind", function(){
	if(xsp%2==0){
		$("#sp"+xsp).show("slide", {direction: "right"});
	}else{
		$("#sp"+xsp).show("slide", {direction: "left"});
	}
});
	}
	

	
	nextr = xsp + 1;

	
	timer = randomXToY(10000,15000);
	if(xsp<4){
		timer = 2000;
	}
	
	setTimeout("starter("+nextr+")", timer);
}
});
}


function randomXToY(min,max)
{
num=Math.floor(Math.random()*(max-min+1))+min
return num;
}

setTimeout("starter(1);", 1500);
