var ultimateshow=new Array()
//ultimateshow[x]=["Папка с картинките", "OPTIONAL link for image", "OPTIONAL link target"]
ultimateshow[0]=['catalog/img/download_2_pic.jpg', 'catalog/download_2_file.pdf', '_blank']
ultimateshow[1]=['catalog/img/download_3_pic.jpg', 'catalog/download_3_file.pdf', '_blank']
ultimateshow[2]=['catalog/img/download_4_pic.jpg', 'catalog/download_4_file.pdf', '_blank']
ultimateshow[3]=['catalog/img/download_5_pic.jpg', 'catalog/download_5_file.pdf', '_blank']
ultimateshow[4]=['catalog/img/download_6_pic.jpg', 'catalog/download_6_file.pdf', '_blank']
ultimateshow[5]=['catalog/img/download_7_pic.jpg', 'catalog/download_7_file.pdf', '_blank']
ultimateshow[6]=['catalog/img/download_8_pic.jpg', 'catalog/download_8_file.pdf', '_blank']
ultimateshow[7]=['catalog/img/download_9_pic.jpg', 'catalog/download_9_file.pdf', '_blank']
ultimateshow[8]=['catalog/img/download_10_pic.jpg', 'catalog/download_10_file.pdf', '_blank']
ultimateshow[9]=['catalog/img/download_15_pic.jpg', 'catalog/download_15_file.pdf', '_blank']
//Настройка на картинките
var slidewidth="100" //Дължина по width
var slideheight="70" //Дължина по height
var slidecycles="" //Номер на картинка при която да спре ротацията
var randomorder="yes" //Повтаряне на картинките "yes" или "no"
var preloadimages="yes" //preload images? "yes" or "no"
var slidebgcolor=''
//Скорост на ротация на картинките (в милисекунди)
var slidedelay=4000
var ie=document.all
var dom=document.getElementById
var curcycle=0
if (preloadimages=="yes"){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}
var currentslide=0
function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]="_selected!"
z++
}
}
}
if (randomorder=="yes")
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow
function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'" target="'+ultimateshowCopy[currentslide][2]+'">'
ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}
if (ie||dom)
window.onload=start_slider