isitlocal=false;//true;
	ampm='';

	
	function WorldClockNy(){

		now=new Date();
		//2-10-09: Added following 4 lines to get current month, day of month, day of week, year  - jvandervliet 
		tzmon=now.getMonth() + 1;
		tzdom=now.getDate();
		tzdow=now.getDay();
		tzyear=now.getFullYear();
		ofst=now.getTimezoneOffset()/60;
		secs=now.getSeconds();
		sec=-1.57+Math.PI*secs/30;
		mins=now.getMinutes();
		min=-1.57+Math.PI*mins/30;
		hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zoneNY);
		
		//2-11-09: Set US DST Dates by year - jvandervliet 
		switch (tzyear)
		{
			case 2009:
			mday = 8;
			nday = 1;
			break;
			
			case 2010:
			mday = 14;
			nday = 7;
			break;
			
			case 2011:
			mday = 13;
			nday = 6;
			break;
			
			case 2012:
			mday = 11;
			nday = 4;
			break;
			
			case 2013:
			mday = 10;
			nday = 3;
			break;
			
			case 2014:
			mday = 9;
			nday = 2;
			break;
			
			case 2015:
			mday = 8;
			nday = 1;
			break;
			
			case 2016:
			mday = 13;
			nday = 6;
			break;
		}			
		
		//2-10-09: Added logic to determine whether Timezone switch is fired 
		hr = hr + 0;

		hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
		if (hr < 0) hr+=24;
		if (hr > 23) hr-=24;
		ampm = (hr > 11)?"PM":"AM";
		statusampm = ampm.toLowerCase();
		
		hr2 = hr;
		if (hr2 == 0) hr2=12;
		(hr2 < 13)?hr2:hr2 %= 12;
		if (hr2<10) hr2="0"+hr2
		
		var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
		
		if (document.all)
			worldclockNy.innerHTML=finaltime
		else if (document.getElementById)
			document.getElementById("worldclockNy").innerHTML=finaltime
		else if (document.layers){
			document.worldclocknsNY.document.worldclockns2NY.document.write(finaltime)
			document.worldclocknsNY.document.worldclockns2NY.document.close()
		}
	
		setTimeout('WorldClockNy()',1000);
	}

	function WorldClockLD(){

		now=new Date();
		//2-10-09: Added following 3 lines to get current month, day of month, day of week  - jvandervliet 
		tzmon=now.getMonth() + 1;
		tzdom=now.getDate();
		tzdow=now.getDay();
		ofst=now.getTimezoneOffset()/60;
		secs=now.getSeconds();
		sec=-1.57+Math.PI*secs/30;
		mins=now.getMinutes();
		min=-1.57+Math.PI*mins/30;
		hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zoneLD);
		//----time setting begins
		//2-10-09: Added logic to determine whether Timezone switch is fired 
		hr = hr + 0;
		if (tzmon >= 3){
			if (tzdom >= 29) {  //jvandervliet - replace with logic for London DST rules
				hr = hr + 1;
			}
		}
		if (tzmon >= 10){
			if (tzdom >= 25) {  //jvandervliet - replace with logic for London DST rules
				hr = hr + 0;
			}
		}
		
		//-----time setting ends
		hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
		if (hr < 0) hr+=24;
		if (hr > 23) hr-=24;
		ampm = (hr > 11)?"PM":"AM";
		statusampm = ampm.toLowerCase();
		
		hr2 = hr;
		if (hr2 == 0) hr2=12;
		(hr2 < 13)?hr2:hr2 %= 12;
		if (hr2<10) hr2="0"+hr2
		
		var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
		
		if (document.all)
			worldclockLD.innerHTML=finaltime
		else if (document.getElementById)
			document.getElementById("worldclockLD").innerHTML=finaltime
		else if (document.layers){
			document.worldclocknsLD.document.worldclockns2LD.document.write(finaltime)
			document.worldclocknsLD.document.worldclockns2LD.document.close()
		}
	
		setTimeout('WorldClockLD()',1000);
	}

	function WorldClockSG(){

		now=new Date();
		ofst=now.getTimezoneOffset()/60;
		secs=now.getSeconds();
		sec=-1.57+Math.PI*secs/30;
		mins=now.getMinutes();
		min=-1.57+Math.PI*mins/30;
		hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zoneSG);
		
		//Singapore does not follow Daylight Savings - do not uncomment below - jvandervliet
		//hr = hr + 1; //Singapore
		
		hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
		if (hr < 0) hr+=24;
		if (hr > 23) hr-=24;
		ampm = (hr > 11)?"PM":"AM";
		statusampm = ampm.toLowerCase();
		
		hr2 = hr;
		if (hr2 == 0) hr2=12;
		(hr2 < 13)?hr2:hr2 %= 12;
		if (hr2<10) hr2="0"+hr2
		
		var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
		
		if (document.all)
			worldclockSG.innerHTML=finaltime
		else if (document.getElementById)
			document.getElementById("worldclockSG").innerHTML=finaltime
		else if (document.layers){
			document.worldclocknsSG.document.worldclockns2SG.document.write(finaltime)
			document.worldclocknsSG.document.worldclockns2SG.document.close()
		}
	
		setTimeout('WorldClockSG()',1000);
	}

	function WorldClock(){
		
		WorldClockNy();
		WorldClockLD();
		WorldClockSG();
	}

	window.onload = WorldClock;

///////////////////////////////////////////////////////////////
