///////configure the below four variables to change the style of the slider///////
//set the scrollerwidth and scrollerheight to the width/height of the LARGEST image in your slideshow!
var scrollerwidth='212px'
var scrollerheight='380px'
var scrollerbgcolor=''
var pausebetweenimages=5000

var slideimages=new Array()
slideimages[0]='car-slide1'
slideimages[1]='car-slide2'
slideimages[2]='car-slide3'

///////Do not edit pass this line///////////////////////
var i, tdiv, tdiv2, scrollerdiv1, scrollerdiv2;
     
var ie=document.all
var dom=document.getElementById

if (slideimages.length>1){
	i=2
}else{
	i=0
}

function move3(whichdiv){
	tdiv=eval(whichdiv)
	if (parseInt(tdiv.style.left)>0&&parseInt(tdiv.style.left)<=5){
		tdiv.style.left=0+"px"
		setTimeout("move3(tdiv)",pausebetweenimages)
		setTimeout("move4(scrollerdiv2)",pausebetweenimages)
		return
	}
	if (parseInt(tdiv.style.left)>=tdiv.offsetWidth*-1){
		tdiv.style.left=parseInt(tdiv.style.left)-5+"px"
		setTimeout("move3(tdiv)",50)
	}else{
		tdiv.style.left=scrollerwidth
		tdiv.innerHTML=document.getElementById(slideimages[i]).innerHTML
		if (i==slideimages.length-1)
			i=0
		else
			i++
	}
}

function move4(whichdiv){
	tdiv2=eval(whichdiv)
	if (parseInt(tdiv2.style.left)>0&&parseInt(tdiv2.style.left)<=5){
		tdiv2.style.left=0+"px"
		setTimeout("move4(tdiv2)",pausebetweenimages)
		setTimeout("move3(scrollerdiv1)",pausebetweenimages)
		return
	}
	if (parseInt(tdiv2.style.left)>=tdiv2.offsetWidth*-1){
		tdiv2.style.left=parseInt(tdiv2.style.left)-5+"px"
		setTimeout("move4(scrollerdiv2)",50)
	}else{
		tdiv2.style.left=scrollerwidth
		tdiv2.innerHTML=document.getElementById(slideimages[i]).innerHTML
		if (i==slideimages.length-1)
			i=0
		else
			i++
	}
}

function startscroll(){
	if (ie||dom){
		document.getElementById(slideimages[0]).style.display = 'none';
		tdiv = document.getElementById('sliderfirst');
		tdiv.innerHTML=document.getElementById(slideimages[0]).innerHTML
		tdiv = document.getElementById('slidersecond');
		tdiv.innerHTML=document.getElementById(slideimages[1]).innerHTML
		scrollerdiv1=ie? sliderfirst : document.getElementById("sliderfirst")
		scrollerdiv2=ie? slidersecond : document.getElementById("slidersecond")
		move3(scrollerdiv1)
		scrollerdiv2.style.left=scrollerwidth
	}
}
