function countdown_clock(year, month, day, hour, minute, format)
         {
         //I chose a div as the container for the timer, but
         //it can be an input tag inside a form, or anything
         //who's displayed content can be changed through
         //client-side scripting.
         html_code = '<div id="countdown"></div>';
         
         document.write(html_code);
         
         countdown(year, month, day, hour+1, minute, format);                
         }
         
function countdown(year, month, day, hour, minute, format)
         {
         Today = new Date();
         Todays_Year = Today.getFullYear() - 2000;
         Todays_Month = Today.getMonth() + 1;                  
         
         //Convert both today's date and the target date into miliseconds.                           
         Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(), 
                                 Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime();                                 
         Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime();                  
         
         //Find their difference, and convert that into seconds.                  
         Time_Left = Math.round((Target_Date - Todays_Date) / 1000);
         
         if(Time_Left < 0)
            Time_Left = 0;
         
         switch(format)
               {
               case 0:
                    //The simplest way to display the time left.
                    document.getElementById("hdr-gadget").innerHTML = Time_Left + ' seconds';
                    break;
               case 1:
                    //More datailed.
                    days = Math.floor(Time_Left / (60 * 60 * 24));
                    if (Todays_Month == 2) days = days - 2;
                    Time_Left %= (60 * 60 * 24);
                    hours = Math.floor(Time_Left / (60 * 60));
                    Time_Left %= (60 * 60);
                    minutes = Math.floor(Time_Left / 60);
                    Time_Left %= 60;
                    seconds = Time_Left;
                    
                    dps = ' dagen'; hps = ' uur'; mps = ' minuten'; sps = ' seconden';
                    //ps is short for plural suffix.
                    if(days == 1) dps =' dag';
                    if(hours == 1) hps =' uur';
                    if(minutes == 1) mps =' minuut';
                    if(seconds == 1) sps =' seconde';
                    
                    document.getElementById("teller").innerHTML = '<a>' + days +  dps + ' ' + '</a>';
                    document.getElementById("teller").innerHTML += '<a>' + hours + hps + ' ' + '</a>';
                    document.getElementById("teller").innerHTML += '<a>' + minutes +  mps + ' en ' + '</a>';
                    document.getElementById("teller").innerHTML += '<a>' + seconds +  sps + '</a>';
                    break;
               default: 
                    document.getElementById("teller").innerHTML = Time_Left + ' seconds';
               }
               
         //Recursive call, keeps the clock ticking.
         setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000);
         }
         
function teller(tekst) {
	
	var start = 0;
	var id = 0;
	
	myString = new String (tekst);
	
	var teller_text=new Array();	
	var stringArray = myString.split(";");
	document.getElementById("hdr-gadget").innerHTML += '<center><div id="teller_text"></div><div id="teller"></div></center>';

	for (i=0; i<stringArray.length; i++)
		teller_text[i] = "<a><strong>" + stringArray[i] + "</strong></a>";
	
	var end = teller_text.length - 1;
	
   toon();
   function toon(){
   	$('#teller_text').html(getNext());

   	$('#teller_text').fadeIn(2000,function(){
   	 $('#teller_text').animate({opacity: 1.0}, 2000)
   	   verstop();
   	 });
   }

   function verstop() {
   	 $('#teller_text').fadeOut(2000,function(){
   	   toon();

   	 });
   	}

   	function getNext(){
   	 if (id == end)
   	 {
   	 	id = start;
   	 }
   	 else
   	 {
   	 	id = id + 1;
   	 }

   	 return teller_text[id];
   	 }
 };
         