//Note: you could use the Bitkraft JSON converter (from the origianl Bitkraft Library!)!!:
//eg: you have an array of images at the server - add Bitkraft.JSON.GetObjectJSON(arrayObject) to render the following:
var carImages=[
"http://image/image/image1.gif",
"http://image/image/image2.gif",
"http://image/image/image3.gif",
"http://image/image/image4.gif",
"http://image/image/image5.gif"
]
var NUM_OF_SECS=10;
function setRandomImage(){
var imgNum=Math.floor(Math.random()*(carImages.length+1))
var sIMGURL=carImages[imgNum];
$("carImage").src=sIMGURL;
}
var pe = new PeriodicalExecuter(setRandomImage, NUM_OF_SECS);