function slider(showonline, itemcount)
{
	this.showonline = showonline;
	this.itemcount = itemcount;
	
	this.lastkey = this.showonline - 1;
	this.curshow = new Array();
	
	for(i = 0; i < this.showonline; i++){ this.curshow[i] = i; }
	
	this.showslideright = showslideright;
	this.showslideleft = showslideleft;
	this.putslidehtml = putslidehtml;
}


function showslideright()
{
	for(i = 0; i < this.showonline; i++)
	{
		tmpidelement = this.curshow[i] + 1;
		objshow = document.getElementById('slider' + tmpidelement);
		if(objshow)
		{
			this.curshow[i] += 1;
		}
		else{ this.curshow[i] = 0; }
	}
	
	this.putslidehtml();
}


function showslideleft()
{
	for(i = 0; i < this.showonline; i++)
	{
		tmpidelement = this.curshow[i] - 1;
		objshow = document.getElementById('slider' + tmpidelement);
		if(objshow)
		{
			this.curshow[i] -= 1;
		}
		else{ this.curshow[i] = this.itemcount; }
	}
	
	this.putslidehtml();
}


function putslidehtml()
{
	content = '';
	for(i = 0; i < this.showonline; i++)
	{
		objtest = document.getElementById('slider' + this.curshow[i]);
		if(objtest){ content += '<div class="slideitem">' + objtest.innerHTML + '</div>'; }
	}
	
	objcont = document.getElementById('sliderdiv');
	objcont.innerHTML = content;
}

