 // JavaScript Document

//<!--

function tick() {

  var hours, minutes, seconds, ap;

  var intHours, intMinutes, intSeconds;

  var today;

  var day ,month,year;

  var weekday;  

  today = new Date();



  intHours = today.getHours();

  intMinutes = today.getMinutes();

  intSeconds = today.getSeconds();

  day = today.getDay();

  month=today.getMonth();

  year=today.getYear();

  weekday=today.getDate();



  if (intHours == 0) {

     hours = " : 12 ";

     ap = "بعد منتصف الليل";

  } else if (intHours < 12) { 

     hours = " : "+intHours;

     ap = "صباحا";

  } else if (intHours == 12) {

     hours = " : 12  ";

     ap = "ظهرا";

  } else {

     intHours = intHours - 12

     hours =" : "+ intHours ;

     ap = "مساءا";

  }



  if (intMinutes < 10) {

     minutes = " : "+"0"+intMinutes;

  } else {

     minutes = " : "+intMinutes;

  }



  if (intSeconds < 10) {

     seconds = "0"+intSeconds+" ";

  } else {

     seconds = intSeconds+" ";

  } 

if(day == 0)

day = " الأحد"      

else if(day == 1)

day = " الأثنين"

else if(day == 2)

day = " الثلاثاء"   

else if(day == 3)

day = " الأربعاء"   

else if(day == 4)

day = " الخميس"

else if(day == 5)

day = " الجمعة"

else if(day == 6)

day = " السبت"

if(month == 0) {

month = "يناير"}

else if(month ==1)

month = "فبراير"

else if(month ==2)

month = "مارس"

else if(month ==3)

month = "إبريل"

else if(month ==4)

month = "مايو"

else if(month ==5)

month = "يونيو"

else if(month ==6)

month = "يوليو "

else if(month ==7)

month = "أغسطس"

else if(month ==8)

month = "سبتمبر"

else if(month ==9)

month = "أكتوبر"

else if(month ==10)

month = "نوفمبر"

else if(month ==11)

month = "ديسمبر"



  timeString = day+" , "+weekday+" - "+month+" - "+year+"م"+"   &nbsp;&nbsp;&nbsp;  التوقيت المحلي : &nbsp; "+seconds+minutes+hours+"&nbsp;"+ap+"&nbsp;&nbsp;";



  Clock.innerHTML = timeString;



  window.setTimeout("tick();", 100);

}



window.onload = tick;

//-->



          