///////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='160px'
var scrollerheight='130px'
//3000 miliseconds=3 seconds
var pausebetweenimages=3000

//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.tustinpd.org/CommunityPolicing/CommunityCrimeAlert.htm"><img src="../CommunityPolicing/images/Polce-Car_w_Lights.gif" border="0" width="150" height="58" alt="Police Car with Flashing Sirens"><br><table><tr><td><img src="../CommunityPolicing/images/alert_icon.gif" border="0"></td><td><font color="red"><strong>Community<br>Crime Alert!</strong></font></td><td><img src="../CommunityPolicing/images/alert_icon.gif" border="0"></td></tr></table><u>[Click Here for Info]</u></a>'
slideimages[1]='<a href="http://www.tustinpd.org/BusinessSecurity/IdentityTheft.htm"><img src="http://www.tustinpd.org/BusinessSecurity/images/ID_Theft.jpg" border="0"><br><u>How to prevent ID theft</u></a>'
slideimages[2]='<a href="../News/ParkPlace.htm"><img src="../News/images/Donation.jpg" border="0"><br><u>Thanks to Park Place</u></a>'
//slideimages[1]='<a href="http://madd.convio.net/site/TR/917823161?pg=team&fr_id=1031&team_id=3070" target="_blank"><img src="../News/images/Stride-Logo2.jpg" border="0"><br><u>Support Team Tustin</u></a>'
slideimages[3]='<a href="http://tustinpd.org/ChildSafety/MegansLaw.wmv" target="_blank"><img src="../News/images/MegansLaw.jpg" border="0"><br><u>Megans Law with Todd Spitzer</u></a>'
slideimages[4]='<a href="http://www.ocpetinfo.com/coyoteinfo.htm" target="_blank"><img src="../News/images/coyote3.jpg" border="0"><br><u>Coyote Information</u></a>'
//slideimages[1]='<a href="../News/CasinoNight.pdf" target="_blank"><img src="../News/CasinoNight.jpg" height="91" border="0"><br><u>Santa Cop Casino Night</u></a>'
//slideimages[3]='<a href="../News/TorchRun.htm"><img src="../News/images/Torch_Run_logo_2004b.jpg" border="0"><br><u>2004 Special Olympics</u></a>'
slideimages[5]='<a href="../News/index.htm"><img src="../News/images/goped.jpg" border="0"><br><u>GoPed Safety Video</u></a>'
slideimages[6]='<a href="../News/index.htm"><img src="../News/images/schoolbus.jpg" border="0"><br><u>School Bus Safety Video</u></a>'
//slideimages[5]='<a href="http://www.moneyfactory.com/newmoney" target=_blank><img src="../news/images/money_sm.gif" border="0"><br><u>See the new $20 bill</u></a>'
slideimages[7]='<a href="../News/index.htm"><img src="../News/images/CarSafety2.jpg" border="0"><br><u>Car Seat Safety Video</u></a>'
slideimages[8]='<a href="../News/index.htm"><img src="../News/images/ToyGun.jpg" border="0"><br><u>Replica Firearms/Guns</u></a>'
slideimages[9]='<a href="../News/ChristmasDonations.pdf" target="_blank"><img src="../News/images/ChristmasDonations.gif" border="0"><br><u>Christmas Donations</u></a>'
//extend this list


/*################################################################################################*/
///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (slideimages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

