		var swapTime = 30;
		var activeTab = 1;
		var activeTabOpa = 10;
		var countTab = 5;
		var idTabs = "swap"
		var swapTimer;var swapTimerDown;var activeTabDown;
		function swapTabs(id){
			if(activeTab == id){return false;}
			if(id > activeTab){
				swapDeath(id,0,'show');		
			}else{
				for(var i = 1;i <= countTab;i++){
					if(i > id && i < activeTab){document.getElementById(idTabs+''+i).style.display = 'none';}
				}				
				var show = document.getElementById(idTabs+id);
				show.style.display = "block";show.className = "tabOpa100";
				swapDeath(activeTab,activeTabOpa,'unshow');
			}
			activeTab = id;
		}
		function swapDeath(id,count,type){
			//if(type == 'show'){
				clearTimeout(swapTimer);
			//}
			var obj = document.getElementById(idTabs+id);
			if((type == 'show' && count == 0)){
				obj.style.display = "block";
				if(activeTabDown == id){
					clearTimeout(swapTimerDown);
					count = 10-activeTabOpa;
				}
			}	
			var clsName = "tabOpa"+(count*10);
			obj.className = clsName;			
			if(type == 'show'){
				if(count < 10){
					activeTabOpa = count;
					swapTimer = setTimeout("swapDeath('"+id+"',"+(count+0.5)+",'"+type+"')", swapTime);
				}else{return true;}
			}else{
				if(count > 0){
					activeTabOpa = 10 - count;
					activeTabDown = id;
					swapTimerDown = setTimeout("swapDeath('"+id+"',"+(count-0.5)+",'"+type+"')", swapTime);//mizeni nerusim je treba pro plynuly prechod zpet
				}else{return true;}		
			}
			
		}
		function activeSetHome(id_num){
			for(var i = 2;i <= countTab;i++){
				if(i == id_num){
					document.getElementById('tabLink'+i).className = 'active';
					document.getElementById('tabimg'+i).className = 'none';
				}else{
					document.getElementById('tabLink'+i).className = '';
					document.getElementById('tabimg'+i).className = 'active';
				}
			}
			if(id_num == 1){
				for(var i = 2;i <= countTab;i++){
					document.getElementById('tabimg'+i).className = 'none';
				}
			}
			swapTabs(id_num);
		}