
var t = 1;
var tot;

function ChangeRoadImage(total){
	tot = total;
	setInterval("ChangeRoadImageStep2()", 5000);
}

function ChangeRoadImageStep2(){
    $('#bigimage').fadeOut(1000);
    setTimeout('ChangeRoadImageFunc()', 1000);
}

function ChangeRoadImageFunc(){
    $('#bigimage').hide();
    var thumb = document.getElementById("loadimg" + t).src;
    document.getElementById("bigimage").src = thumb;
    $('#bigimage').fadeIn(1000);
    
    if (t + 1 == tot) {
        t = 0;
    }
    else {
        t = t + 1;
    }
}