
function auc(){
  
   setTimeout("auc()", 1000);
$.ajax({
   type: "GET",
   url: "scripts/auctions.php",
   data: "",
   success: function(msg){
  
var alloksjonid = msg.split('*'); 

			for( var i =0; i < alloksjonid.length; i++) {
var oks = alloksjonid[i].split('|'); 

//enne
a = $("div#bid_timestamp_"+oks[0]).text();



//pärast
$("div#bid_timestamp_"+oks[0]).text(oks[4]);

if (a < oks[4])
{
activ = 1;
}

if (oks[3] == "Sold")
{
t = 1;
$("div#bid_time_"+oks[0]).html(oks[3]);
}else{



$("div#bid_time_"+oks[0]).html(oks[2]);

}


$("div#bid_offers_"+oks[0]).html(oks[5]);

if (oks[3] == "Sold")
{
$("div#bid_best_"+oks[0]).html("Winner: " + oks[1]);
}else{
$("div#bid_best_"+oks[0]).html(oks[1]);
}
			}
   
   }

 
 });

}