// JavaScript Document
var sel = 1;
var st;
/*
retPassaLink = function(oRet){
	$GEBId('aleatorio').innerHTML = oRet;
}*/

passaLink = function(){
		//$GEBId('selecionado').className = '';
		//alert(sel);
		ant = sel-1;
		if(ant < 1){
			$GEBId("7").className = "off";
			$GEBId(sel).className = "on";
		}else{
			$GEBId(ant).className = "off";
			$GEBId(sel).className = "on";
		}
	
		sel++;
		 if(sel > 7){
			 sel = 1;
		}
		//alert(sel);
	 st = setTimeout("passaLink()",3000); 
 
 
}

setAnt = function(){
	
	clearTimeout(st);
	
	for(var i = 1; i < 8; i++){
		$GEBId(i).className = "off";
	}

		ant = sel-1;
		if(ant == 1){
			$GEBId("7").className = "on";
			sel =7;
		}else{
			$GEBId(ant-1).className = "on";
			sel = ant;
		}

	st = setTimeout("passaLink()",3000);
}

setPos = function(){
	clearTimeout(st);
	for(var i = 1; i < 8; i++){
		$GEBId(i).className = "off";
	}
		
		
		$GEBId(sel).className = "on";
	
		sel++;
		 if(sel > 7){
			 sel = 1;
		}
	
	st = setTimeout("passaLink()",3000);
}

