//© 2000  Roy Digital Design//
function clickMess(e){
if(document.all&&event.button==2){
alert('Gheos World Time © Roy Digital Design\n\nhttp://Gheos.com');
return false;
}
else if(navigator.appName=='Netscape'){if(document.getElementById&&e.which==3)alert('Gheos World Time © Roy Digital Design\n\nhttp://Gheos.com');
else if(document.layers&&e.which==3)return false;}
}
if(document.layers)document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickMess;

var GheosTop,GheosLeft,theoffset,ending,newleft,newtop;
if(GheosTop==null||GheosTop=='NUMBER')GheosTop=10;
if(GheosLeft==null)GheosLeft=screen.width/2-300;
var Gheosstyle='';
if(document.all)Gheosstyle=' filter:Alpha(opacity=70,finishopacity=60,style=1)';
var now=new Date();
var nowoff=now.getTimezoneOffset()/60;
var utc=(now.getHours()+nowoff);
var localutc=IfZero(now.getHours())-IfZero(utc);
if(localutc>0)localutc='+'+localutc;
var places=new Array('Amsterdam#+1§285132¤y','Anchorage#-9§041102¤y','Bangkok#+7§438207¤n','Beijing#+8§463161¤n','Brasilia#-3§203255¤y','Buenos Aires#-3§186288¤y','Cairo#+2§326181¤y','Calgary#-7§098136¤y','Cape Town#+2§308286¤n','Dakar#0§252204¤n','Harare#+2§326257¤n','Helsinki#+2§317109¤y','Honolulu#-10§028202¤y','Jakarta#+7§447238¤n','Longyearbyen#+1§300027¤y','Los Angeles#-8§088170¤y','Madrid#1§272162¤y','Mexico#-6§122198¤n','Nairobi#+3§337231¤n','N Djamena#+1§303210¤n','New Delhi#+5:30§401183¤n','New York#-5§166154¤y','Nuuk#-3§195084¤y','Perth#+8§461282¤y','Port Moresby#+10§511243¤n','Quito#-5§154229¤n','Reykjavik#0§239096¤n','Stanley#-4§183324¤y','Sydney#+10§516285¤y','Tashkent#+5§387157¤y','Yakutsk#+9§486106¤y');

function linkIt(){
parent.location='http://Gheos.com';
}

function GetTime(){ 
now=new Date();
var theMonth=now.getMonth()+1;
var theDate=now.getDate();
var theDay=now.getDay();
document.bar.local.value=(check24(now.getHours())+':'+IfZero(now.getMinutes())+':'+IfZero(now.getSeconds()));
document.bar.utc.value=(check24(utc)+':'+IfZero(now.getMinutes())+':'+IfZero(now.getSeconds()));
if(!(document.layers)){
for(x=0;x<places.length;x++){
if(places[x].indexOf(':')!=-1){
theoffset=parseFloat(places[x].substring(places[x].indexOf('#')+1,places[x].indexOf(':')));
ending=':'+IfZero(now.getMinutes()+parseFloat(places[x].substring(places[x].indexOf(':')+1,places[x].indexOf('§'))))+':'+IfZero(now.getSeconds());
}else {theoffset=parseFloat(places[x].substring(places[x].indexOf('#')+1,places[x].indexOf('§')));
ending=':'+IfZero(now.getMinutes())+':'+IfZero(now.getSeconds());
}
var thetime=check24(((utc+theoffset)>24)?((utc+theoffset)-24):(utc+theoffset));
if(places[x].substring(places[x].indexOf('¤')+1)=='y'&&places[x].substring(places[x].indexOf('§')+4,places[x].indexOf('¤'))<229){
	if(theMonth==3&&theDate-theDay>24)thetime++
	else if(theMonth==10&&theDate-theDay<25)thetime++
	else if(theMonth>3&&theMonth<10)thetime++;
}
if(places[x].substring(places[x].indexOf('¤')+1)=='y'&&places[x].substring(places[x].indexOf('§')+4,places[x].indexOf('¤'))>228){
	if(theMonth==3&&theDate-theDay<25)thetime++
	else if(theMonth==10&&theDate-theDay>24)thetime++
	else if(theMonth>10||theMonth<3)thetime++;
}
document.clock[x].value=(check24(thetime)+ending);
	}
}
setTimeout('GetTime()',1000);
}
function IfZero(num){
if(num>59){num-=60;theoffset++;}
return((num<=9&&num>=0)?('0'+num):num);
}
function check24(hour){
if(hour<0)hour+=24;
return(hour>=24)?hour-24:hour;
}
var d=document;
d.write('<STYLE TYPE="text/css">');
d.write('INPUT{background-color:#FFFFFF; border:0; cursor:hand; height:11px; font-family:Arial; font-size:9px; color:#000000;'+Gheosstyle+'}');
d.write('#map{position:absolute; left:'+GheosLeft+'px; top:'+(8+GheosTop)+'px; visibility:visible};');
for(x=0;x<places.length;x++){
newleft=parseFloat(GheosLeft)+parseFloat(places[x].substring(places[x].indexOf('§')+1,places[x].indexOf('§')+4));
newtop=parseFloat(GheosTop)+parseFloat(places[x].substring(places[x].indexOf('§')+4,places[x].indexOf('¤')));
d.write('#t'+x+'{position:absolute; left:'+newleft+'px; top:'+newtop+'px; visibility:visible};');
}
d.write('#equator{position:absolute; left:'+GheosLeft+'px; top:'+(229+GheosTop)+'px; width:576px visibility:visible};');
d.write('#bottom{position:absolute; left:'+GheosLeft+'px; top:'+(348+GheosTop)+'px; visibility:visible};');
d.write('#local{position:absolute; left:'+GheosLeft+'px; top:'+(348+GheosTop)+'px; visibility:visible};');
d.write('</STYLE>');

