var timerID = null
  var timerRunning = false
  function MakeArray(size)   {
  this.length = size;
  for(var i = 1; i <= size; i++)  {
  this[i] = "";  }
  return this;  }
  function stopclock (){
  if(timerRunning)
  clearTimeout(timerID);
  timerRunning = false  }

  function showtime () {
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var hours = now.getHours();
  var minutes = now.getMinutes();
  var seconds = now.getSeconds();
  var day = now.getDay();
  Day = new MakeArray(7);
  Day[0]="الأحد";
  Day[1]="الإثنين";
  Day[2]="الثلاثاء";
  Day[3]="الأربعاء";
  Day[4]="الخميس";
  Day[5]="الجمعة";
  Day[6]="السبت";
  var timeValue = "";
  timeValue += (Day[day]) + "   ";
  timeValue +=date + "/"; 
  timeValue += ((month < 10) ? " 0" : "") + month + "/"+ year + "&nbsp;&nbsp;&nbsp;";
  timeValue += ((hours <= 12) ? hours : hours - 12);
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
  timeValue += (hours < 12) ? " ص" : " م";
var cli=document.getElementById('c');
 cli.innerHTML=timeValue;
//window.status = timeValue;
  timerID = setTimeout("showtime()",1000);
  timerRunning = true
  }
  function startclock () {
 stopclock();
  showtime()
  }
//-->
