// JavaScript Document

function next()
{
	if(currentdiv < a.length - 1)
	{
		show(currentdiv + 1);
	} else {
		show(0)
	}
}

function prev()
{
	if(currentdiv >= 1)
	{
		show(currentdiv - 1);
	} else {
		show(a.length - 1)
	}
}

function show(id)
{
   for(i=0;i<div.length;i++)
	{
			document.getElementById(div[i]).style.display="none";
			document.getElementById(a[i]).className="gallery_button";
	}

	document.getElementById(a[id]).className="gallery_button_active";
	document.getElementById(div[id]).style.display="block";
	
	currentdiv = id;
}
