function myclock(){
var hours;
var mins;
var time;


var worldtime = new Array()
worldtime[0]="Iceland,-1"
worldtime[1]="Rio,-3"
worldtime[2]="Cuba,-5"
worldtime[3]="London,0"
worldtime[4]="Paris,1"
worldtime[5]="Odessa,2"
worldtime[6]="Moscow,3"
worldtime[7]="Samara,4"
worldtime[8]="Togliatty,4"
worldtime[9]="Vladivostok,10"
worldtime[10]="Kholmsk,10"
worldtime[11]="Sydney,11"


var shifthours
var shiftday
var minutes
var seconds
var localhours
var pause=2000
var thisplace
var thisline=""
var showmenu=1

ndata = new Date();
// Получение данных о дате и времени
monts = (ndata.getMonth() + 1)
days = (ndata.getDate() )
hoursUTC = ndata.getUTCHours();
hours = ndata.getHours();
mins = ndata.getMinutes();
secs = ndata.getSeconds();
// Дополнение нулем слева
if (monts < 10) {monts = "0" + monts }
if (days < 10) {days = "0" + days }
if (hoursUTC < 10) {hoursUTC = "0" + hoursUTC }
if (hours < 10) {hours = "0" + hours }
if (mins < 10) {mins = "0" + mins }
if (secs < 10) {secs = "0" + secs }
// Данные для вывода
datastr ='GMT: ['+hoursUTC + ":" + mins+ ":" + secs + '] &nbsp;&nbsp;&nbsp; <font color="#009966"> Local: ['+hours + ":" + mins+ ":" + secs +']</font>';

//datastrworld ='GMT: ['+hoursUTC + ":" + mins+ ":" + secs + '] &nbsp;&nbsp;&nbsp; <font color="#009966"> Local: ['+hours + ":" + mins+ ":" + secs +']</font>';
//datastrworld ='Moscow: ['+ (hoursUTC+3) + ":" + mins+ ":" + secs + ']<br />'+'London: ['+hoursUTC + ":" + mins+ ":" + secs + ']'+'Paris: ['+ (hoursUTC+1) ":" + mins+ ":" + secs + '] <br />'+'Sydney: ['+ (hoursUTC+11) ":" + mins+ ":" + secs + '] <br />';
// Вывод данных
// Если Netscape Navigator
/*if (document.layers){
document.layers.clockexam.document.write(datastr)
document.layers.clockexam.document.close()
}
 // Если Internet Explorer
else if (document.all)*/

 for (i=0; i<=worldtime.length-1;i++) {
  thisplace=worldtime[i].split(",")
  thistime= new Date()
  hours=thistime.getUTCHours()
  hours=eval(hours)
  day=thistime.getDate()
  day=eval(day)
  shifthours=eval(thisplace[1])
  shiftday=eval(thisplace[1])
  localhours=eval(shifthours+hours)
  if (localhours <0) {localhours=24+localhours;day=day-1}
  if (localhours >=24) {localhours=localhours-24;day=day+1}
 
  minutes=thistime.getUTCMinutes()
  seconds=thistime.getUTCSeconds()
  
 
  if (thisplace[0]=='Delhi') {
   minutes=eval(minutes+30)
   if (minutes>=60) {
    minutes=eval(minutes-60)
    localhours=eval(localhours+1)
   }
  }
  if (eval(minutes) < 10) {minutes="0"+minutes}
  if (eval(seconds) < 10) {seconds="0"+seconds}
  if (eval(day) < 10) {day="0"+day}
  if (eval(localhours) < 10) {localhours="0"+localhours}
  thisline+="&bull;&nbsp;"+localhours+":"+minutes+"&nbsp;("+day+")&nbsp;"+thisplace[0]+"<br />"
 }

thisline="<p class='p6'>"+thisline+"</p>"
document.getElementById('clockexam').innerHTML = datastr;
//document.getElementById('worldtime').innerHTML = thisline;

//clockexam.innerHTML= datastr;
// Вызов функции с интервалом 1000 ms

setTimeout("myclock()",1000)
}