//<!--- Begin
/*
Conveyor belt slideshow script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com
*/
//Specify the slider's width (in pixels)
var sliderwidth="720px"
//Specify the slider's height
var sliderheight="300px"
var wslide=360 // half the width of slider
var travel=0

//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=4
//configure background color:
slidebgcolor="#EAEAEA"

//Specify the slider's images
var route=new Array('Bathford - Guildhall','Combe Down - Guildhall','Newton - GWR Station','Oldfield Park - Guildhall','Twerton - Guildhall','Weston - GWR Station')
var numslides=new Array(15,15,15,15,15,15)
var finalslide=''
var tramslide=new Array()
wpics=new Array()
numbb=6
bb=0
for(ii=0;ii<numbb;ii++){
tramslide[ii]=new Array()
wpics[ii]=720*numslides[ii]
for(cc=0;cc<numslides[ii];cc++)tramslide[ii][cc]='<img src="tramps/tram'+((ii+1)*100+cc+1)+'.jpg">'
tramslide[ii]='<nobr>'+tramslide[ii].join("")+'</nobr>'
}
////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
var forward=1
var nn4 = 0
if(document.images) nn4 = (document.layers)
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-11000px">'+tramslide[bb]+'</span>')
var actualwidth=''
var cross_slide, ns_slide
var counter=0
function fillup(){
if (iedom){
//document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+tramslide[bb]+'</span>')
cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
cross_slide.innerHTML=tramslide[bb]
actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide.document.write(tramslide[bb])
ns_slide.document.close()
actualwidth=ns_slide.document.width
}
lefttime=setInterval("sliding()",30)
}
window.onload=fillup

function routeswap(ii){
if(travel>wpics[ii]-720) bb=bb
else bb=ii

fillup()

}


function sliding(){

if (travel<0) {
counter=0
forward=1
fillup
}
if (travel>wpics[bb]-2*wslide) {
forward=-1
counter=0
}
if((travel%720>10)&&(counter==1))counter=0
if ((travel%720==0)&&(counter==0)) forward=0
if (iedom) cross_slide.style.left=parseInt(cross_slide.style.left)-forward*copyspeed+"px" 
else if (document.layers) ns_slide.left-=forward*copyspeed
travel+=forward*copyspeed
}


if (iedom||document.layers){
with (document){
if(nn4)
{document.write('<table width="738" border="9" bgcolor="darkgreen" color="white" align="center">')
document.write('<tr><td  bgcolor="darkgreen"><center><font size="4" color="white"><b><form name="liner"><input type="radio" name="lroute" onClick="routeswap(0)" checked="checked">'+route[0]+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="lroute" onClick="routeswap(1)">'+route[1]+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="lroute" onClick="routeswap(2)">'+route[2]+'<br><input type="radio" name="lroute" onClick="routeswap(3)">'+route[3]+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="lroute" onClick="routeswap(4)">'+route[4]+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="lroute" onClick="routeswap(5)">'+route[5]+'</form></b></font></center></td></tr><tr><td>')
}
else document.write('<table class="tditem4" width="738" border="9" cellspacing="0" cellpadding="0" align="center" bgcolor="darkgreen"><tr><td colspan="5" ><table width="720" style="cursor:hand" class="tditem4" border="1"><tr><td width="120" height="36" onClick="routeswap(0)"><FONT COLOR="YELLOW" >'+route[0]+'<br>15 figs</FONT></td><td width="120" onClick="routeswap(1)"><FONT COLOR="YELLOW" >'+route[1]+'<br>15 figs</FONT></td><td width="120" onClick="routeswap(2)"><FONT COLOR="YELLOW" >'+route[2]+'<br>12+3 figs</FONT></td><td width="120" onClick="routeswap(3)"><FONT COLOR="YELLOW" >'+route[3]+'<br>15 figs</FONT></td><td width="120" onClick="routeswap(4)"><FONT COLOR="YELLOW" >'+route[4]+'<br>13+2 figs</FONT></td><td width="120" onClick="routeswap(5)"><FONT COLOR="YELLOW" >'+route[5]+'<br>12+3 figs</FONT></td></tr></table></tr></td><tr><td colspan="5">')
if (iedom){
write('<div style="position:relative;width:720px;height:300px;overflow:hidden">')
write('<div id="test2" style="position:absolute;left:-0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
if(nn4) document.write('</td></tr><tr><td width="720" bgcolor="darkgreen"><center><font size="4" color="white"><form name="speedy"><b><input type="radio" name="station" onClick="forward=-2;counter=2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="radio" name="station" onClick="forward=-1;counter=1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="radio" name="station" onClick="forward=0;counter=1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="radio" name="station" onClick="forward=1;counter=1" checked="checked">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="radio" name="station" onClick="forward=2;counter=2"><br><<&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; >></form></b></font></center></td></tr></table>')
else document.write('</td></tr><tr><td width="128" height="36" onClick="forward=-2;counter=2" style="cursor:hand"><center><font color="white"><b>'+"<<"+'</b></font></center></td><td width="128" onClick="forward=-1;counter=1" style="cursor:hand"><center><font color="white"><b>'+"<"+'</b></font></center></td><td width="128" onClick="forward=0;counter=1" style="cursor:hand"><center><font color="white"><b>'+"||"+'</b></font></center></td><td width="128" onClick="forward=1;counter=1" style="cursor:hand"><center><font color="white"><b>'+">"+'</b></font></center></td><td width="128" onClick="forward=2;counter=2" style="cursor:hand"><center><font color="white"><b>'+">>"+'</b></font></center></td></tr></table>')
}
}














