
var arr;
var objs;
var timer;
var timer_on=false;

function Populate()
{
	var im;
	im = document.getElementById("images")
	objs=im.getElementsByTagName("IMG");
	arr=new Array(objs.length);
	
	var height_counter;
	height_counter = 0;
	var i;
	for(i=0;i<arr.length;i++)
	{	
		arr[i]=objs[i].id;
		document.getElementById(arr[i]).style.top=height_counter + 'px';
		document.getElementById(arr[i]).style.left='8px';
		document.getElementById(arr[i]).style.position='absolute';
		height_counter += 175;
	}
	StartScrolling();

}
function scroll()
{
	var i;
	var temp;
	for(i=0;i<arr.length;i++)
	{	
	
		temp = parseInt(document.getElementById(arr[i]).style.top) 
		
		document.getElementById(arr[i]).style.top =  (temp - 1) + "px";
		temp = parseInt(document.getElementById(arr[i]).style.top) 
		if(parseInt(document.getElementById(arr[i]).style.top) + 175 ==0)
		{
			document.getElementById(arr[i]).style.top= (arr.length-1)*175 + "px"
					
		}
	}
	timer=setTimeout("scroll();",10);
}

function StartScrolling()
{
	if(timer_on==false)
	{
		timer=setTimeout("scroll();",10);
		timer_on=true;
	}
}
function StopScrolling()
{
	if(timer_on==true)
	{
		clearTimeout(timer);
		timer_on=false;
	}
}

