// JavaScript Document

/*
Left-Right image slideshow Script-
By Dynamic Drive (www.dynamicdrive.com)
For full source code, terms of use, and 100's more scripts, visit http://dynamicdrive.com
*/

///////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='206px'
var scrollerheight='99px'
var scrollerbgcolor='white'
//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="/products/"><img src="/graphics/content/hpLozenges/gefra.jpg" border="0" /></a>'
slideimages[1]='<a href="/products/"><img src="/graphics/content/hpLozenges/sharonfruit.jpg" border="0" /></a>'
slideimages[2]='<a href="/products/"><img src="/graphics/content/hpLozenges/frutica.jpg" border="0" /></a>'
slideimages[3]='<a href="/products/"><img src="/graphics/content/hpLozenges/vintagefruit.jpg" border="0" /></a>'
slideimages[4]='<a href="/products/"><img src="/graphics/content/hpLozenges/gpa.jpg" border="0" /></a>'
slideimages[5]='<a href="/products/"><img src="/graphics/content/hpLozenges/noble.jpg" border="0" /></a>'
slideimages[6]='<a href="/products/"><img src="/graphics/content/hpLozenges/copefrut.jpg" border="0" /></a>'
slideimages[7]='<a href="/products/"><img src="/graphics/content/hpLozenges/kedem.jpg" border="0" /></a>'
slideimages[8]='<a href="/products/"><img src="/graphics/content/hpLozenges/vbm.jpg" border="0" /></a>'
slideimages[9]='<a href="/products/"><img src="/graphics/content/hpLozenges/costabrava.jpg" border="0" /></a>'
slideimages[10]='<a href="/products/"><img src="/graphics/content/hpLozenges/r10.jpg" border="0" /></a>'
slideimages[11]='<a href="/products/"><img src="/graphics/content/hpLozenges/costena.jpg" border="0" /></a>'
slideimages[12]='<a href="/products/"><img src="/graphics/content/hpLozenges/subsole.jpg" border="0" /></a>'
slideimages[13]='<a href="/products/"><img src="/graphics/content/hpLozenges/delnature.jpg" border="0" /></a>'
slideimages[14]='<a href="/products/"><img src="/graphics/content/hpLozenges/madeinblu.jpg" border="0" /></a>'
slideimages[15]='<a href="/products/"><img src="/graphics/content/hpLozenges/eco.jpg" border="0" /></a>'
slideimages[16]='<a href="/products/"><img src="/graphics/content/hpLozenges/ugli.jpg" border="0" /></a>'
slideimages[17]='<a href="/products/"><img src="/graphics/content/hpLozenges/taligrapes.jpg" border="0" /></a>'
slideimages[18]='<a href="/products/"><img src="/graphics/content/hpLozenges/amou.jpg" border="0" /></a>'
slideimages[19]='<a href="/products/"><img src="/graphics/content/hpLozenges/lagnasco.jpg" border="0" /></a>'
slideimages[20]='<a href="/products/"><img src="/graphics/content/hpLozenges/delcurto.jpg" border="0" /></a>'
slideimages[21]='<a href="/products/"><img src="/graphics/content/hpLozenges/inseason.jpg" border="0" /></a>'
slideimages[22]='<a href="/products/"><img src="/graphics/content/hpLozenges/ums.jpg" border="0" /></a>'
slideimages[23]='<a href="/products/"><img src="/graphics/content/hpLozenges/jo-rie.jpg" border="0" /></a>'
slideimages[24]='<a href="/products/"><img src="/graphics/content/hpLozenges/kromco.jpg" border="0" /></a>'
slideimages[25]='<a href="/products/"><img src="/graphics/content/hpLozenges/sunrivercitrus.jpg" border="0" /></a>'
slideimages[26]='<a href="/products/"><img src="/graphics/content/hpLozenges/marketdemand.jpg" border="0" /></a>'
slideimages[27]='<a href="/products/"><img src="/graphics/content/hpLozenges/karsten.jpg" border="0" /></a>'
slideimages[28]='<a href="/products/"><img src="/graphics/content/hpLozenges/sedigep.jpg" border="0" /></a>'
slideimages[29]='<a href="/products/"><img src="/graphics/content/hpLozenges/cyprina.jpg" border="0" /></a>'
slideimages[30]='<a href="/products/"><img src="/graphics/content/hpLozenges/ortolan.jpg" border="0" /></a>'
slideimages[31]='<a href="/products/"><img src="/graphics/content/hpLozenges/trentina.jpg" border="0" /></a>'
slideimages[32]='<a href="/products/"><img src="/graphics/content/hpLozenges/magalia.jpg" border="0" /></a>'
slideimages[33]='<a href="/products/"><img src="/graphics/content/hpLozenges/longchamp.jpg" border="0" /></a>'
slideimages[34]='<a href="/products/"><img src="/graphics/content/hpLozenges/vanzettifrutta.jpg" border="0" /></a>'
slideimages[35]='<a href="/products/"><img src="/graphics/content/hpLozenges/gullino.jpg" border="0" /></a>'
slideimages[36]='<a href="/products/"><img src="/graphics/content/hpLozenges/graviter.jpg" border="0" /></a>'
slideimages[37]='<a href="/products/"><img src="/graphics/content/hpLozenges/mylord.jpg" border="0" /></a>'
slideimages[38]='<a href="/products/"><img src="/graphics/content/hpLozenges/arantrade.jpg" border="0" /></a>'
slideimages[39]='<a href="/products/"><img src="/graphics/content/hpLozenges/frudecas.jpg" border="0" /></a>'
slideimages[40]='<a href="/products/"><img src="/graphics/content/hpLozenges/ceccarelli.jpg" border="0" /></a>'
slideimages[41]='<a href="/products/"><img src="/graphics/content/hpLozenges/gullinost.jpg" border="0" /></a>'
slideimages[42]='<a href="/products/"><img src="/graphics/content/hpLozenges/casi3.jpg" border="0" /></a>'
slideimages[43]='<a href="/products/"><img src="/graphics/content/hpLozenges/agrigest.jpg" border="0" /></a>'
slideimages[44]='<a href="/products/"><img src="/graphics/content/hpLozenges/ayui.jpg" border="0" /></a>'
slideimages[45]='<a href="/products/"><img src="/graphics/content/hpLozenges/dafran.jpg" border="0" /></a>'
slideimages[46]='<a href="/products/"><img src="/graphics/content/hpLozenges/migranja.jpg" border="0" /></a>'
slideimages[47]='<a href="/products/"><img src="/graphics/content/hpLozenges/agricola_andrea.jpg" border="0" /></a>'
slideimages[48]='<a href="/products/"><img src="/graphics/content/hpLozenges/prize_8.jpg" border="0" /></a>'

//extend this list

slideimages.sort( randOrd );

///////Do not edit pass this line///////////////////////
     
var ie=document.all
var dom=document.getElementById

if (slideimages.length>1)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.left>0&&tlayer.left<=5){
tlayer.left=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.left>=tlayer.document.width*-1){
tlayer.left-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.left=parseInt(scrollerwidth)+5
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.left>0&&tlayer2.left<=5){
tlayer2.left=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.left>=tlayer2.document.width*-1){
tlayer2.left-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.left=parseInt(scrollerwidth)+5
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.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=slideimages[i]
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=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
scrollerdiv1=ie? first2 : document.getElementById("first2")
scrollerdiv2=ie? second2 : document.getElementById("second2")
move3(scrollerdiv1)
scrollerdiv2.style.left=scrollerwidth
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.left=parseInt(scrollerwidth)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll


