How to add count down timer?

Hi all,
I want to add simple countdown timer for 30 sec 0r 60 sec,the time will display on the page to the users with countdown, if user is not respond with in this time, the page will be automatically redirects to the specified page…

Give me the guidelines…
Thanking you in advance…

What about …


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css" />
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.2.0/build/cssbase/base-min.css" />
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.2.0/build/cssfonts/fonts-min.css" />
    <title>
      Counter Demo
    </title>
  </head>
  <body>
    <span id="counter">
      60
    </span>
    <script type="text/javascript" charset="utf-8">
    //<![CDATA[
      var counter = {};
      counter.tick = function(){
        var count = parseInt($('#counter').html());
        if(0 < count){
          $('#counter').html(--count);
          return;
        }
        window.location = 'http://www.google.co.uk/';
      };
      $(document).ready(function(){
        setInterval(counter.tick, 1000);
      });
    //]]>
    </script>
  </body>
</html>

It has a dependency on jQuery at the moment, but this should be a trivial task to refactor out. :wink:

I’m sure one of the JavaScript gurus can help.

thanking you for replying me…
It is working fine…
What for to go javascript guider…