var scrollerwidth=557
var scrollerheight=54
var pausebetweenimages=3000

var slideimages=new Array()

slideimages[0]="<a href='http://zakupki.butb.by'><img src='image/style/images/ban/zakup.png' width='557' height='54' border='0'></a>"
slideimages[1]="<a href='http://butb.by/index.php?page=65&id=402'><img src='image/style/images/ban/kabel.png' width='557' height='54' border='0'></a>"
//slideimages[2]="<a href='?page=65&id=335'><img src='image/style/images/ban/solt.png' width='557' height='54' border='0'></a>"
slideimages[2]="<a href='?page=29'><img src='image/style/images/ban/pipt1.png' width='557' height='54' border='0'></a>"
slideimages[3]="<a href='?page=65&id=337'><img src='image/style/images/ban/shish-kebab.png' width='557' height='54' border='0'></a>"
slideimages[4]="<a href='?page=73'><img src='image/style/images/ban/grodno.jpg' width='557' height='54' border='0'></a>"
//slideimages[6]="<a href='?page=65&id=338'><img src='image/style/images/ban/cement.png' width='557' height='54' border='0'></a>"
//slideimages[4]="<a href=?page=54><img src=image/style/images/ban/paper.png width=557 height=54 border=0></a>"
//slideimages[1]="<a href='?page=65&id=361'><img src='image/style/images/ban/fanera.png' width='557' height='54' border='0'></a>"

if (slideimages.length>2)
ii=2
else
ii=0

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)-2+"px"
setTimeout("move3(tdiv)",30)}
else{
tdiv.style.top=scrollerheight+'px'
tdiv.innerHTML=slideimages[ii]
if (ii==slideimages.length-1)
ii=0
else
ii++
}}

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)-2+"px"
setTimeout("move4(second2_obj)",30)}
else{
tdiv2.style.top=scrollerheight+'px'
tdiv2.innerHTML=slideimages[ii]
if (ii==slideimages.length-1)
ii=0
else
ii++
}}

function startscroll(){
first2_obj=document.all? first2 : document.getElementById("first2")
second2_obj=document.all? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight+'px'
second2_obj.style.visibility='visible'
}

window.onload=startscroll

document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+'px;height:'+scrollerheight+'px;overflow:hidden;">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+'px;height:'+scrollerheight+'px;clip:rect(0px '+scrollerwidth+'px '+scrollerheight+'px 0px);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+'px;left:0px;top:1px;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+'px;left:0px;top:0px;visibility:hidden">')
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
