var i=1; //counter
function randvalue(maxVal,no_of_time)
{
 i++; //counter increment
 document.getElementById('random').innerHTML=''; //element made blank	
 //get a random no upto maxVal and round it to two decimal place
 var theNumber = (Math.random()*parseInt(maxVal) + 1).toFixed(0); 
 //put the number to that 
 document.getElementById('random').innerHTML=theNumber; //gett
 if(i<=no_of_time)
   setTimeout("randvalue("+maxVal+","+no_of_time+")",300);
 else
 	i=1;
}