pcount = 26;
maxscroll=(pcount*160)+((pcount-1)*30)-460;
stopscroll=0;
curentscroll=0;
task=null;
trwa=false;
auto=true;
autorev=false;
function automove()
{
if (auto) 
 {
 
  if ((!trwa)) {
  if (autorev == false) {
  curentscroll+=1;
  //stopscroll+=1;
  }
  else
  {
  curentscroll-=1;
  ////stopscroll-=1;
  }
  if (curentscroll>maxscroll) {autorev = true;}
  if (curentscroll<0) {autorev = false;}
  if (curentscroll<0) {curentscroll=0; stopscroll=0;}
  
  obj2 = document.getElementById('scrollcont');
  obj2.style.left='-'+curentscroll+'px';
  }

  
  window.setTimeout("automove()", 2*10);
 }
}
window.setTimeout("automove()", 300*10);
function leftbover() 
{
//auto=false;
	obj = document.getElementById('leftb');
		if (curentscroll>0) {
		obj.src="http://www.norbsoft.pl/img/partleft_h.png";
		}
}	
function leftbout() 
{
	obj = document.getElementById('leftb');
		obj.src="http://www.norbsoft.pl/img/partleft.png";
		
}	
function rightbover() 
{
//auto=false;
	obj = document.getElementById('rightb');
		if (curentscroll<maxscroll) {
		obj.src="http://www.norbsoft.pl/img/partright_h.png";
		}
}	
function rightbout() 
{
	obj = document.getElementById('rightb');
		obj.src="http://www.norbsoft.pl/img/partright.png";
		
}	
function scrollUp()
{

if ((curentscroll<maxscroll)  && (!trwa)) {
trwa=true;
stopscroll=curentscroll+160;
scrollUp2();}
}
function scrollUp2() {
	//clearTimeout(task);
  	obj = document.getElementById('scrollcont');
	curentscroll+=20;
	if ((curentscroll<=maxscroll) && (curentscroll<=stopscroll))
	{
		if (curentscroll<0) {curentscroll=0;}
		obj.style.left='-'+curentscroll+'px';
		task=window.setTimeout("scrollUp2()", 30);
	} else {trwa=false;}
   if (curentscroll>stopscroll) {curentscroll=stopscroll;}
}
function scrollDown()
{

if ((curentscroll>0) && (!trwa)) {
trwa=true;
stopscroll=curentscroll-160;
scrollDown2();}
}
function scrollDown2() {
	//clearTimeout(task);
  	obj = document.getElementById('scrollcont');
	curentscroll-=20;
	
	if ((curentscroll>=0) && (curentscroll>=stopscroll))
	{   if (curentscroll<0) {curentscroll=0;}
		obj.style.left='-'+curentscroll+'px';
		task=window.setTimeout("scrollDown2()", 30);
	} else {trwa=false;}
   if (curentscroll<0) {curentscroll=0;}
}