d.write('<FORM NAME="clock" onSubmit="javascript:linkIt()">');
d.write('<DIV ID="map"><IMG SRC="http://Gheos.com/js/worldtime/timezones2.gif"></DIV>');
d.write('<DIV ID="equator"><HR SIZE="1" WIDTH="576"></DIV>');
for(x=0;x<places.length;x++){
d.write('<DIV ID="t'+x+'"><IMG SRC="http://Gheos.com/js/worldtime/place.gif" WIDTH="3" HEIGHT="3"><A HREF="javascript:linkIt()" onMouseOver="window.status=\'The time in '+places[x].substring(0,places[x].indexOf('#'))+' is UTC '+places[x].substring(places[x].indexOf('#')+1,places[x].indexOf('§'))+' hours.\';return true" onMouseOut="window.status=\'\';return true"><FONT SIZE="1" FACE="Arial" COLOR="#000000" STYLE="text-decoration:none"> '+places[x].substring(0,places[x].indexOf('#'))+'<BR><INPUT TYPE="text" SIZE="4" NAME="'+x+'" onBlur="javascript:linkIt()"></B></FONT></A></DIV>');
}
d.write('</FORM>');

d.write('<DIV ID="bottom"><FORM NAME="bar"><TABLE WIDTH="576" HEIGHT="20" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD ALIGN="left" BGCOLOR="#FFFFFF"><IMG SRC="http://Gheos.com/counters/counter.php?gheosmaps&ref='+unescape(document.referrer)+'&sw='+screen.width+'&col='+screen.colorDepth+'" BORDER="0" HEIGHT="1" WIDTH="1"> <A HREF="http://Gheos.com" onMouseOver="window.status=\'Visit Gheos.com for FREE geographical add-ons\';return true" onMouseOut="window.status=\'\';return true"><FONT COLOR="#000000" SIZE="2" FACE="Arial" STYLE="text-decoration:none; A:link {color:#0000A0}"><B>World Time Zones&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;©  Roy Digital Design - <A HREF="http://Gheos.com" onMouseOver="window.status=\'Visit Gheos.com for FREE geographical add-ons\';return true" onMouseOut="window.status=\'\';return true"><FONT COLOR="#0000FF" STYLE="A:link {color:#0000A0}">Gheos.com</FONT></A></B></FONT></TD><TD BGCOLOR="#FFFFFF" ALIGN="right" WIDTH="30%"><FONT COLOR="#000000" SIZE="1" FACE="Arial"><B>Local Time: <A HREF="javascript:linkIt()" onMouseOver="window.status=\'The local time on your pc is UTC '+localutc+' hours.\';return true" onMouseOut="window.status=\'\';return true"><INPUT TYPE="text" SIZE="4" NAME="local" onBlur="javascript:linkIt()"></A>&nbsp;&nbsp;<BR>Universal Time (UTC): <A HREF="javascript:linkIt()" onMouseOver="window.status=\'Universal Time (UTC) = Greenwich Mean Time (GMT).\';return true" onMouseOut="window.status=\'\';return true"><INPUT TYPE="text" SIZE="4" NAME="utc" onBlur="javascript:linkIt()"></B></FONT></A>&nbsp;&nbsp;</TD></TR></TABLE></FORM></DIV>');

setTimeout('GetTime()',1000);