// JavaScript Document
// International Clocks
function getDate(){
			var months=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
			dataObj=new Date();
			var s="";
			s+=dataObj.getDate()+" ";
			s+=months[dataObj.getMonth()]+" ";
			s+=dataObj.getFullYear();
			return s;
		}
//		function displayDbShare(){
//			if(window.dbshare){dbshare="DB (Eur) "+dbshare;}
//			else{dbshare="  ";}
//			return dbshare;
//		}
		Date.prototype.toSunday=new Function('return new Date(this.setDate(this.getDate()-this.getDay()))');
		d=new Date();
		var Yr=2000+d.getYear()%100;
		function getTime(city,date){
			var s="";
			hour=date.getUTCHours();
			minutes=date.getUTCMinutes();
	    	seconds=date.getUTCSeconds();
	    	if(minutes<10){minutes="0"+minutes;}
	    	if(hour<10){hour="0"+hour;}
	    	if(seconds<10){seconds="0"+seconds;}
	    	return "<span class=\"city\">"+city+"</span> <span class=\"time\">"+hour+":"+minutes+"</span>";
	    }
		function getEUTime(location,GMTOffset){
			// EU DST starts Last SUN in march and ends Last SUN in Oct
			var D=new Date();
			var DSTon=(new Date(Date.UTC(Yr,02,31,2-GMTOffset))).toSunday();
			var DSToff=(new Date(Date.UTC(Yr,09,31,1-GMTOffset))).toSunday();
			var DST=Number(D>DSTon && D<DSToff); // D in UTC. DTS either 1 if DST or 0 if no DST
			D.setHours(D.getHours()+DST+GMTOffset);
			return getTime(location,D);
		}
		function getUSTime(location,GMTOffset){
			// Most US states DST starts First SUN in april and ends Last SUN in Oct
			var D=new Date();
			var DSTon=(new Date(Date.UTC(Yr,03,07,2-GMTOffset))).toSunday();
			var DSToff=(new Date(Date.UTC(Yr,09,31,1-GMTOffset))).toSunday();
			var DST=Number(D>DSTon&&D<DSToff); // D in UTC. DTS either 1 if DST or 0 if no DST
			D.setHours(D.getHours()+DST+GMTOffset);
			return getTime(location, D);
		}
		function getAUSTime(location, GMTOffset){
           // AUSTRALIA DST starts Last SUN in Oct and ends Last SUN in Mar
           var year=0;
           var DSToff=null;
           var D=new Date();
           var month=d.getMonth();
           if(month >=0 && month <=3)  // month <=3 is only put for April for 2006. we need to set back to month<=2 for March as usual after 2nd April 06.
               year=Yr-1;
           else
               year=Yr;
           var DSTon=(new Date(Date.UTC(year,09,31,2-GMTOffset))).toSunday();
           if(Yr==2006) // This condition is only checked for 2006...can be removed after 2nd April 06.
               DSToff=(new Date(Date.UTC(year+1,03,04,1-GMTOffset)))//.toSunday();
           else
               DSToff=(new Date(Date.UTC(year+1,02,31,1-GMTOffset))).toSunday();
           var DST=Number(D>DSTon&&D<DSToff); // D in UTC. DTS either 1 if DST or 0 if no DST
           D.setHours(D.getHours()+DST+GMTOffset);
           return getTime(location, D);
        }
		function getNoDSTTime(location,GMTOffset){
			var D=new Date();
			D.setHours(D.getHours()+GMTOffset);
			return getTime(location, D);
		}
//		function dbshareUpdate(){
//			if(document.layers) return;
			// Try and copy db share string into correct place
//			if(frames["dbshareframe"]&&frames["dbshareframe"].getShareInfo)
//				var sDBShare=frames["dbshareframe"].getShareInfo();
//			else var sDBShare="";
//			var updateShareDiv=document.getElementById("shareprice");
//			updateShareDiv.innerHTML = sDBShare;
//		}
//		function loadDBShare(){
//			document.all.dbshareframe.src='dbshare.html';
//		}
		d=new Date();
		secs=d.getSeconds();
		if(document.layers){
			window.setTimeout("eval('document.location.href=document.location.href')",(60-secs)*1000+200);
		}else{
			window.setTimeout("displayTimes()",(60-secs)*1000+200);
		}
		function displayTimes(){
			document.getElementById("footer_date").innerHTML=getDate();
			document.getElementById("nytimediv").innerHTML=getUSTime("New York",-5);
			document.getElementById("uktimediv").innerHTML=getEUTime("London",0);
			document.getElementById("paristimediv").innerHTML=getEUTime("Paris", 0);
			document.getElementById("stockholmtimediv").innerHTML=getEUTime("Stockholm",1);
			document.getElementById("helsinkitimediv").innerHTML=getEUTime("Helsinki",2);
			document.getElementById("tokyotimediv").innerHTML=getNoDSTTime("Tokyo",9);
			window.setTimeout("displayTimes()",60*1000+200);
		}