Full version: jsB@nk » Time » Clock » First illustrated DHTML worldtimezone clock
URL: https://www.javascriptbank.com/first-illustrated-dhtml-worldtimezone-clock-index.html
The first illustrated DHTML worldtimezone clock. Shows the localtime of world-capitals in realtime. Combines the latest mouseover and CSS-positioning techniques.
Full version: jsB@nk » Time » Clock » First illustrated DHTML worldtimezone clock
URL: https://www.javascriptbank.com/first-illustrated-dhtml-worldtimezone-clock-index.html
<SCRIPT language=javaScript><!-- Beginning of JavaScript -var x,y,a,b,timer,thisbox,isbox,urlimgvar posleftvorhervar boxvar hoursvar shifthoursvar minutesvar secondsvar localhoursvar thisplacevar i_strngth=1var timerfunction fadeinlogo() {if(document.all) {if (i_strngth <=100) {logo.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src=logo279.gif border=0>";i_strngth=i_strngth+2var timer=setTimeout("fadeinlogo()",50)}else {clearTimeout(timer)}}}function showtime(place,shifttime) {thisplace=placeif (thisplace=='San Francisco') {thisplace="San Francisco<br>Los Angeles<br>San Diego"}if (thisplace=='New York') {thisplace="New York<br>Santiago<br>Havana"}if (thisplace=='Rio de Janheiro') {thisplace="Rio de Janheiro<br>Buenos Aires"}if (thisplace=='Greenland') {thisplace="Greenland"}if (thisplace=='London') {thisplace="London<br>Lisbon"}if (thisplace=='Paris') {thisplace="Paris<br>Rom<br>Berlin"}if (thisplace=='Moscow') {thisplace="Moscow"}if (thisplace=='Kairo') {thisplace="Kairo"}if (thisplace=='Delhi') {thisplace="Delhi"}if (thisplace=='Beijing') {thisplace="Beijing<br>Shanghai<br>Perth"}if (thisplace=='Tokyo') {thisplace="Tokyo"}if (thisplace=='Sydney') {thisplace="Sydney<br>Melbourne"}thistime= new Date()hours=thistime.getUTCHours()hours=eval(hours)shifthours=eval(shifttime)localhours=eval(shifthours+hours)if (localhours <0) {localhours=24+localhours}if (localhours >=24) {localhours=localhours-24}minutes=thistime.getUTCMinutes()seconds=thistime.getUTCSeconds()if (thisplace=='Delhi') {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}thistime = localhours+":"+minutes+":"+secondsopenbox()}if (document.layers) {var left_pos=".left=";var top_pos=".top=";var doc="document.";var stl="";}if (document.all) {var left_pos=".pixelLeft=";var top_pos=".pixelTop=";var doc="";var stl=".style";}function openbox() {isbox = thisbox if(document.layers) {box = document.popupboxbox.visibility="visible"document.popupbox.document.write("<table width=120><tr><td valign=middle align=center bgcolor=0000AA><font face=Arial size=1 color=FFFFFF>"+thistime+"<br>"+thisplace+"</font></td></tr></table>")document.popupbox.document.close()document.popupbox.left=x-55document.popupbox.top=120timer =setTimeout("showtime(thisplace,shifthours)",1000)}if(document.all) {box = document.all.popupbox.stylebox.visibility="visible"popupbox.innerHTML="<table width=120><tr><td valign=middle align=center bgcolor=000077><font face=Arial size=1 color=FFFFFF>"+thistime+"<br>"+thisplace+"</font></td></tr></table>"eval(doc+"popupbox"+stl+left_pos+(x-55))eval(doc+"popupbox"+stl+top_pos+(120))timer =setTimeout("showtime(thisplace,shifthours)",100)}}function closebox(){if(document.all || document.layers) {clearTimeout(timer)}}function handlerMM(e){x = (document.layers) ? e.pageX : event.clientXy = (document.layers) ? e.pageY : event.clientY}if (document.layers){document.captureEvents(Event.MOUSEMOVE);}document.onmousemove = handlerMM;// - End of JavaScript - --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<BODY onload=fadeinlogo()><DIV id=background style="BACKGROUND-COLOR: #aaddff; HEIGHT: 90px; LEFT: 2px; POSITION: absolute; TOP: 20px; WIDTH: 600px"></DIV><DIV id=logo style="LEFT: 210px; POSITION: absolute; TOP: 30px"> <IMG border=0 src="logo279.gif" width="186" height="37"> </DIV><DIV id=clock style="LEFT: 2px; POSITION: absolute; TOP: 20px"><MAP name=sights.map><AREA coords=543,43,600,103 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Sydney','10')" shape=RECT><AREA coords=487,43,539,93 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Tokyo','9')" shape=RECT><AREA coords=432,36,485,99 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Beijing','8')" shape=RECT><AREA coords=365,39,426,99 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Delhi','5')" shape=RECT><AREA coords=309,31,365,100 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Moscow','4')" shape=RECT><AREA coords=245,40,307,102 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Kairo','3')" shape=RECT><AREA coords=215,25,240,95 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Paris','2')" shape=RECT><AREA coords=188,25,208,94 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('London','1')" shape=RECT><AREA coords=147,48,186,100 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Greenland','-2')" shape=RECT><AREA coords=115,27,143,88 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('New York','-4')" shape=RECT><AREA coords=62,38,112,97 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('San Francisco','-7')" shape=RECT><AREA coords=2,38,59,98 href="http://JavaScriptBank.com" onmouseout=closebox() onmouseover="showtime('Rio de Janheiro','-3')" shape=RECT></MAP> <IMG border=0 src="sights279.gif" useMap=#sights.map width="600" height="90"> </DIV><DIV id=redirection style="LEFT: 10px; POSITION: absolute; TOP: 200px"></DIV><DIV id=popupbox style="POSITION: absolute; TOP: 100px"></DIV></BODY><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
http://javascriptbank.com/javascript/time/First_illustrated_DHTML_worldtimezone_clock/logo279.gifhttp://javascriptbank.com/javascript/time/First_illustrated_DHTML_worldtimezone_clock/sights279.gif