var index = 1; var menu_time = 13000; var anterior = num; var timer = setTimeout('trocaMsg()',menu_time); 
function trocaMsg() { index = index%num +1; channel(index); tempo(); }          
function tempo() { clearTimeout(timer);	timer = setTimeout("trocaMsg()",menu_time);}  
function channel(id) { index = id; document.getElementById("nomeproduto" + anterior).className= "transp"; document.getElementById("nomeproduto" + id).className = "opac"; document.getElementById('mostradescricao').innerHTML=document.getElementById('produto' + id).innerHTML;	anterior = id;}
function exibe(id, out) {if (out == 1)	{ clearTimeout(timer);	channel(id);} else { tempo();}}