//-- JavaScript code written by Alan Simpson - www.coolnerds.com
//-- modified by Urs Widmer - www.sinun-on.ch
function subtractOne() {
   //Subtract 1 from current value in form field.
   var newValue = parseInt(document.myForm.numberShown.value)-1
   //Replace the contents of form field with smaller number.
   document.myForm.numberShown.value = newValue

   //-- If countdown hasn't reached zero, pause then do it again.
   if (newValue > 0) {
        //-- From here on out, this function calls itself once every second.
        myTimer=setTimeout("subtractOne()",1000)
   //-- When countdown does reach zero, stop the timer and call reachedZero().
   }else{
     clearTimeout("myTimer")
     reachedZero()
   }
}

//-- This function is called by onload="getStarted()" in this page's 
//-- body tag, and gets the ball rolling.
function getStarted() {
   //-- Loads the number 10 into the form field.   
   document.myForm.numberShown.value="30"
   //-- Pauses one-second, then calles the subtractOne function.
   myTimer=setTimeout("subtractOne()",1000)
}

function reachedZero() {
   //-- This is the function that is executed when the countdown ends.
   location='http://www.combyart.ch/'
}