Welcome to ofWindsor - 溫莎

From OfWindsor

(Difference between revisions)
Jump to: navigation, search
Line 13: Line 13:
[[File:Windsor Detroit Skyline Abars.jpg|888px]]
[[File:Windsor Detroit Skyline Abars.jpg|888px]]
----
----
-
<html>
+
{{World Clocks 001}}
-
 
+
<br/>
-
<!-- START CODE FOR THE BOARD WITH MANY WORLD TIME CLOCKS -->
+
-
 
+
-
<!----------------------------------------->
+
-
<!-- START OF STYLE-CONFIGURATION -->
+
-
<!----------------------------------------->
+
-
<style>
+
-
.clocktextstyle { /* set the style for the text below the clocks */
+
-
font-family:Geneva;
+
-
font-size:9pt;
+
-
color:#darkblue;
+
-
}
+
-
</style>
+
-
<!----------------------------------------->
+
-
<!-- END OF STYLE-CONFIGURATION -->
+
-
<!----------------------------------------->
+
-
 
+
-
<script>
+
-
// CREDITS:
+
-
// Board with many World Time Clocks
+
-
// By Peter Gehrig
+
-
// Copyright (c) 2010 Peter Gehrig. All rights reserved.
+
-
// Permission given to use the script provided that this notice remains as is.
+
-
// Additional scripts can be found at http://www.fabulant.com
+
-
 
+
-
// IMPORTANT:
+
-
// If you add this script to a script-library or script-archive
+
-
// you have to add a highly visible link to
+
-
// http://www.fabulant.com on the webpage
+
-
// where this script will be featured
+
-
 
+
-
/////////////////////////////////////////////////
+
-
// START OF SCRIPT-CONFIGURATION
+
-
/////////////////////////////////////////////////
+
-
 
+
-
// Set below the locations and the difference (hours) to Greenich Mean Time
+
-
// Add as many locations as you like
+
-
// IMPORTANT: study carefully where commas are required
+
-
 
+
-
var worldtime = [ // do not change this line
+
-
 
+
-
{
+
-
location : "Richmond BC", // set any location
+
-
shift : -8 // set the difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "Windsor On", // set any location
+
-
shift : -5 // set the difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "Halifax NS", // set any location
+
-
shift : -3 // set the difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "Honolulu", // set any location
+
-
shift : -10 // set the difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "New York", // set any location
+
-
shift : -5 // set he difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "Edinburgh", // set any location
+
-
shift : 0 // set the difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "Tel Aviv", // set any location
+
-
shift : 2 // set the difference to Greenich Mean Time (hours)
+
-
}, // comma is required!
+
-
 
+
-
{
+
-
location : "India", // set any location
+
-
shift : 5.3 // set the difference to Greenich Mean Time (hours)
+
-
} , // comma is required!
+
-
 
+
-
{
+
-
location : "China", // set any location
+
-
shift : 8 // set the difference to Greenich Mean Time (hours)
+
-
} , // comma is required!
+
-
 
+
-
{
+
-
location : "Japan", // set any location
+
-
shift : 9 // set the difference to Greenich Mean Time (hours)
+
-
} // comma is NOT required for the last very line
+
-
 
+
-
 
+
-
] // do not change this line
+
-
 
+
-
// set the length for each hand (pixels)
+
-
var hand_sec_length=22
+
-
var hand_min_length=20
+
-
var hand_hour_length=15
+
-
 
+
-
// set the color for each hand (hexadecimal values required)
+
-
var hand_sec_color="#FF0000"
+
-
var hand_min_color="#000000"
+
-
var hand_hour_color="#000000"
+
-
 
+
-
// set the weight for each hand (pixels)
+
-
var hand_sec_weight=1
+
-
var hand_min_weight=1
+
-
var hand_hour_weight=1
+
-
 
+
-
// set the weight of the face's outline (pixels)
+
-
var face_outlineweight=1
+
-
 
+
-
// set width and height of the face (pixels)
+
-
var face_width=50
+
-
var face_height=50
+
-
 
