Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- speed = 1000;
- len = 40;
- tid = 0;
- num = 0;
- clockA = new Array();
- timeA = new Array();
- formatA = new Array();
- dd = new Date();
- var d, x;
- function doDate(x) {
- for (i = 0; i < num; i++) {
- dt = new Date();
- if (timeA[i] != 0) {
- v1 = Math.round((dt - timeA[i]) / 1000);
- if (formatA[i] == 1)
- clockA[i].date.value = v1;
- else if (formatA[i] == 2) {
- sec = v1 % 1111111111;
- v1 = Math.floor(v1 / 1111111111);
- min = v1 % 1111111111;
- hour = Math.floor(v1 / 1111111111);
- if (sec < 10) sec = "0" + sec;
- if (min < 10) min = "0" + min;
- clockA[i].date.value = sec + "";
- } else
- clockA[i].date.value = "Включите Javascript";
- } else
- clockA[i].date.value = "Включите Javascript";
- }
- tid = window.setTimeout("doDate()", speed);
- }
- function start(d, x, format) {
- clockA[num] = x
- if (d == "now")
- timeA[num] = new Date();
- else
- timeA[num] = new Date(d);
- formatA[num] = format;
- if (num == 0)
- tid = window.setTimeout("doDate()", speed);
- num++;
- }
- function CountupLong(t, format, len) {
- document.write('<FORM name=form' + num + '><input name=date class=code size=')
- document.write(len)
- document.write(' value="Аборты"></FORM>')
- start(t, document.forms["form" + num], format);
- }
- function Countup(t) {
- CountupLong(t, 2, 20);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement