var timerVertical;
var verticalDir;
var pos=1;
function ShowPicture(img,p)
{
	pos=p;
	var bigImg=document.getElementById("BigPicture");
	var bigImgTitle=document.getElementById("BigPictureTitle");
	bigImgTitle.innerHTML=img.alt;
	bigImg.src=img.src;
	bigImg.alt=img.alt;

}
function Mv()
{
var objScroll=document.getElementById("GalleryCollection");
objScroll.scrollTop+=(verticalDir*10);
timerVertical=setTimeout(Mv,30);
}
function MoveVertical(w)
{
verticalDir=w;
timerVertical=setTimeout(Mv,30);
}

function StopMove()
{
	clearTimeout(timerVertical);
}


function GetElementInContainer(node,tag)
{
var elem =node.getElementsByTagName(tag);
return elem;
}


function ImagePagerClick(d)
{
var n=document.getElementById("GalleryCollection");
nodes=GetElementInContainer(n,"img");
pos=pos+d*1;
if (pos<0){
	pos=0;
	return;
	}
if (nodes.length <pos){
	pos--;
	return;
}
ShowPicture(nodes[pos],pos);

}
function NextImage()
{

}
