var tmp, rand;
for(var i =0; i < scroll_image.length; i++){
	rand = Math.floor(Math.random() * scroll_image.length);
	tmp = scroll_image[i]; 
	scroll_image[i] = scroll_image[rand]; 
	scroll_image[rand] =tmp;
}



var slidespeed=1;
var slideshowgap=20;

var imagegap="";

var copyspeed=slidespeed;

scroll_image='<a href="?id=brands" title="alle anzeigen..."><nobr>'+scroll_image.join(imagegap)+'</nobr></a>'

var iedom=document.getElementById;
var cross_slide;

function fillup() {
	if (iedom){
		cross_slide=document.getElementById("test2");
		cross_slide.innerHTML=scroll_image;	
		lefttime=setInterval("slideleft()",30);
	}
}

window.onload=fillup;

function slideleft() {
	if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)) {
		cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px";
	} else {
		cross_slide.style.left=sliderwidth+"px";
	}	
}


if (iedom) {
	with (document) {
		document.write('<table border="0" cellspacing="0" cellpadding="0"><td>');
		if (iedom) {
			write('<div style="position:relative;width:'+sliderwidth+'px;height:'+sliderheight+'px;overflow:hidden">')
			write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
			write('</div>')
		}
		document.write('</td></table>');
	}
} else {
	document.write('scroll images not available');
}