// JavaScript Document
function mudaImagem(elem, nova){
var fig;
fig=document.getElementById(elem);
fig.setAttribute('src',nova); 
}

function topoRandomico(){
var a;
var b;
a=Math.random(3);
//alert(a);
a=(a*3)+1;
a=parseInt(a);
//alert(a);
switch(a){
case 1: 
b=document.getElementById('mudaTopo');
b.setAttribute('src','imagens/topo_idoso.jpg');
break;
case 2: 
b=document.getElementById('mudaTopo');
b.setAttribute('src','imagens/topo_girassol.jpg');
break;
case 3: 
b=document.getElementById('mudaTopo');
b.setAttribute('src','imagens/topo_leao.jpg');
break;
}
}