function doRedirectOnTimeout(newurl, timeout) {
  var seconds = timeout * 1000;
  self.setTimeout("location.href='" + newurl + "'", seconds);
}

