var albumDrawer_obj = false;
var albumDrawer_index = 0;
var albumDrawer_items = new Array();


function albumDrawer_next()
{
	// Initializing if needed
	albumDrawer_init();
	
	if(albumDrawer_items[albumDrawer_index + 3])
	{
		// Hiding the current top of the list
		albumDrawer_items[albumDrawer_index].style.display = "none";
		
		// Incrementing the index
		albumDrawer_index ++;
	}
	
	// Stoping the link
	return false;
}


function albumDrawer_prev()
{
	// Initializing if needed
	albumDrawer_init();
	
	if(albumDrawer_items[albumDrawer_index - 1])
	{
		// Showing the current top of the list
		albumDrawer_items[albumDrawer_index - 1].style.display = "block";
		
		// Decrementing the index
		albumDrawer_index --;
	}

	
	// Stoping the link
	return false;
}


function albumDrawer_init()
{
	// Initializing the drawer object
	if(!albumDrawer_obj)	albumDrawer_obj = document.getElementById('album_switcher');
	
	// Initializing the list of albums
	if(albumDrawer_items.length == 0)
	{
		for(var i = 0; i < albumDrawer_obj.childNodes.length; i ++)
		{
			if(albumDrawer_obj.childNodes[i].className == "album")
			{
				albumDrawer_items.push(albumDrawer_obj.childNodes[i]);
			}
		}
		albumDrawer_index = 0;
	}
}