function WorldClock(){
		
		//This is where you change cities
 		
 		//Gunda should begin editing here
 		UpdateDisplayedTime(city1,'Vancouver',-7);
 		UpdateDisplayedTime(city2,'Calgary',-6);
 		UpdateDisplayedTime(city3,'Winnipeg',-5);
 		UpdateDisplayedTime(city4,'Toronto',-4);
 		UpdateDisplayedTime(city5,'Halifax',-3);
 		UpdateDisplayedTime(city6,'Regensburg',2);
 		//Gunda should stop editing here
 		
 		setTimeout('WorldClock()',10000);
 		
	}

function UpdateDisplayedTime(spanname, displayname, zoneoffset){
		
		now=new Date();
		ofst=now.getTimezoneOffset()/60;
		secs=now.getSeconds();
		daystr=now.getDay();
		sec=-1.57+Math.PI*secs/30;
		mins=now.getMinutes();
		min=-1.57+Math.PI*mins/30;
		
	    hr=(now.getHours() + parseInt(ofst)) + parseInt(zoneoffset);
		    
		hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
		if (hr < 0) {
		  hr+=24;
		  daystr-=1;
		 };
		if (hr > 23) {
		  hr-=24;
		  daystr+=1;
		 };
		ampm = (hr > 11)?"PM":"AM";
		statusampm = ampm.toLowerCase();
		
		hr2 = hr;
		if (hr2 == 0) hr2=12;
		(hr2 < 13)?hr2:hr2 %= 12;
	    //if (hr<10) hr="0"+hr2
		if (hr2<10) hr2="0"+hr2;
		
		// use this if you want am/pm time
		//var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs) +' '+statusampm;
		
		//use this if you want 24 hour clock
		var finaltime=hr+':'+((mins < 10)?"0"+mins:mins);
		
		//use this if you want a 24 hour clock with seconds
		//finaltime=finaltime+':'+((secs < 10)?"0"+secs:secs)
		
		
		
		var FinalDisplay='<a href="http://www.timeanddate.com/worldclock/results.html?query='+displayname+'" target=_blank  style="text-decoration: none"><font color=#FFFFFF>'+displayname+' </font>';
		FinalDisplay=FinalDisplay+'<font color=#FFFFFF>'+finaltime+'</font></a>';
		
		if (document.all)
			spanname.innerHTML=FinalDisplay;
		else if (document.getElementById)
			document.getElementById(spanname).innerHTML=FinalDisplay;
	}
		
//To expand the number of cities displayed, change this table and match your
//changes in the WorldClock function
document.write('		<font color="#FFFFFF"><span id="city1" style="font:10px Arial;">&nbsp</span> &middot; </font>');
document.write('		<font color="#FFFFFF"><span id="city2" style="font:10px Arial;">&nbsp</span> &middot; </font>');
document.write('		<font color="#FFFFFF"><span id="city3" style="font:10px Arial;">&nbsp</span> &middot; </font>');
document.write('		<font color="#FFFFFF"><span id="city4" style="font:10px Arial;">&nbsp</span> &middot; </font>');
document.write('		<font color="#FFFFFF"><span id="city5" style="font:10px Arial;">&nbsp</span> &middot; </font>');
document.write('		<font color="#FFFFFF"><span id="city6" style="font:10px Arial;">&nbsp</span></font>');

//Call the WorldClock funtion
WorldClock();
window.onload=WorldClock;
	

