function loadXML(url)
{
	if(window.XMLHttpRequest)
	xhttp=new window.XMLHttpRequest();
	else
	xhttp=new ActiveXObject("Microsoft.XMLHTTP");
	xhttp.open("GET",url,false);
	xhttp.send("");
	return xhttp.responseXML;
}
var source,desc;
xmlDoc=loadXML("images.xml");
image=xmlDoc.getElementsByTagName('image');
function getSource(i)
{
	source=image[i].getElementsByTagName('source')[0].childNodes[0].nodeValue;
}
function showImage(i)
{
	getSource(i);
	document.getElementById('album').src=source;
}
var img=0;
function slideShow()
{
	showImage(img);
	img++;
	if(img==image.length)
	img=0;
	setTimeout("slideShow()",5000);
}

function prev_img()
{
	img--;
	if(img==-1)
	img=image.length-1;
	showImage(img);
}

function next_img()
{
	img++;
	if(img==image.length)
	img=0;
	showImage(img);
}