// vypis fakt (header)
function initTips(count,interval){
currentTip = Math.round(Math.random()*(count-1)+1);
$('tipTrigger'  + currentTip).addClass('selected');
prev = 0;
tipCount = count;
slideTips();
ginterval = interval
IntID = window.setInterval("slideTips()", ginterval);
}

function stopTips(){
clearInterval(IntID);
}

disableStart = false;

function startTips(){
 IntID = window.setInterval("slideTips()", ginterval);
}
//IntID = window.setInterval("slideTips()", ginterval);




var zIndex = 9;

var maxx = 0;
function showTip(tNo){
	for(i = 1; i <= tipCount; i++){
		try{
		  if($('tip' + i).style.visibility == 'visible')
      $('tip' + i).fade('out');		
			$('tipTrigger'  + i).removeClass('selected'); 
		} catch(err) { 
			
		}
	}  
	//$('tip' + currentTip).fade(out);
  currentTip = tNo;
	     
	try{  
		tip = $('tip' + tNo);
		tip.fade('hide');  
		tip.setStyle('z-index', zIndex++);         
		tip.fade('in');
		$('chciVice').href= linkArray[tNo - 1];
    
		 
		$('tipTrigger'  + tNo).addClass('selected');
	} catch(err) { 
	}  
	return false; 
	  
}

function slideTips(){
	if(currentTip == tipCount){
 		currentTip = 0;  
	} 
	showTip(currentTip + 1); 
}


