// JavaScript Document
		
if(document.getElementById("scr_b"))
	{
		var	l = files.length;
	}
var c=0;
var tid;

function build_baner()
{
	h = 0;
	pos1 = findPos("qwerty");
	pos2 = findPos("bot");

  Top = pos2[1]-pos1[1];
	scrll = document.getElementById("scr_b");
	
if(document.getElementById("scr_b"))
	{
		scrll.style.height = Top+"px";
		//alert(pos1[0]);
		scrll.style.left = pos1[0]+7+"px";
		for(i = 0; i < l; i++)
		{
		img = document.createElement("img");
		img.src = files[i];
		img.style.top = h+"px";
		img.style.left = "0px";
		img.style.position = "absolute";
		scrll.appendChild(img);
		if(i==l-1 & h < Top)i=-1;
		h = h + 108;
		img = "";
		}
	}
}


function scrollT()
{
	tid = window.setTimeout("scrollT()",25);
	scrll = document.getElementById("scr_b");
	files = scrll.getElementsByTagName("img");
	l = scrll.childNodes.length;
	h = parseInt(scrll.style.height);
	for(i = 0; i < l; i++)
	{
		//alert(parseInt(files[i].style.top));
		files[i].style.top = parseInt(files[i].style.top)-1+"px";
		h2 = parseInt(files[i].style.top)+files[i].height;
		if(i == l-1 & h2 < h)
		{
			//alert("qw");
			first = scrll.firstChild.cloneNode(false);
			first.style.top = h+"px";
			scrll.appendChild(first);
			scrll.removeChild(scrll.firstChild);
		}
	}
}

function scrollD()
{
	tid = window.setTimeout("scrollD()",25);
	scrll = document.getElementById("scr_b");
	files = scrll.getElementsByTagName("img");
	l = files.length;
	for(i = 0; i < l; i++)
	{
		files[i].style.top = parseInt(files[i].style.top)+1+"px";
		if(i == 0 & parseInt(scrll.firstChild.style.top) > 0)
		{
			scrll.firstChild.style.top = parseInt(scrll.firstChild.style.top)-1+"px"
			last = scrll.lastChild.cloneNode(false);
			scrll.insertBefore(last,scrll.firstChild);
			scrll.firstChild.style.top = "-108px";
			scrll.removeChild(scrll.lastChild);
		}
	}
	c++;
}

function stopScroll()
{
	window.clearTimeout(tid);
}

build_baner();