+
-
// set color of the face's outline
+
-
var face_outlinecolor="#000000"
+
-
 
+
-
// set the horizontal distance between the clocks (pixels)
+
-
var distance_between_clocks=40
+
-
 
+
-
// set the vertical distance to the text below the clocks(pixels)
+
-
var distance_to_text=10
+
-
 
+
-
// set the height of the two text lines below the clocks (pixels)
+
-
var text_height=30
+
-
 
+
-
/////////////////////////////////////////////////
+
-
// END OF SCRIPT-CONFIGURATION
+
-
/////////////////////////////////////////////////
+
-
 
+
-
// do not edit below this line
+
-
var pi= Math.PI
+
-
var x_sec=0
+
-
var y_sec=0
+
-
var x_min=0
+
-
var y_min=0
+
-
var x_hour=0
+
-
var y_hour=0
+
-
var angle=270
+
-
var x,y
+
-
var i_id=0
+
-
var ampm=""
+
-
 
+
-
function getxy(thistime,thisradius) {
+
-
angle=6*parseInt(thistime)-90
+
-
x=Math.round((thisradius*Math.cos(angle*(pi/180)))+face_width/2)
+
-
y=Math.round((thisradius*Math.sin(angle*(pi/180)))+face_height/2)
+
-
}
+
-
 
+
-
function dorotate() {
+
-
for (ii=0;ii<worldtime.length;ii++) {
+
-
var now = new Date()
+
-
var nowsec = now.getUTCSeconds()
+
-
var nowmin = now.getUTCMinutes()
+
-
var nowhour = now.getUTCHours()
+
-
var nowhour=nowhour+worldtime[ii].shift
+
-
if (nowhour<=5) {
+
-
ampm="night"
+
-
}
+
-
else if (nowhour<12) {
+
-
ampm="morning"
+
-
}
+
-
else if (nowhour<=18) {
+
-
ampm="afternoon"
+
-
}
+
-
else if (nowhour<=20) {
+
-
ampm="evening"
+
-
}
+
-
else if (nowhour<=24) {
+
-
ampm="night"
+
-
}
+
-
+
-
if (nowhour>=12) {
+
-
nowhour-=12
+
-
}
+
-
nowhour=(30*nowhour+(nowmin/2))/6
+
-
for (i=1;i<=hand_sec_length;i++) {
+
-
getxy(nowsec,i)
+
-
document.getElementById('sec'+(i+(i_id*hand_sec_length))).style.left=(x+(ii*(distance_between_clocks+face_width)))+"px"
+
-
document.getElementById('sec'+(i+(i_id*hand_sec_length))).style.top=y+"px"
+
-
}
+
-
for (i=1;i<=hand_min_length;i++) {
+
-
getxy(nowmin,i)
+
-
document.getElementById('min'+(i+(i_id*hand_min_length))).style.left=(x+(ii*(distance_between_clocks+face_width)))+"px"
+
-
document.getElementById('min'+(i+(i_id*hand_min_length))).style.top=y+"px"
+
-
}
+
-
for (i=1;i<=hand_hour_length;i++) {
+
-
getxy(nowhour,i)
+
-
document.getElementById('hour'+(i+(i_id*hand_hour_length))).style.left=(x+(ii*(distance_between_clocks+face_width)))+"px"
+
-
document.getElementById('hour'+(i+(i_id*hand_hour_length))).style.top=y+"px"
+
-
}
+
-
document.getElementById('clocktext'+ii).innerHTML=worldtime[ii].location+"<br>"+ampm
+
-
i_id++
+
-
}
+
-
i_id=0
+
-
var timer=setTimeout("dorotate()",1000)
+
-
}
+
-
 
