var newCount;
var ntotal;
var left;
var gone;
function timer(position,count,total)
 {
 left = Math.round(count/total*100)
 gone = 100-left;
 ntotal = total

if (position == 'start') {
   document.getElementById("timer").innerHTML="<div style='width:" + gone + "px; height:8px; background-color: #ffffff; float: left;'> </div>";
   newCount = count - 1
	setTimeout("timer('go',newCount,ntotal)",1000)
  }

  if (position == 'go') {
   document.getElementById("timer").innerHTML="<div style='width:" + gone + "px; height:8px; background-color: #ffffff; float: left;'> </div>";

   newCount--;
   if (newCount >= 0) {
   setTimeout("timer('go',newCount,ntotal)",1000)
    }
  }
 }