//Presentational Slideshow Script- By Dynamic Drive //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com //This credit MUST stay intact for legal use
var slideshow_width='320px' //SET SLIDESHOW WIDTH (set to largest image's width if multiple dimensions exist) var slideshow_height='280px' //SET SLIDESHOW HEIGHT (set to largest image's height if multiple dimensions exist) var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds) var slidebgcolor="white"
var dropimages=new Array() //SET IMAGE PATHS. Extend or contract array as needed dropimages[0]="[b[URL FOTO[/b]" dropimages[1]="[b[URL FOTO[/b]" dropimages[2]="[b[URL FOTO[/b]"
var droplinks=new Array() //SET IMAGE URLs. Use "" if you wish particular image to NOT be linked: droplinks[0]="[b[YOUR link[/b]" droplinks[1]="[b[Your LINK[/b]" droplinks[2]="[b[Your Link[/b]"
////NO need to edit beyond here/////////////
var preloadedimages=new Array() for (p=0;p<dropimages.length;p++){ preloadedimages[p]=new Image() preloadedimages[p].src=dropimages[p] }
var ie4=document.all var dom=document.getElementById
function rotateimage(){ if (ie4||dom){ resetit(curcanvas) var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas) crossobj.style.zIndex++ var temp='setInterval("movepic()",50)' dropslide=eval(temp) curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0" } else document.images.defaultslide.src=dropimages[curimageindex] linkindex=curimageindex curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0 }
function rotatelink(){ if (droplinks[linkindex]!="") window.location=droplinks[linkindex] }
function resetit(what){ curpos=parseInt(slideshow_width)*(-1) var crossobj=ie4? eval("document.all."+what) : document.getElementById(what) crossobj.style.left=curpos+"px" }
function startit(){ var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas) crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img src="'+dropimages[curimageindex]+'" border=0></a>' rotateimage() }
if (ie4||dom) window.onload=startit else setInterval("rotateimage()",pause)
var trans_width='320px' //slideshow width var trans_height='250px' //slideshow height var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds) var degree=10 //animation speed. Greater is faster.
var slideshowcontent=new Array() //Define slideshow contents: [image URL, OPTIONAL LINK, OPTIONAL LINK TARGET] slideshowcontent[0]=["URL FOTO"] slideshowcontent[1]=["URL FOTO"] slideshowcontent[2]=["URL FOTO"]
////NO need to edit beyond here/////////////
var bgcolor='white'
var imageholder=new Array() for (i=0;i<slideshowcontent.length;i++){ imageholder[i]=new Image() imageholder[i].src=slideshowcontent[i][0] }
var ie4=document.all var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
var curpos=trans_width*(-1) var curcanvas="canvas0" var curindex=0 var nextindex=1
function getslidehtml(theslide){ var slidehtml="" if (theslide[1]!="") slidehtml='<a href="'+theslide[1]+'" target="'+theslide[2]+'">' slidehtml+='<img src="'+theslide[0]+'" border="0">' if (theslide[1]!="") slidehtml+='</a>' return slidehtml }
function moveslide(){ if (curpos<0){ curpos=Math.min(curpos+degree,0) tempobj.style.left=curpos+"px" } else{ clearInterval(dropslide) if (crossobj.filters) crossobj.filters.alpha.opacity=100 else if (crossobj.style.MozOpacity) crossobj.style.MozOpacity=1 nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1" tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas) tempobj.innerHTML=getslidehtml(slideshowcontent[curindex]) nextindex=(nextindex<slideshowcontent.length-1)? nextindex+1 : 0 setTimeout("rotateslide()",pause) } }
function rotateslide(){ if (ie4||dom){ resetit(curcanvas) crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas) crossobj.style.zIndex++ if (crossobj.filters) document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20 else if (crossobj.style.MozOpacity) document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2 var temp='setInterval("moveslide()",50)' dropslide=eval(temp) curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0" } else if (document.layers){ crossobj.document.write(getslidehtml(slideshowcontent[curindex])) crossobj.document.close() } curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0 }
function jumptoslide(which){ curindex=which rotateslide() }
function resetit(what){ curpos=parseInt(trans_width)*(-1) var crossobj=ie4? eval("document.all."+what) : document.getElementById(what) crossobj.style.left=curpos+"px" }
function startit(){ crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub if (ie4||dom){ crossobj.innerHTML=getslidehtml(slideshowcontent[curindex]) rotateslide() } else{ document.tickernsmain.visibility='show' curindex++ setInterval("rotateslide()",pause) } }
if (window.addEventListener) window.addEventListener("load", startit, false) else if (window.attachEvent) window.attachEvent("onload", startit) else if (ie4||dom||document.layers) window.onload=startit
///////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='320px' var scrollerheight='280px' //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]='<img src="URL FOTO">' slideimages[1]='<img src="URL FOTO">' slideimages[2]='<img src="URL FOTO">' slideimages[3]='<img src="URL FOTO">' slideimages[4]='<img src="URL FOTO">' //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' } }
///////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='320px' var scrollerheight='280px' 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]='<img src="URL FOTO">' slideimages[1]='<img src="URL FOTO">' slideimages[2]='<img src="URL FOTO">' slideimages[3]='<img src="URL FOTO">' slideimages[4]='<img src="URL FOTO">' //extend this list
///////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' } }