-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcount.html
453 lines (284 loc) · 11.7 KB
/
count.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<html>
<head>
<style type="text/css">
#holder {
position: absolute; /* leave as "relative" to keep timer centered on your
page, or change to "absolute" then change the
values of the "top" and "left" properties to
position the timer */
top: 2px; /* change to position the timer */
left: 3px; /* change to position the timer; must also change
position to "absolute" above */
width: 0px;
height: 0px;
border: none;
margin: 0px auto;
}
#title, #note {
color: lime; /* this determines the color of the DAYS, HRS, MIN, SEC
labels under the timer and the color of the note
that displays after reaching the target date and
time; if using the blue digital images, change to
#52C6FF; for the red images, change to #FF6666; for
the white images, change to #BBBBBB; for the yellow
images, change to #FFFF00 */
}
#note {
position: relative;
top: 6px;
height: 20px;
width: 0px;
margin: 0 auto;
padding: 0px;
text-align: center;
font-family: Arial;
font-size: 18px;
font-weight: bold; /* options are normal, bold, bolder, lighter */
font-style: normal; /* options are normal or italic */
z-index: 1;
}
.title {
border: none;
padding: 0px;
margin: 0px;
width: 0px;
text-align: center;
font-family: Arial;
font-size: 10px;
font-weight: normal; /* options are normal, bold, bolder, lighter */
background-color: transparent;
}
#timer_day {
position: absolute;
top: 170px;
left: 200px;
margin: 0px auto;
text-align: center;
width: 260px;
height: 0px;
border: none;
padding: none;
background: transparent; /* may change to another color, or to "transparent" */
border-radius: 0px;
box-shadow: none; /* change to "none" if you don't want a shadow */
}
#timer_hr {
position: absolute;
top: 307px;
left: 50px;
margin: 0px auto;
text-align: center;
width: 260px;
height: 0px;
border: none;
padding: none;
background: transparent; /* may change to another color, or to "transparent" */
border-radius: 0px;
box-shadow: none; /* change to "none" if you don't want a shadow */
}
#timer_min {
position: absolute;
top: 307px;
left: 230px;
margin: 0px auto;
text-align: center;
width: 260px;
height: 0px;
border: none;
padding: none;
background: transparent; /* may change to another color, or to "transparent" */
border-radius: 0px;
box-shadow: none; /* change to "none" if you don't want a shadow */
}
#timer_sec {
position: absolute;
top: 307px;
left: 415px;
margin: 0px auto;
text-align: center;
width: 260px;
height: 0px;
border: none;
padding: none;
background: transparent; /* may change to another color, or to "transparent" */
border-radius: 0px;
box-shadow: none; /* change to "none" if you don't want a shadow */
}
</style>
<script type="text/javascript">
/*
Count down until any date script-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
Modified by Robert M. Kuhnhenn, D.O.
(www.rmkwebdesign.com/Countdown_Timers/)
on 5/30/2006 to count down to a specific date AND time,
on 10/20/2007 to a new format, on 1/10/2010 to include
time zone offset, and on 7/12/2012 to digital numbers.
*/
/*
Change the items noted in light blue below to create your countdown target
date and announcement once the target date and time are reached.
*/
var note="It's Scrimmage!!"; /* -->Enter what you want the script to
display when the target date and time
are reached, limit to 25 characters */
var year=2017; /* -->Enter the count down target date YEAR */
var month=4; /* -->Enter the count down target date MONTH */
var day=15; /* -->Enter the count down target date DAY */
var hour=8; /* -->Enter the count down target date HOUR (24 hour
clock) */
var minute=0; /* -->Enter the count down target date MINUTE */
var tz=-8; /* -->Offset for your timezone in hours from UTC (see
http://wwp.greenwichmeantime.com/index.htm to find
the timezone offset for your location) */
//--> DO NOT CHANGE THE CODE BELOW! <--
d1 = new Image(); d1.src = "digital-numbers/1.png";
d2 = new Image(); d2.src = "digital-numbers/2.png";
d3 = new Image(); d3.src = "digital-numbers/3.png";
d4 = new Image(); d4.src = "digital-numbers/4.png";
d5 = new Image(); d5.src = "digital-numbers/5.png";
d6 = new Image(); d6.src = "digital-numbers/6.png";
d7 = new Image(); d7.src = "digital-numbers/7.png";
d8 = new Image(); d8.src = "digital-numbers/8.png";
d9 = new Image(); d9.src = "digital-numbers/9.png";
d0 = new Image(); d0.src = "digital-numbers/0.png";
bkgd = new Image(); bkgd.src = "digital-numbers/bkgd.gif";
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
function countdown(yr,m,d,hr,min){
theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
var today=new Date();
var todayy=today.getYear();
if (todayy < 1000) {todayy+=1900;}
var todaym=today.getMonth();
var todayd=today.getDate();
var todayh=today.getHours();
var todaymin=today.getMinutes();
var todaysec=today.getSeconds();
var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
var dd=futurestring-todaystring;
var dday=Math.floor(dd/(60*60*1000*24)*1);
var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
document.getElementById('note').innerHTML=note;
document.getElementById('note').style.display="block";
document.getElementById('countdown').style.display="none";
clearTimeout(startTimer);
return;
}
else {
document.getElementById('note').style.display="none";
document.getElementById('timer_sec').style.display="block";
startTimer = setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",500);
}
convert(dday,dhour,dmin,dsec);
}
function convert(d,h,m,s) {
if (!document.images) return;
if (d <= 9) {
document.images.day1.src = bkgd.src;
document.images.day2.src = bkgd.src;
document.images.day3.src = eval("d"+d+".src");
}
else if (d <= 99) {
document.images.day1.src = bkgd.src;
document.images.day2.src = eval("d"+Math.floor(d/10)+".src");
document.images.day3.src = eval("d"+(d%10)+".src");
}
else {
document.images.day1.src = eval("d"+Math.floor(d/100)+".src");
var day = d.toString();
day = day.substr(1,1);
day = parseInt(day);
document.images.day2.src = eval("d"+day+".src");
document.images.day3.src = eval("d"+(d%10)+".src");
}
if (h <= 9) {
document.images.h1.src = d0.src;
document.images.h2.src = eval("d"+h+".src");
}
else {
document.images.h1.src = eval("d"+Math.floor(h/10)+".src");
document.images.h2.src = eval("d"+(h%10)+".src");
}
if (m <= 9) {
document.images.m1.src = d0.src;
document.images.m2.src = eval("d"+m+".src");
}
else {
document.images.m1.src = eval("d"+Math.floor(m/10)+".src");
document.images.m2.src = eval("d"+(m%10)+".src");
}
if (s <= 9) {
document.images.s1.src = d0.src;
document.images.s2.src = eval("d"+s+".src");
}
else {
document.images.s1.src = eval("d"+Math.floor(s/10)+".src");
document.images.s2.src = eval("d"+(s%10)+".src");
}
}
</script>
</head>
<body onload="countdown(year,month,day,hour,minute)">
<img src="Scrimmage_Panda.jpg" style='position:absolute; top:0px; left:0px; width:720px; border:0;' >
<div id="holder">
<div id="timer_day">
<div id="note"></div>
<div id="countdown">
<img height=120 src="digital-numbers/bkgd.gif" width=60 name="day1">
<img height=120 src="digital-numbers/bkgd.gif" width=60 name="day2">
<img height=120 src="digital-numbers/bkgd.gif" width=60 name="day3">
</div>
</div>
</div>
<!--
<img height=42 id="colon1" src="digital-numbers/colon.png" width=9 name="d1">
<img height=42 id="colon2" src="digital-numbers/colon.png" width=9 name="g1">
<img height=42 id="colon3" src="digital-numbers/colon.png" width=9 name="j1">
-->
<div id="holder">
<div id="timer_hr">
<div id="note"></div>
<div id="countdown">
<img height=80 src="digital-numbers/bkgd.gif" width=40 name="h1">
<img height=80 src="digital-numbers/bkgd.gif" width=40 name="h2">
</div>
</div>
</div>
<div id="holder">
<div id="timer_min">
<div id="note"></div>
<div id="countdown">
<img height=80 src="digital-numbers/bkgd.gif" width=40 name="m1">
<img height=80 src="digital-numbers/bkgd.gif" width=40 name="m2">
</div>
</div>
</div>
<div id="holder">
<div id="timer_sec">
<div id="note"></div>
<div id="countdown">
<img height=80 src="digital-numbers/bkgd.gif" width=40 name="s1">
<img height=80 src="digital-numbers/bkgd.gif" width=40 name="s2">
</div>
</div>
</div>
<!--
<div id="title">
<div class="title" style="position: absolute; top: 36px; left: 42px">DAYS</div>
<div class="title" style="position: absolute; top: 36px; left: 105px">HRS</div>
<div class="title" style="position: absolute; top: 36px; left: 156px">MIN</div>
<div class="title" style="position: absolute; top: 36px; left: 211px">SEC</div>
</div>
-->
</div>
</div>
</div>
</body>
</html>