// JavaScript Document
function zobraz (zobrazeni) 
{
 for (i=1;i<=3;i++) 
 {
  document.getElementById('podmenu'+i).style.display = 'none';  
 }
 if (zobrazeni!="")
 document.getElementById(zobrazeni).style.display = 'block';
}



 function Scroller(){
		 	if(document.getElementById("scrollLeftButton")){
			 var lScroll = document.getElementById("scrollLeftButton");
			 var rScroll = document.getElementById('scrollRightButton');
			 var thumbs = document.getElementById('thumbs');
			 var i=0;
			 var j=0;
			 var intLeft= null;
			 var intRight= null;
			 var speed = 10;
			 var timeout = 100;
			 var lis = document.getElementsByTagName("li");
			 var x=0;
			 for (var z=0; z < lis.length; z++){
				if (lis[z].className.indexOf("thumb") != -1){
					x++;
				}
			 }
			 
			 rScroll.onmouseover = function(){
					intLeft = setInterval ( function(){ 
						if(-x*250+500<parseInt(thumbs.style.left)){
							if(j==0){
								i++; thumbs.style.left = '-'+i*speed+'px'; 
							}else{
								j--;
								thumbs.style.left = j*speed+'px';	
							}
						}
					}, timeout ); 
				};
			 rScroll.onmouseout = function(){
					clearInterval ( intLeft ); 
				};
			 lScroll.onmouseover = function(){
					intRight = setInterval ( function(){ 
						if(thumbs.style.left!="0px"){
							if(i==0){
								j++; thumbs.style.left = j*speed+'px';
							}else{
								i--;
								thumbs.style.left = '-'+i*speed+'px';	
							}
						}
					}, timeout ); 
				};
			 lScroll.onmouseout = function(){
					clearInterval ( intRight ); 
				};
			}
		 }
    //alert('nacteno');
		 window.onload = function () {Scroller();};
		 
		 
		 
//onmouseover="Scroller();"		 
