وبلاگ شخصی حامد شیرزاد
وبلاگ شخصی حامد شیرزاد
صفحات وبلاگ
نویسنده: حامد شیرزاد - ۱۳٩٠/٧/۱٦

<!-- www.js.coo.ir -->
<!--داخل تگ <head> کپی شود-->
<!-- Begin
colors = new Array('330099','00ff00','ff00ff'); //Clock face colors.
sCol = 'ff00ff'; //seconds colour.
mCol = '00ff00'; //minutes colour.
hCol = '330099'; //hours colour.
//Alter nothing below!
H = '****';
H = H.split('');
H = H.reverse();
M = '*****';
M = M.split('');
M = M.reverse();
S = '******';
S = S.split('');
S = S.reverse();
dots = 12;
var Ypos = 0,Xpos = 0,Ybase = 0,Xbase = 0;
var ay = 0, ax = 0, Ay = 0, Ax = 0, by = 0, bx = 0, By = 0, Bx = 0, cy = 0, cx = 0, Cy = 0, Cx = 0, dy = 0, dx = 0, Dy = 0, Dx = 0;
count = 0;
count_a = 0;
move = 1;
ns = (document.layers)?1:0;
viz = (document.layers)?'hide':'hidden';
if (ns) {
for (I = 0; I < dots; I++)
document.write('<layer name=nface'+I+' top=0 left=0 bgcolor=#ffffff clip="0,0,3,3"></layer>');
for (I = 0; I < S.length; I++)
document.write('<layer name=nx'+I+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+sCol+'><center>'+S[I]+'</center></font></layer>');
for (I = 0; I < M.length; I++)
document.write('<layer name=ny'+I+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+mCol+'><center>'+M[I]+'</center></font></layer>');
for (I = 0; I < H.length; I++)
document.write('<layer name=nz'+I+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+hCol+'><center>'+H[I]+'</center></font></layer>');
}
else{
document.write('<div id="W" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (I = 0; I < dots; I++) {
document.write('<div id="face" style="position:absolute;top:0px;left:0px;width:3px;height:3px;font-size:3px;background:#ffffff"></div>');
}
document.write('</div></div>');
document.write('<div id="X" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (I = 0; I < S.length; I++) {
document.write('<div id="x" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+sCol+';text-align:center;padding-top:10px">'+S[I]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Y" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (I = 0; I < M.length; I++) {
document.write('<div id="y" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+mCol+';text-align:center;padding-top:10px">'+M[I]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Z" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (I = 0; I < H.length; I++) {
document.write('<div id="z" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+hCol+';text-align:center;padding-top:10px">'+H[I]+'</div>');
}
document.write('</div></div>');
}
if (ns) {
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt) {
Ypos = evnt.pageY + 100;
Xpos = evnt.pageX + 100;
}
window.onMouseMove = nsMouse;
}
else{
function ieMouse() {
Ypos = event.y + 100;
Xpos = event.x + 100;
}
document.onmousemove = ieMouse;
}
function clock() {
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;
Ybase = 15;
Xbase = 15;
if (ns) {
document.layers["nx"+0].visibility = viz;
document.layers["ny"+0].visibility = viz;
document.layers["nz"+0].visibility = viz;
for (I = 0; I < S.length; I++) {
document.layers["nx"+I].top = ay - 12 + (I * Ybase) * Math.sin(sec);
document.layers["nx"+I].left = ax - 12 + (I * Xbase) * Math.cos(sec);
}
for (I = 0; I < M.length; I++) {
document.layers["ny"+I].top = by - 12 + (I * Ybase) * Math.sin(min);
document.layers["ny"+I].left = bx - 12 + (I * Xbase) * Math.cos(min);
}
for (I = 0; I < H.length; I++) {
document.layers["nz"+I].top = cy - 12 + (I * Ybase) * Math.sin(hrs);
document.layers["nz"+I].left = cx - 12 + (I * Xbase) * Math.cos(hrs);
}
for (I = 0; I < dots; ++I) {
document.layers["nface"+I].top = dy - 2 + (70 * Math.sin(-0.49+dots+I/1.9));
document.layers["nface"+I].left = dx + 4 + (70 * Math.cos(-0.49+dots+I/1.9));
}
}
else {
var scrll = document.body.scrollTop;
W.style.pixelTop = scrll;
X.style.pixelTop = scrll;
Y.style.pixelTop = scrll;
Z.style.pixelTop = scrll;
x[0].style.visibility=viz;
y[0].style.visibility = viz;
z[0].style.visibility = viz;
for (I = 0; I < S.length; I++) {
x[I].style.pixelTop = ay - 12 + (I * Ybase) * Math.sin(sec);
x[I].style.pixelLeft = ax - 12 + (I * Xbase) * Math.cos(sec);
}
for (I = 0; I < M.length; I++) {
y[I].style.pixelTop = by - 12 + (I * Ybase) * Math.sin(min);
y[I].style.pixelLeft = bx - 12 + (I * Xbase) * Math.cos(min);
}
for (I = 0; I < H.length; I++) {
z[I].style.pixelTop = cy - 12 + (I * Ybase) * Math.sin(hrs);
z[I].style.pixelLeft = cx - 12 + (I * Xbase) * Math.cos(hrs);
}
for (I = 0; I < dots; ++I) {
face[I].style.pixelTop = dy + 6 + (70 * Math.sin(-0.49 + dots + I / 1.9));
face[I].style.pixelLeft = dx + 4 + (70 * Math.cos(-0.49 + dots + I / 1.9));
}
}
}
function MouseFollow() {
ay = Math.round(Ay += ((Ypos) - Ay) * 4 / 15);
ax = Math.round(Ax += ((Xpos) - Ax) * 4 / 15);
by = Math.round(By += (ay - By) * 4 / 15);
bx = Math.round(Bx += (ax - Bx) * 4 / 15);
cy = Math.round(Cy += (by - Cy) * 4 / 15);
cx = Math.round(Cx += (bx - Cx) * 4 / 15);
dy = Math.round(Dy += (cy - Dy) * 4 / 15);
dx = Math.round(Dx += (cx - Dx) * 4 / 15);
clock();
setTimeout('MouseFollow()',10);
}
function colorstep() {
count +=move;
if (count >= dots) {count=0;count_a += move}
if (count_a == colors.length) count_a = 0;
if (ns) document.layers["nface"+count].bgColor = colors[count_a];
else face[count].style.background = colors[count_a];
setTimeout('colorstep()',100)
}
function StartAll() {
MouseFollow();
colorstep();
}
if (document.layers || document.all) window.onload = StartAll;
// End -->
</script>
<!-- www.js.coo.ir -->

نویسندگان وبلاگ:
مطالب اخیر:
کدهای اضافی کاربر :