<!--
// Realised by Apachejeff
//www.huntingground.freeserve.co.uk

var slide1 = new slideshow('slideshow1',6000,2,1) // name, speed (milliseconds), duration (seconds), random (0 = no, 1 = yes)
slide1.images_array("strawberries.jpg",
"snapbeans.jpg","ban3.jpg","lettuce.jpg","yellowbell.jpg","limes.gif","asparagus.jpg","lemon.jpg","celery.jpg","rasberry.jpg","broccoli.jpg","tomatoes2.jpg","avocado.jpg","greenonions.jpg","peach.jpg","redbell.jpg","leafy.jpg","parsley.jpg","radishes50.jpg","apple.jpg","cauliflower.jpg","romaine.jpg","cherries.jpg","bluegrapes.jpg","cabbagered.jpg","tomatoes.gif","BOKCHOY.jpg","apple2.jpg","citrus.jpg","redhotchilipeppers.jpg","SPINACH.jpg","berriesl.jpg","beets.jpg","eggplant.jpg","grapefruit.jpg","pear.jpg","radicchio.jpg","cornsweet.jpg","kiwi.jpg","redgrapes.jpg","redonion.jpg","garlic2.jpg","onion.jpg","cantaloupe.jpg")


moz=document.getElementById&&!document.all

function slideshow(el_name,speed,duration,rand){
var index = 0
var timer = null
var show_random=rand
var images = new Array()
var rdm_images=new Array() 

this.images_array = function(){
preload = new Array()
for (i=0;i<arguments.length;i++){
images[i] = arguments[i]
preload[i] = new Image()
preload[i].src = images[i]
}

if(show_random==1){
total=images.length
for(p=0;p<arguments.length;p++){
rndnum=Math.floor(Math.random()*total)
rdm_images[p]=images.splice(rndnum,1)
total--
}
}

}

this.runshow = function(slide_name){
if (!moz) {document.images[el_name].filters.blendTrans.Apply()}
document.images[el_name].src = (show_random==1?rdm_images[index]: images[index])
if (!moz) {document.images[el_name].filters.blendTrans.Play(duration)}
index++
if(show_random==1&&index == rdm_images.length){
index = 0
}
else{
if(index == images.length){index = 0}
}

timer = setTimeout(slide_name+".runshow('"+slide_name+"')", speed)

}

this.stopslideshow = function(){
if (timer) clearTimeout(timer)
}

}

function initshows(){
slide1.runshow('slide1')

}

//  add onload="initshows()" to the opening body tag

// -->
