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