var pos=0;
var maxScroll=0;
var masterPos=0;

function setMaxScroll(max) {
	maxScroll = max-5;
	if (maxScroll < 0){	maxScroll = 0;}
}

function scrollRight() {
	if(masterPos<0)	{masterPos=0;}
	if(masterPos>maxScroll)	{masterPos=maxScroll;}
	pos = masterPos + 1;
	if (pos < 0){	pos = 0;}
	if (pos > maxScroll){	pos = maxScroll;}
	var offset = pos*100;
	document.getElementById("slideScroll").style.cssText="left: -"+offset+"px;";
	masterPos++;
}

function scrollLeft() {
	if(masterPos<0)	{masterPos=0;}
	if(masterPos>maxScroll)	{masterPos=maxScroll;}
	pos = masterPos - 1;
	if (pos < 0){	pos = 0;}
	var offset = pos*100;
	document.getElementById("slideScroll").style.cssText="left: -"+offset+"px;";
	masterPos--;
}
