
(function(){
var i=0, myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[0]="skin/default/images/photo1.jpg"
myimages[1]="skin/default/images/photo2.jpg"
myimages[2]="skin/default/images/photo3.jpg"
myimages[3]="skin/default/images/photo4.jpg"
myimages[4]="skin/default/images/photo5.jpg"

var change=function(){
document.getElementById('randm').style.backgroundImage="url("+document.getElementById('rand').src+")";
fade('rand', 'out', 0, 150);
setTimeout(function(){document.getElementById('rand').src=myimages[(i++<myimages.length-1? i : i=0)];},30);
}

myimages.sort(function() {return 0.5 - Math.random();});
document.write('<div id="randm"><img id="rand" onload="fade(this, \'in\', 100, 2, 30);" src="'+myimages[i++]+'" border=0><\/div>')
setInterval(function(){change();}, 9000);
})();
