function showDate() {
// Define days of the week.
var weekday = new Array(7);
weekday[1] = 'Pazar';
weekday[2] = 'Pazartesi';
weekday[3] = 'Salı';
weekday[4] = 'Çarşamba';
weekday[5] = 'Perşembe';
weekday[6] = 'Cuma';
weekday[7] = 'Cumartesi';
// Define months of the year.
var month = new Array(12);
month[1]  = 'Ocak';
month[2]  = 'Şubat';
month[3]  = 'Mart';
month[4]  = 'Nisan';
month[5]  = 'Mayıs';
month[6]  = 'Haziran';
month[7]  = 'Temmuz';
month[8]  = 'Ağustos';
month[9]  = 'Eylül';
month[10] = 'Ekim';
month[11] = 'Kasım';
month[12] = 'Aralık';
// Get the date right now.
var today = new Date();
yr_st = " 19";
yr = today.getYear();
if ( yr > 99 ) 
{
yr_st =" ";
if ( yr < 2000 ) yr += 1900; 
}
return today.getDate() + ' ' + month[today.getMonth()+1] + yr_st+ yr + ', '+weekday[today.getDay()+1];
}

function startclock()
{
var thetime=new Date();

var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";

if (nhours>=12)
    AorP="P.M.";
else
    AorP="A.M.";

//if (nhours>=13) nhours-=12;

if (nhours==0)
   nhours=12;

if (nsecn<10)
 nsecn="0"+nsecn;

if (nmins<10)
 nmins="0"+nmins;


nmonth+=1;

if (nyear<=99)
  nyear= "19"+nyear;

if ((nyear>99) && (nyear<2000))
 nyear+=1900;

document.getElementById('clock').innerHTML = showDate() + "&nbsp;&nbsp;&nbsp;" +nhours+":"+nmins+":"+nsecn;

setTimeout('startclock()',1000);

}