Rev 20 | Rev 14719 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6099 | bpr | 1 | <script type="text/javascript"> |
20 | reyssat | 2 | |
3 | //Created by Fabrice Guerimand |
||
4 | |||
5 | function decompte(temps) { |
||
6 | i1 = new Image(); i1.src = "gifs/lcdigit/1.gif"; |
||
7 | i2 = new Image(); i2.src = "gifs/lcdigit/2.gif"; |
||
8 | i3 = new Image(); i3.src = "gifs/lcdigit/3.gif"; |
||
9 | i4 = new Image(); i4.src = "gifs/lcdigit/4.gif"; |
||
10 | i5 = new Image(); i5.src = "gifs/lcdigit/5.gif"; |
||
11 | i6 = new Image(); i6.src = "gifs/lcdigit/6.gif"; |
||
12 | i7 = new Image(); i7.src = "gifs/lcdigit/7.gif"; |
||
13 | i8 = new Image(); i8.src = "gifs/lcdigit/8.gif"; |
||
14 | i9 = new Image(); i9.src = "gifs/lcdigit/9.gif"; |
||
15 | i0 = new Image(); i0.src = "gifs/lcdigit/0.gif"; |
||
16 | bl = new Image(); bl.src = "gifs/zero.gif"; |
||
17 | |||
18 | mille = temps /1000; |
||
19 | mille2 = Math.floor(mille); |
||
20 | cent = (temps - 1000 * mille2) / 100; |
||
21 | cent2 = Math.floor(cent); |
||
22 | dix = (temps -1000 * mille2 - 100 * cent2) / 10; |
||
23 | dix2 = Math.floor(dix); |
||
24 | un = (temps -1000 * mille2 -100 *cent2 -10 *dix2); |
||
25 | un2 = Math.round(un); |
||
26 | |||
27 | document.images.cptu.src = eval("i"+un2+".src"); |
||
28 | if(temps>9){document.images.cptd.src = eval("i"+dix2+".src");} else {document.images.cptd.src = eval("bl.src");} |
||
29 | if(temps>99){document.images.cptc.src = eval("i"+cent2+".src");} else {document.images.cptc.src = eval("bl.src");} |
||
30 | if(temps>99){document.images.cptm.src = eval("i"+mille2+".src");} else {document.images.cptm.src = eval("bl.src");} |
||
31 | temps2=temps-1; |
||
32 | if(temps2<0){temps2=0;} |
||
33 | |||
34 | window.setTimeout("decompte(temps2);", 1000 ); |
||
35 | } |
||
36 | </script> |
||
37 | |||
38 | !set wims_html_onload=decompte($wims_read_parm); |