/*
   This script came from the 24 hour JavaScripts Site
located at http://www.javascripts.com.  It is brought to 
  you by Eric Jarvies, Lewis Sellers, Giuseppe Lombardo, 
          Kurt Anderson, and David Medinets. 
*/
var timerID = null;
var timerRunning = false;
// Called by both onLoad in BODY tag, and Resume button.
function startclock () 
   {
   // Make sure the clock is stopped
   stopclock();
   time();
   }
// Kills clock.
function stopclock ()
   {
   if(timerRunning)
      clearTimeout(timerID);
   timerRunning = false;
   }
function time ()
   {
   var now = new Date();
   var yr = now.getYear();
   var mName = now.getMonth() + 1;
   var dName = now.getDay() + 1;
   var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
   var ampm = (now.getHours() >= 12) ? "Akşam" : "Gündüz"
   var hours = now.getHours();
         hours = ((hours > 12) ? hours - 12 : hours);
   var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
   var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
   if(dName==1) Day = "Pazar";
   if(dName==2) Day = "Pazartesi";
   if(dName==3) Day = "Salı";
   if(dName==4) Day = "Çarşamba";
   if(dName==5) Day = "Perşembe";
   if(dName==6) Day = "Cuma";
   if(dName==7) Day = "Cumartesi";
   if(mName==1) Month="Ocak";
   if(mName==2) Month="Şubat";
   if(mName==3) Month="Mart";
   if(mName==4) Month="Nisan";
   if(mName==5) Month="Mayıs";
   if(mName==6) Month="Haziran";
   if(mName==7) Month="Temmuz";
   if(mName==8) Month="Ağustos";
   if(mName==9) Month="Eylül";
   if(mName==10) Month="Ekim";
   if(mName==11) Month="Kasım";
   if(mName==12) Month="Aralık";
   // String to display current date.
   var DayDateTime=(" "
       + dayNr
       + "."
       + Month
       + "."
       + ""
       + yr
       + "  "
       + Day
       + "  "
       + hours
       + minutes
       + seconds
       + " "
       + ampm
        );
   // Displays Day-Date-Time on the staus bar.
   window.status=DayDateTime;
   timerID = setTimeout("time()",1000);
   timerRunning = true;
   }
// Stops clock and clears status bar.
function clearStatus()
   {
   if(timerRunning)
      clearTimeout(timerID);
   timerRunning = false;
   window.status=" ";   
   }

setTimeout("startclock()",5000);


