<html>
<head>
<title>Часы
круглые</title>
</head>
<body>
<SCRIPT
language=JavaScript>
dCol='0099FF';//
Цветкалендаря.
fCol='00FF00';//
Цветцифреблата.
sCol='FF0000';//
Цветсекундной
стрелки.
mCol='FFFF00';//
Цветминутной
стрелки.
hCol='FFFF00';//
Цветчасовой
стрелки.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;
/*Календарьдни
неделимесяца,
принеобходимости
можнозадать
другойязыки
другойтекст*/
d=newArray
("Сегодня
воскресенье","Сегодня
понедельник","Сегодня
вторник","Сегодня
среда","Сегодня
четверг","Сегодня
пятница","Сегодня
субота");
m=newArray
("января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря");
();
();
if(year<2000)
year=year+1900;
TodaysDate=""+d
"+day+""+m
()]+""+year;
('');
H='...';
M='....';
S='.....';
Face='123456
789101112';
//font='Arial';
font='Verdana';
size=1;
speed=0.6;
ns=
(document.layers);
ie=
(document.all);
');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font
face="+font+"
size="+size+"
color="+fCol
+"><B>";
props2="<font
face="+font+"
size="+size+"
color="+dCol
+"><B>";
Dsplit=360/
D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=newArray
();x=newArray
();Y=newArray
();X=newArray();
for(i=0;i<n;
i++){y[i]=0;x
[i]=0;Y[i]=0;X
[i]=0}
Dy=newArray
();Dx=newArray
();DY=newArray
();DX=newArray
();
for(i=0;i<
D.length;i++){Dy
[i]=0;Dx[i]=0;DY
[i]=0;DX[i]=0}
if(ns){
for(i=0;i<
D.length;i++)
document.write
('<layer
name="nsDate'+i
+'"top=0left=0
height='+a+'
width='+a
+'><center>'+props2+D
[i]+'</font></
center></
layer>');
for(i=0;i<n;
i++)
document.write
('<layer
name="nsFace'+i
+'"top=0left=0
height='+a+'
width='+a
+'><center>'+props
+Face[i]+'</
font></center></
layer>');
for(i=0;i<
S.length;i++)
document.write
('<layer
name=nsSeconds'+i
+'top=0left=0
width=15
height=15><font
face=Arialsize=3
color='+sCol
+'><center><b>'+S
[i]+'</b></
center></font></
layer>');
for(i=0;i<
M.length;i++)
document.write
('<layer
name=nsMinutes'+i
+'top=0left=0
width=15
height=15><font
face=Arialsize=3
color='+mCol
+'><center><b>'+M
[i]+'</b></
center></font></
layer>');
for(i=0;i<
H.length;i++)
document.write
('<layer
name=nsHours'+i+'
top=0left=0
width=15
height=15><font
face=Arialsize=3
color='+hCol
+'><center><b>'+H
[i]+'</b></
center></font></
layer>');
}
if(ie){
document.write
('<divid="Od"
style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for(i=0;i<
D.length;i++)
document.write
('<div
id="ieDate"
style="position:absolute;top:0px;left:0;height:'+a
+';width:'+a
+';text-
align:center">'+props2+D
[i]+'</B></
font></div>');
document.write
('</div></div>');
document.write
('<divid="Of"
style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for(i=0;i<n;
i++)
document.write
('<div
id="ieFace"
style="position:absolute;top:0px;left:0;height:'+a
+';width:'+a
+';text-
align:center">'+props
+Face[i]+'</B></
font></div>');
document.write
('</div></div>');
document.write
('<divid="Oh"
style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for(i=0;i<
H.length;i++)
document.write
('<div
id="ieHours"
style="position:absolute;width:16px;height:16px;font-
family:Arial;font-
size:16px;color:'+hCol
+';text-
align:center;font-
weight:bold">'+H
[i]+'</div>');
document.write
('</div></div>');
document.write
('<divid="Om"
style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for(i=0;i<
M.length;i++)
document.write
('<div
id="ieMinutes"
style="position:absolute;width:16px;height:16px;font-
family:Arial;font-
size:16px;color:'+mCol
+';text-
align:center;font-
weight:bold">'+M
[i]+'</div>');
document.write
('</div></div>')
document.write
('<divid="Os"
style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for(i=0;i<
S.length;i++)
document.write
('<div
id="ieSeconds"
style="position:absolute;width:16px;height:16px;font-
family:Arial;font-
size:16px;color:'+sCol
+';text-
align:center;font-
weight:bold">'+S
[i]+'</div>');
document.write
('</div></div>')
}
(ns)?
window.captureEvents
(Event.MOUSEMOVE):0;
functionMouse
(evnt){
ymouse=(ns)?
evnt.pageY
+ClockFromMouseY-
(window.pageYOffset):event.y
+ClockFromMouseY;
xmouse=(ns)?
evnt.pageX
+ClockFromMouseX:event.x
+ClockFromMouseX;
}
(ns)?
window.onMouseMove=Mouse:document.onmousemove=Mouse;
function
ClockAndAssign(){
();
secs=
();
sec=-1.57+
secs/30;
mins=
();
mins/30;
hr=
hrs=-1.575+
())/360;
if(ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for(i=0;i<n;
i++){
varF=(ns)?
document.layers
['nsFace'+i]:ieFace
[i].style;
F.top=y[i]+
(-1.0471+
F.left=x[i]+
(-1.0471+
}
for(i=0;i<
H.length;i++){
varHL=(ns)?
document.layers
['nsHours'+i]:ieHours
[i].style;
HL.top=y[i]+HandY
(hrs)+scrll;
HL.left=x
[i]+HandX
(hrs);
}
for(i=0;i<
M.length;i++){
varML=(ns)?
document.layers
['nsMinutes'+i]:ieMinutes
[i].style;
ML.top=y[i]+HandY
ML.left=x
[i]+HandX
}
for(i=0;i<
S.length;i++){
varSL=(ns)?
document.layers
['nsSeconds'+i]:ieSeconds
[i].style;
SL.top=y[i]+HandY
(sec)+scrll;
SL.left=x
[i]+HandX
(sec);
}
for(i=0;i<
D.length;i++){
varDL=(ns)?
document.layers
['nsDate'+i]:ieDate
[i].style;
(currStep
+i
*Dsplit
*Math
.PI/180)+scrll
; (currStep
}
currStep-=step;
}
functionDelay(){
scrll=(ns)?
window.pageYOffset:0;
(DY[0]+=
((ymouse)-DY
[0])*speed);
(DX[0]+=
((xmouse)-DX
[0])*speed);
for(i=1;i<
D.length;i++){
(DY[i]+=(Dy[i-1]-
DY[i])*speed);
(DX[i]+=(Dx[i-1]-
DX[i])*speed);
}
[0]+=((ymouse)-Y
[0])*speed);
[0]+=((xmouse)-X
[0])*speed);
for(i=1;i<n;
i++){
[i]+=(y[i-1]-Y
[i])*speed);
[i]+=(x[i-1]-X
[i])*speed);
}
ClockAndAssign();
setTimeout('Delay
()',20);
}
if(ns||
ie)window.onload=Delay;
</SCRIPT>
</body>
</html>