/*
Vertical Pausing Slideshow - freely adapted from:
Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Modified by jscheuer1 for continuous content slideshow. Credit MUST stay intact for use
visit http://www.dynamicdrive.com/forums
*/

//Specify the marquee's width (in pixels)
var marqueewidth="120px"
//Specify the marquee's height
var marqueeheight="500px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//Specify initial pause before scrolling in milliseconds
var initPause=1000
//Specify start with Full(1)or Empty(0) Marquee
var full=1
//Pause marquee onMousever (0=no 1=yes)?
var pauseit=1
//Specify images' border
imgBorder=0

var photos=new Array();
//Specify images, optional link, optional target:
photos[0]=['http://www.crystallakeadventuresports.com/media/l-avery.jpg', 'http://www.averyoutdoors.com', '_blank']
photos[1]=['http://www.crystallakeadventuresports.com/media/l-bendingbranches.jpg', 'http://www.bendingbranches.com', '_blank']
photos[2]=['http://www.crystallakeadventuresports.com/media/l-cabrinha.jpg', 'http://www.cabrinhakites.com', '_blank']
photos[3]=['http://www.crystallakeadventuresports.com/media/l-dakine.jpg', 'http://www.dakine.com', '_blank']
photos[4]=['http://www.crystallakeadventuresports.com/media/l-greenhead.jpg', 'http://www.greenheadgear.com', '_blank']
photos[5]=['http://www.crystallakeadventuresports.com/media/l-harmony.jpg', 'http://www.harmonygear.com', '_blank']
photos[6]=['http://www.crystallakeadventuresports.com/media/l-kona.jpg', 'http://www.konaworld.com', '_blank']
photos[7]=['http://www.crystallakeadventuresports.com/media/l-lacrosse.jpg', 'http://www.lacrossefootwear.com', '_blank']
photos[8]=['http://www.crystallakeadventuresports.com/media/l-madrivercanoe.jpg', 'http://www.madrivercanoe.com', '_blank']
photos[9]=['http://www.crystallakeadventuresports.com/media/l-merrell.jpg', 'http://www.merrell.com', '_blank']
photos[10]=['http://www.crystallakeadventuresports.com/media/l-mtborah.jpg', 'http://www.mtborah.com', '_blank']
photos[11]=['http://www.crystallakeadventuresports.com/media/l-perception.jpg', 'http://www.perceptionkayaks.com', '_blank']
photos[12]=['http://www.crystallakeadventuresports.com/media/l-reef.jpg', 'http://www.reef.com', '_blank']
photos[13]=['http://www.crystallakeadventuresports.com/media/l-smartwool.jpg', 'https://www.smartwool.com', '_blank']
photos[14]=['http://www.crystallakeadventuresports.com/media/l-smithoptics.jpg', 'http://www.smithoptics.com', '_blank']
photos[15]=['http://www.crystallakeadventuresports.com/media/l-stcroix.jpg', 'http://www.stcroixrods.com', '_blank']
photos[16]=['http://www.crystallakeadventuresports.com/media/l-surftech.jpg', 'http://www.surftech.com', '_blank']
photos[17]=['http://www.crystallakeadventuresports.com/media/l-timex.jpg', 'http://www.timex.com', '_blank']
photos[18]=['http://www.crystallakeadventuresports.com/media/l-underarmor.jpg', 'http://www.underarmour.com', '_blank']
photos[19]=['http://www.crystallakeadventuresports.com/media/l-wenerpaddles.jpg', 'http://www.wernerpaddles.com', '_blank']
photos[20]=['http://www.crystallakeadventuresports.com/media/l-wilderness.jpg', 'http://www.wildernesssystems.com', '_blank']
photos[21]=['http://www.crystallakeadventuresports.com/media/l-camelbak.jpg', 'http://www.camelbak.com', '_blank']
photos[22]=['http://www.crystallakeadventuresports.com/media/l-thule.jpg', 'http://www.thuleracks.com', '_blank']
photos[23]=['http://www.crystallakeadventuresports.com/media/l-zink.jpg', 'http://www.zinkcalls.com', '_blank']
photos[24]=['http://www.crystallakeadventuresports.com/media/l-eaglesnest.jpg', 'http://www.eaglesnestoutfittersinc.com', '_blank']

////NO NEED TO EDIT BELOW THIS LINE////////////
var preload=new Array()
for (var i_tem = 0; i_tem < photos.length; i_tem++){
preload[i_tem]=new Image()
preload[i_tem].src=photos[i_tem][0]
}

var actualheight=marqueecontent=''
var copyspeed=marqueespeed
var pausespeed=(pauseit)? 0 : copyspeed
var iedom=document.all||document.getElementById
var cross_marquee, cross_marquee2, ns_marquee

for (var i_tem = 0; i_tem < photos.length; i_tem++){
if (typeof photos[i_tem][1]!=='undefined'){
marqueecontent+='<a href="'+photos[i_tem][1]+'"'
marqueecontent+=typeof photos[i_tem][2]!=='undefined'? ' target="'+photos[i_tem][2]+'"' : ''
marqueecontent+=' >'
}
marqueecontent+='<img src="'+photos[i_tem][0]+'" alt="Image #'+[i_tem+1]+'" border="'+imgBorder+'"><br>'
marqueecontent+=typeof photos[i_tem][1]!=='undefined'? '</a>' : ''
}
if (iedom||document.layers){
with (document){
if (iedom){
write('<div style="overflow:hidden;"><div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px;width:100%;"><table align="center"><tr><td height="'+marqueeheight+'" align="center" valign="middle"><img src="media/loading.gif" border="0"></td></tr></table>')
write('</div><div id="iemarquee2" style="position:absolute;left:0px;top:0px;width:100%;">')
write('</div></div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">')
write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
}
}

function populate(){
if (document.all)
for (var i_tem = 0; i_tem < preload.length; i_tem++)
if (typeof preload[i_tem].complete=='boolean'&&!preload[i_tem].complete){
setTimeout("populate();", 2000)
return;
}
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee2=document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee2
cross_marquee.style.top=(full==1)? '0px' : parseInt(marqueeheight)+0+"px"
cross_marquee2.innerHTML=cross_marquee.innerHTML=marqueecontent
actualheight=cross_marquee.offsetHeight
cross_marquee2.style.top=(parseInt(cross_marquee.style.top)+actualheight+0)+"px" //indicates following #1
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.top=parseInt(marqueeheight)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualheight=ns_marquee.document.height
}
setTimeout('lefttime=setInterval("scrollmarquee()",20)',initPause)
}
window.onload=populate

function scrollmarquee(){

if (iedom){
if (parseInt(cross_marquee.style.top)<(actualheight*(-1)))
cross_marquee.style.top=(parseInt(cross_marquee2.style.top)+actualheight)+"px"
if (parseInt(cross_marquee2.style.top)<(actualheight*(-1)))
cross_marquee2.style.top=(parseInt(cross_marquee.style.top)+actualheight)+"px"
cross_marquee2.style.top=parseInt(cross_marquee2.style.top)-copyspeed+"px"
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
}

else if (document.layers){
if (ns_marquee.top>(actualheight*(-1)+8))
ns_marquee.top-=copyspeed
else
ns_marquee.top=parseInt(marqueeheight)+8
}
}