var POP = new Object();

POP['timer'] = null;
POP['counter'] = 0;

POP['settimer'] = function()
{
	POP['timer'] = window.setTimeout(function(){ POP['incr'](); }, 6000);
};

POP['manipulate'] = function(uiCange)
{
	var uiNext = (POP['counter']+uiCange+POP["last"])%POP["last"];
	
	if($('po'+uiNext))
	{
		$('po'+POP['counter']).style.display='none';
		POP['counter'] = uiNext;
		$('po'+POP['counter']).style.display='block';
	}
	
	if(POP['timer'] != null)
	{
		window.clearTimeout(POP['timer']);
	}
		
	POP['settimer']();
}
	
POP['incr'] = function()
{
	POP['manipulate'](1);
};

POP['decr']  = function()
{
	POP['manipulate'](-1);
};

