//Specify the marquee's width (in pixels)
var marqueewidth="200px"
//Specify the marquee's height
var marqueeheight="420px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//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:
var photos=new Array();
photos[0]=['images/gallery/small/3.jpg', 'javascript:ZoomImage(\'images/gallery/large/3.jpg\');', '']
photos[1]=['images/gallery/small/4.jpg', 'javascript:ZoomImage(\'images/gallery/large/4.jpg\');', '']
photos[2]=['images/gallery/small/5.jpg', 'javascript:ZoomImage(\'images/gallery/large/5.jpg\');', '']
photos[3]=['images/gallery/small/6.jpg', 'javascript:ZoomImage(\'images/gallery/large/6.jpg\');', '']
photos[4]=['images/gallery/small/7.jpg', 'javascript:ZoomImage(\'images/gallery/large/7.jpg\');', '']
photos[5]=['images/gallery/small/8.jpg', 'javascript:ZoomImage(\'images/gallery/large/8.jpg\');', '']
photos[6]=['images/gallery/small/9.jpg', 'javascript:ZoomImage(\'images/gallery/large/9.jpg\');', '']
photos[7]=['images/gallery/small/10.jpg', 'javascript:ZoomImage(\'images/gallery/large/10.jpg\');', '']
photos[8]=['images/gallery/small/11.jpg', 'javascript:ZoomImage(\'images/gallery/large/11.jpg\');', '']
photos[9]=['images/gallery/small/12.jpg', 'javascript:ZoomImage(\'images/gallery/large/12.jpg\');', '']
photos[10]=['images/gallery/small/13.jpg', 'javascript:ZoomImage(\'images/gallery/large/13.jpg\');', '']
photos[11]=['images/gallery/small/14.jpg', 'javascript:ZoomImage(\'images/gallery/large/14.jpg\');', '']
photos[12]=['images/gallery/small/15.jpg', 'javascript:ZoomImage(\'images/gallery/large/15.jpg\');', '']
photos[13]=['images/gallery/small/16.jpg', 'javascript:ZoomImage(\'images/gallery/large/16.jpg\');', '']
photos[14]=['images/gallery/small/17.jpg', 'javascript:ZoomImage(\'images/gallery/large/17.jpg\');', '']
photos[15]=['images/gallery/small/18.jpg', 'javascript:ZoomImage(\'images/gallery/large/18.jpg\');', '']
photos[16]=['images/gallery/small/19.jpg', 'javascript:ZoomImage(\'images/gallery/large/19.jpg\');', '']

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="Electric Gates" border="'+imgBorder+'"><br><hr>'
marqueecontent+=typeof photos[i_tem][1]!=='undefined'? '</a>' : ''
}
if (iedom||document.layers){
with (document){
if (iedom){
write('<div id="Layer2" style="overflow:hidden;"><div id="Layer1" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"><div id="iemarquee"><table align="center"><tr><td height="100%" align="center" valign="middle">Loading . . .</td></tr></table>')
write('</div><div id="iemarquee2" style="position:absolute;left:0px;top:5px;width:100%;">')
write('</div></div></div>')
}
else if (document.layers){
write('<ilayer width="100px" height="100%" name="ns_marquee">')
write('<layer name="ns_marquee2" width="100" height="100%" 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
}
}