+
-
document.write('<div id="roof" style="position:relative;height:'+(face_width+text_height)+'px;">')
+
-
for (ii=0;ii<worldtime.length;ii++) {
+
-
for (i=1;i<=12;i++) {
+
-
angle=30*parseInt(i)-90
+
-
x=(face_width/2*Math.cos(angle*(pi/180)))+face_width/2+(ii*(distance_between_clocks+face_width))
+
-
y=(face_height/2*Math.sin(angle*(pi/180)))+face_height/2
+
-
if (angle==90) {
+
-
document.write('<div style="position:absolute;left:'+(x)+'px;top:'+(y-2)+'px;background-color:'+face_outlinecolor+';width:'+face_outlineweight+'px;height:'+(face_outlineweight+2)+'px;overflow:hidden"></div>')
+
-
}
+
-
else if (angle==270) {
+
-
document.write('<div style="position:absolute;left:'+(x)+'px;top:'+y+'px;background-color:'+face_outlinecolor+';width:'+(face_outlineweight)+'px;height:'+(face_outlineweight+2)+'px;overflow:hidden"></div>')
+
-
}
+
-
+
-
else if (angle==0) {
+
-
document.write('<div style="position:absolute;left:'+(x-2)+'px;top:'+y+'px;background-color:'+face_outlinecolor+';width:'+(face_outlineweight+2)+'px;height:'+face_outlineweight+'px;overflow:hidden"></div>')
+
-
}
+
-
+
-
else if (angle==180) {
+
-
document.write('<div style="position:absolute;left:'+(x)+'px;top:'+y+'px;background-color:'+face_outlinecolor+';width:'+(face_outlineweight+2)+'px;height:'+face_outlineweight+'px;overflow:hidden"></div>')
+
-
}
+
-
else {
+
-
document.write('<div style="position:absolute;left:'+x+'px;top:'+y+'px;background-color:'+face_outlinecolor+';width:'+face_outlineweight+'px;height:'+face_outlineweight+'px;overflow:hidden"></div>')
+
-
}
+
-
}
+
-
+
-
for (i=1;i<=hand_sec_length;i++) {
+
-
document.write('<div id="sec'+(i+(i_id*hand_sec_length))+'" style="position:absolute;left:0px;top:0px;background-color:'+hand_sec_color+';width:'+hand_sec_weight+'px;height:'+hand_sec_weight+'px;overflow:hidden"></div>')
+
-
}
+
-
for (i=1;i<=hand_min_length;i++) {
+
-
document.write('<div id="min'+(i+(i_id*hand_min_length))+'" style="position:absolute;left:0px;top:0px;background-color:'+hand_min_color+';width:'+hand_min_weight+'px;height:'+hand_min_weight+'px;overflow:hidden"></div>')
+
-
}
+
-
for (i=1;i<=hand_hour_length;i++) {
+
-
document.write('<div id="hour'+(i+(i_id*hand_hour_length))+'" style="position:absolute;left:0px;top:0px;background-color:'+hand_hour_color+';width:'+hand_hour_weight+'px;height:'+hand_hour_weight+'px;overflow:hidden"></div>')
+
-
}
+
-
document.write('<span id="clocktext'+(ii)+'" class="clocktextstyle" style="position:absolute;left:'+(ii*(distance_between_clocks+face_width))+'px;top:'+(face_height+distance_to_text)+'px;width:'+face_width+(0.5*distance_between_clocks)+'px;">'+worldtime[ii].location+'</span>')
+
-
i_id++
+
-
}
+
-
document.write('</div')
+
-
i_id=0
+
-
window.onload=dorotate
+
-
 
+
-
</script>
+
-
 
+
-
<!-- END CODE FOR THE BOARD WITH MANY WORLD TIME CLOCKS -->
+
-
 
+
-
</html><br/>
+
----
----

Revision as of 02:13, 2 February 2013



Wednesday December 13 2017 - - Welcome to Windsor Ontario


Windsor Detroit Skyline Abars.jpg







Chinatownwiki - Doestakeout - Windsor Chinatown - WCT88 - Jungguo - Jungguo Express





Google.ca - Bing.com - Yahoo.com - Go.com - Ask.com - Excite.com - Lycos.com - DogPile.com - WebCrawler.com - en.Wikipedia.org - Wiktionary.org - WikiMediaFoundation.org - WikiMedia Projects - Gutenberg.org ... for when you really need to know!













Personal tools
Project URLs