uAcimboM
| Konu: - Dijital Saat ve Dijital Takvim - Salı Şub. 09, 2010 10:24 pm | |
| - Kod:
-
/* +——————————————————————-+ | J S - C L O C K (v1.0) | | | | Copyright Gerd Tentler [url=http://avafan.forum.st/mailto:info@gerd-tentler.de]info@gerd-tentler.de[/url] | | Created: Dec. 6, 2002 Last modified: Feb. 5, 2005 | +——————————————————————-+ | This program may be used and hosted free of charge by anyone for | | personal purpose as long as this copyright notice remains intact. | | | | Obtain permission before selling the code for this program or | | hosting this software on a commercial website or redistributing | | this software over the Internet or in any other medium. In all | | cases copyright must remain intact. | +——————————————————————-+ */ //——————————————————————————————————– // Definition //——————————————————————————————————–var imgPath = "js-clock(v1.0)resimler"; // path to images (digits) var borderColor = "#D00000"; // border color var borderWidth = 2; // border width (pixels); set to 0 for no border//——————————————————————————————————– // Build clock //——————————————————————————————————–document.write(’[table border=0 cellspacing=0 cellpadding=’ +br /borderWidth + ‘][tr][td bgcolor=’ + borderColor + ‘]’); document.write(’<table border=0 cellspacing=0 cellpadding=1 width=135 bgcolor=black><tr align=center>’); document.write(’<td nowrap>’); document.write(’[img(39,15)]’ + imgPath + ‘/wd8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(5,15)]’ + imgPath + ‘/dkc.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(5,15)]’ + imgPath + ‘/dkc.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’</td></tr><tr align=center><td nowrap>’); document.write(’[img(16,24)]’ + imgPath + ‘/dg8.gif[/img]’); document.write(’[img(16,24)]’ + imgPath + ‘/dg8.gif[/img]’); document.write(’[img(8,24)]’ + imgPath + ‘/dgc.gif[/img]’); document.write(’[img(16,24)]’ + imgPath + ‘/dg8.gif[/img]’); document.write(’[img(16,24)]’ + imgPath + ‘/dg8.gif[/img]’); document.write(’[img(4,24)]’ + imgPath + ‘/nix.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’[img(10,15)]’ + imgPath + ‘/dk8.gif[/img]’); document.write(’</td></tr></table>[/td][/tr][/table]’);//——————————————————————————————————– // Functions //——————————————————————————————————–var dg0 = new Image(); dg0.src = imgPath + ‘/dg0.gif’; var dg1 = new Image(); dg1.src = imgPath + ‘/dg1.gif’; var dg2 = new Image(); dg2.src = imgPath + ‘/dg2.gif’; var dg3 = new Image(); dg3.src = imgPath + ‘/dg3.gif’; var dg4 = new Image(); dg4.src = imgPath + ‘/dg4.gif’; var dg5 = new Image(); dg5.src = imgPath + ‘/dg5.gif’; var dg6 = new Image(); dg6.src = imgPath + ‘/dg6.gif’; var dg7 = new Image(); dg7.src = imgPath + ‘/dg7.gif’; var dg8 = new Image(); dg8.src = imgPath + ‘/dg8.gif’; var dg9 = new Image(); dg9.src = imgPath + ‘/dg9.gif’; var dk0 = new Image(); dk0.src = imgPath + ‘/dk0.gif’; var dk1 = new Image(); dk1.src = imgPath + ‘/dk1.gif’; var dk2 = new Image(); dk2.src = imgPath + ‘/dk2.gif’; var dk3 = new Image(); dk3.src = imgPath + ‘/dk3.gif’; var dk4 = new Image(); dk4.src = imgPath + ‘/dk4.gif’; var dk5 = new Image(); dk5.src = imgPath + ‘/dk5.gif’; var dk6 = new Image(); dk6.src = imgPath + ‘/dk6.gif’; var dk7 = new Image(); dk7.src = imgPath + ‘/dk7.gif’; var dk8 = new Image(); dk8.src = imgPath + ‘/dk8.gif’; var dk9 = new Image(); dk9.src = imgPath + ‘/dk9.gif’;function viewTime() { var d = new Date(); var weekday = d.getDay(); var day = d.getDate() + 100; var month = d.getMonth() + 101; var year = d.getYear(); if(year < 1900) year += 1900; var date = ” + day + month + year; document.wd.src = imgPath + ‘/wd’ + weekday + ‘.gif’; document.d1.src = imgPath + ‘/dk’ + date.substr(1, 1) + ‘.gif’; document.d2.src = imgPath + ‘/dk’ + date.substr(2, 1) + ‘.gif’; document.m1.src = imgPath + ‘/dk’ + date.substr(4, 1) + ‘.gif’; document.m2.src = imgPath + ‘/dk’ + date.substr(5, 1) + ‘.gif’; document.y1.src = imgPath + ‘/dk’ + date.substr(6, 1) + ‘.gif’; document.y2.src = imgPath + ‘/dk’ + date.substr(7, 1) + ‘.gif’; document.y3.src = imgPath + ‘/dk’ + date.substr(8, 1) + ‘.gif’; document.y4.src = imgPath + ‘/dk’ + date.substr(9, 1) + ‘.gif’; var hr = d.getHours() + 100; var mn = d.getMinutes() + 100; var se = d.getSeconds() + 100; var time = ” + hr + mn + se; document.hr1.src = imgPath + ‘/dg’ + time.substr(1, 1) + ‘.gif’; document.hr2.src = imgPath + ‘/dg’ + time.substr(2, 1) + ‘.gif’; document.mn1.src = imgPath + ‘/dg’ + time.substr(4, 1) + ‘.gif’; document.mn2.src = imgPath + ‘/dg’ + time.substr(5, 1) + ‘.gif’; document.se1.src = imgPath + ‘/dk’ + time.substr(7, 1) + ‘.gif’; document.se2.src = imgPath + ‘/dk’ + time.substr(8, 1) + ‘.gif’; }var interval = setInterval(’viewTime()’, 1000); ALinti | |
|