

<!-- Clock variation (Silly Clock 3) http://website.lineone.net/~kurt.grigg/javascript

dCol='#bbbbbb';//date colour.
fCol='#bbbbbb';//face colour.
sCol='#bbbbbb';//seconds colour.
mCol='#ffa000';//minutes colour.
hCol='#ffa000';//hours colour.
cCol='#bbbbbb';//centre point colour.

ClockHeight=43;
ClockWidth=43;

d=new Array("SONNTAG","MONTAG","DIENSTAG","MITTWOCH","DONNERSTAG","FREITAG","SAMSTAG");
m=new Array("JANUAR","FEBRUAR","M€RZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DEZEMBER");

date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');

H=3;
M=4;
S=5;

Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';//Best found for this script.
size=1;

var n4=(document.layers);
var n6=(document.getElementById&&!document.all);
var ie=(document.all);
var O=(navigator.appName.indexOf("Opera") != -1)?true:false;
var _d=(n4||ie)?'document.':'document.getElementById("';
var _a=(n4||n6)?'':'all.';
var _n6r=(n6)?'")':'';
var _s=(n4)?'':'.style';

Face=Face.split(' ');
n=Face.length;
a=size*10;

props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=6;
HandX=6;
scrll=0;
Y=0;
X=0;

if (n4){
for (i=0; i < D.length; i++)
document.write('<layer name="Date'+i+'" top=0 left=0 height=15 width=15><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="Face'+i+'" top=0 left=0 height=15 width=15><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S; i++)
document.write('<layer name=Seconds'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
for (i=0; i < M; i++)
document.write('<layer name=Minutes'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
for (i=0; i < H; i++)
document.write('<layer name=Hours'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
}
else{
for (i=0; i < D.length; i++)
document.write('<div id="Date'+i+'" style="position:absolute;top:0px;left:0;width:15px;height:15px;text-align:center">'+props2+D[i]+'</B></font></div>');
for (i=0; i < n; i++)
document.write('<div id="Face'+i+'" style="position:absolute;top:0px;left:0;width:15px;height:15px;text-align:center">'+props+Face[i]+'</B></font></div>');
for (i=0; i < H; i++)
document.write('<div id="Hours'+i+'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
for (i=0; i < M; i++)
document.write('<div id="Minutes'+i+'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
for (i=0; i < S; i++)
document.write('<div id="Seconds'+i+'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}

(n4)?document.layers["Seconds"+0].bgColor=cCol:document.getElementById("Seconds"+0).style.background=cCol;

function ClockAndAssign(){
if (n4||n6||O){
Y=window.pageYOffset+window.innerHeight-90;
X=window.pageXOffset+window.innerWidth-100;
}
if (ie){
Y=document.body.scrollTop+window.document.body.clientHeight-90;
X=document.body.scrollLeft+window.document.body.clientWidth-90;
}
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;

for (i=0; i < n; i++){
 var F=eval(_d+_a+"Face"+i+_n6r+_s);
 F.top=Y + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180);
 F.left=X + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
 }
for (i=0; i < H; i++){
 var HL=eval(_d+_a+"Hours"+i+_n6r+_s);
 HL.top=Y+HandY+(i*HandHeight)*Math.sin(hrs);
 HL.left=X+HandX+(i*HandWidth)*Math.cos(hrs);
 }
for (i=0; i < M; i++){
 var ML=eval(_d+_a+"Minutes"+i+_n6r+_s);
 ML.top=Y+HandY+(i*HandHeight)*Math.sin(min);
 ML.left=X+HandX+(i*HandWidth)*Math.cos(min);
 }
for (i=0; i < S; i++){
 var SL=eval(_d+_a+"Seconds"+i+_n6r+_s);
 SL.top=Y+HandY+(i*HandHeight)*Math.sin(sec);
 SL.left=X+HandX+(i*HandWidth)*Math.cos(sec);
 }
for (i=0; i < D.length; i++){
 var DL=eval(_d+_a+"Date"+i+_n6r+_s);
 DL.top=Y + ClockHeight*1.5*Math.sin(-sec+i*Dsplit*Math.PI/180);
 DL.left=X + ClockWidth*1.5*Math.cos(-sec+i*Dsplit*Math.PI/180);
 }
setTimeout('ClockAndAssign()',50);
}
if (n4||ie||n6||O)window.onload=ClockAndAssign;
//-->


