<!-- Beginning of JavaScript -



// CREDITS:

// World Time on Doubleclick by Urs Dudli and Peter Gehrig 

// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.

// Permission given to use the script provided that this notice remains as is.

// Additional scripts can be found at http://www.241fun.ch.

// info@24fun.ch

// 2/22/2000



// IMPORTANT: 

// If you add this script to a script-library or script-archive 

// you have to add a link to http://www.24fun.ch on the webpage 

// where this script will be running.



// CONFIGURATION:

// Copy the script-block into the head section of your HTML-file.

// Copy the style-sheet into the head section of your HTML-file.

// Configure the part "timestyle" of the style-sheet (font, font-size, color etc.)

// Copy the div-container (id="timediv") into the end of the body-section.

// Configure the variables below:



// Add as many locations as you like. The value right after the capital 

// represents the capital's time difference to GMT-time measured in hours

var worldtime = new Array()

worldtime[0]="California,-7"

worldtime[1]="New York,-4"

worldtime[2]="London,0"

worldtime[3]="Munich,1"

worldtime[4]="Nairobi,3"

worldtime[5]="Dubai,4"

worldtime[6]="India,5"

worldtime[7]="Brisbane,10"



var hours

var shifthours

var minutes

var seconds

var localhours

var pause=2000

var thisplace

var thisline=""

var showmenu=1



function showtime() {



	for (i=0; i<=worldtime.length-1;i++) {

		thisplace=worldtime[i].split(",")

		thistime= new Date()

		hours=thistime.getUTCHours()

		hours=eval(hours)

		shifthours=eval(thisplace[1])

		localhours=eval(shifthours+hours)

		if (localhours <0) {localhours=24+localhours}

		if (localhours >=24) {localhours=localhours-24}

	

		minutes=thistime.getUTCMinutes()

		seconds=thistime.getUTCSeconds()

	

		if (thisplace[0]=='India') {

			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(localhours) < 10) {localhours="0"+localhours}

		thisline=localhours+":"+minutes+"<br>"+thisplace[0]+"<br>"	

		

		document.getElementById("timediv"+i).innerHTML = thisline;		

		

	}

	

	var timer=setTimeout("showtime()",1000);	

	

}
