Subversion Repositories wimsdev

Rev

Rev 3425 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3425 obado 1
//Fonctions specifiques "Microsoft Internet Explorer" :
2
document.writeln("<style>div#textarea{width:95%;}</style>");
3
 
4
function instruction() {
5
        var chaine = document.forms['replyform'].wims_deposit.value;
6
 
7
        var n = chaine.length;
8
        if (n > 0) {
9
                var a = index + 5;
10
                if (n <= a) {
11
                        //alert(chaine[n-1]);
12
                        if (chaine[n - 1] == chaine[index + y]) {
13
                                y++;
14
                                instructionwims = instructionwims + chaine[n - 1];
15
                                parcoursTab(instructionwims, k);
16
                        }
17
                }
18
                else {
19
                        clearInterval(chrono2);
20
                        chrono2 = null;
21
                        //alert(instructionwims);
22
                        instructionwims = "";
23
                        y = 0;
24
                        anime();
25
                }
26
 
27
        }
28
}
29
 
30
function change() {
31
        //var chaine=document.forms['replyform'].wims_deposit.value;
32
        //var mytool_array=chaine.split(" ");
33
        var chaine = document.getElementById("wims_deposit_id").value;
34
        //alert(chaine.value);
35
        var n = chaine.length;
36
        if (n > 0) {
37
                var i = n - 1;
38
                //alert(chaine[i]);
39
                if (chaine[i] == "\\") { //document.write("dfgdfgdsfgdsf");
40
                        //alert("antislash detecté");
41
                        index = i;
42
                        k = i;
43
                        clearInterval(chrono);
44
                        chrono = null;
45
                        anime2();
46
                }
47
                //alert(chaine[i]);
48
        }
49
}
50
 
51
function inser() {
52
        var selectedoption = document.getElementsByTagName("OPTION");
53
        var instruction = selectedoption[document.forms['formu'].sel.selectedIndex].innerHTML;
54
        var select = document.getElementById("select");
55
        var a = select.innerHTML;
56
        var mytool_array = a.split("<option>");
57
        var n = mytool_array.length;
58
        var n2 = cities.length;
59
        var n3 = n2 + 1;
60
        //Si on  a la liste total des villes
61
        if (n == n3) {
62
                var chaine = document.forms['replyform'].wims_deposit.value;
63
                var chaine2 = chaine + "\n" + instruction;
64
                document.forms['replyform'].wims_deposit.value = chaine2;
65
                initlist();
66
        }
67
        else {
68
                var chaine = document.forms['replyform'].wims_deposit.value;
69
                var mytool_array = chaine.split("\n");
70
                var n = mytool_array.length;
71
 
72
                var b = "";
73
                for (var i = 0; i < n - 1; i++) {
74
                        b = b + "" + mytool_array[i] + "\n";
75
 
76
                }
77
                var dernierligne = mytool_array[n - 1].split(" ");
78
                var n2 = dernierligne.length;
79
                //alert(n2);
80
                if (n2 == 1) {
81
                        var chainefin = b + "" + instruction;
82
                        document.forms['replyform'].wims_deposit.value = chainefin;
83
                        initlist();
84
                }
85
                else {
86
                        var dernierligne = mytool_array[n - 1].split(" ");
87
                        var n3 = dernierligne.length;
88
                        var c = "";
89
                        for (var i = 0; i < n3 - 1; i++) {
90
                                c = c + "" + dernierligne[i] + " ";
91
 
92
                        }
93
                        var chainefin = b + "" + c + "\n" + instruction;
94
                        document.forms['replyform'].wims_deposit.value = chainefin;
95
                        initlist();
96
                }
97
        }
7850 bpr 98
}