1/*
2* The contents of this file are subject to the Netscape Public
3* License Version 1.1 (the "License"); you may not use this file
4* except in compliance with the License. You may obtain a copy of
5* the License at http://www.mozilla.org/NPL/
6*
7* Software distributed under the License is distributed on an
8* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed
9* or implied. See the License for the specific language governing
10* rights and limitations under the License.
11*
12* The Original Code is mozilla.org code.
13*
14* The Initial Developer of the Original Code is Netscape
15* Communications Corporation.  Portions created by Netscape are
16* Copyright (C) 1998 Netscape Communications Corporation.
17* All Rights Reserved.
18*
19* Contributor(s): pschwartau@netscape.com
20* Date: 2001-07-12
21*
22* SUMMARY: Regression test for bug 90445
23* See http://bugzilla.mozilla.org/show_bug.cgi?id=90445
24*
25* Just seeing if this script will compile without crashing.
26*/
27//-------------------------------------------------------------------------------------------------
28var bug = 90445;
29var summary = 'Testing this script will compile without crashing';
30
31printBugNumber (bug);
32printStatus (summary);
33
34
35// The big function -
36function compte() {
37    var mois = getValueFromOption(document.formtest.mois);
38    var region = document.formtest.region.options.selectedIndex;
39    var confort = document.formtest.confort.options.selectedIndex;
40    var encadrement = document.formtest.encadrement.options.selectedIndex;
41    var typeVillage = document.formtest.type_village.options.selectedIndex;
42    var budget = document.formtest.budget.value;
43    var sport1 = document.formtest.sport1.options.selectedIndex;
44    var sport2 = document.formtest.sport2.options.selectedIndex;
45    var sport3 = document.formtest.sport3.options.selectedIndex;
46    var activite1 = document.formtest.activite1.options.selectedIndex;
47    var activite2 = document.formtest.activite2.options.selectedIndex;
48    var activite3 = document.formtest.activite3.options.selectedIndex;
49
50    var ret = 0;
51    var liste;
52    var taille;
53    var bl;
54    var i;
55    var j;
56    V=[
57       [1,14,19,1,3,3,3,0,[10,13,17,18,22,23,26,27,29,9],[13,17,18,20,4,5,6,7,8]],
58       [1,14,18,1,1,3,3,0,[1,11,13,22,23,26,27,28,29,3,4,9],[13,17,18,20,6]],
59       [1,14,19,1,3,4,3,0,[13,17,18,22,23,25,26,27,4,9],[11,17,12,2,20,3,21,9,6]],
60       [1,14,19,1,1,3,3,0,[1,10,13,22,23,24,25,26,27,28,4,8,9],[13,17,6,9]],
61       [1,14,18,1,3,4,3,0,[12,13,22,23,27,28,7,9],[13,17,2,20,6,7,9]],
62       [1,14,19,5,4,2,3,0,[12,13,17,18,2,21,22,23,24,26,27,28,3,5,8,9],[1,10,13,17,18,19,20,5,21,7,8,9]],
63       [1,14,20,6,2,2,3,0,[11,13,2,22,23,26,27,3,4,5,8,9],[13,17,18,20,6,9]],
64       [1,14,19,6,3,4,3,0,[10,13,2,22,23,26,27,3,4,5,8,9],[13,17,18,19,20,21,9,6,5]],
65       [1,14,19,4,2,4,3,0,[13,17,2,22,26,28,3,5,6,7,8,9],[10,13,15,17,19,2,20,3,5,6,9]],
66       [1,14,19,8,4,4,3,0,[13,2,22,26,3,28,4,5,6,8,9],[14,15,17,18,19,2,20,21,9,7]],
67       [1,15,18,6,1,4,3,0,[10,11,13,14,15,2,23,26,27,5,8,9,6],[13,17,2,20,6,9]],
68       [1,14,19,2,3,5,3,0,[10,13,17,2,22,26,27,28,3,5,6,7,8,9],[1,10,13,15,17,18,19,20,6,7,9,22]],
69       [1,15,18,6,1,3,3,0,[12,13,15,2,22,23,26,4,5,9],[13,15,6,17,2,21,9]],
70       [1,19,21,1,4,4,3,0,[11,13,18,22,23,27,28,4],[17,2,20,21,9]],
71       [1,14,19,4,3,3,3,0,[10,13,17,2,22,23,24,26,27,3,4,6,8,9],[10,13,17,19,20,3,5,6,7,9]],
72       [1,13,19,6,3,3,3,0,[11,13,15,2,22,23,26,27,28,3,4,8,9],[1,13,17,18,20,6,9,22]],
73       [1,15,19,6,1,5,3,0,[10,13,2,22,23,26,27,4,5,8,11],[10,13,17,20,5,6,9]],
74       [1,15,18,6,3,2,1,0,[10,17,21,22,23,25,26,9],[13,16,17,20,21,8,9]],
75       [1,14,19,8,2,2,3,0,[13,16,21,22,23,24,26,27,3,4,5,6,8,9],[15,17,20,3,6,9]],
76       [1,14,19,5,3,2,3,0,[10,11,13,16,17,2,21,22,23,24,26,27,3,4,8,9],[1,10,13,17,18,19,20,5,6,7,9]],
77       [1,14,19,4,4,4,3,0,[10,13,2,22,23,26,27,3,4,5,6,7,8,9],[13,14,17,19,20,21,7,9]],
78       [1,14,19,1,3,2,3,0,[10,13,22,23,26,27,28,3,4,5,6,8,9],[15,17,18,2,20,6,8,9]],
79       [1,14,19,6,1,5,3,0,[10,11,13,22,25,26,4,5,7,8,9],[10,13,17,2,20,5,6,9]],
80       [1,14,19,6,4,4,3,0,[10,13,17,18,22,23,26,27,4,9,5],[1,13,14,17,18,20,3,21,7,8,9]],
81       [1,12,20,6,3,4,2,0,[10,13,14,17,18,22,23,25,26,27,29,9],[13,14,16,17,20,3,8,7,9]],
82       [1,14,19,1,3,3,3,0,[10,11,13,17,2,22,23,26,27,29,3,4,8,9],[1,10,13,14,15,17,18,20,5,21,7,8,9,25]],
83       [1,14,20,1,2,5,3,0,[12,13,17,22,23,26,28,3,4,8,9,27],[10,13,17,18,20,5,6,9,22]],
84       [1,14,19,1,2,3,3,0,[13,17,22,23,26,27,28,29,3,4,8,19],[13,17,18,20,6,7,8,9]],
85       [1,14,18,6,1,3,3,0,[12,13,15,2,22,23,26,27,28,4,9],[13,17,6,9]],
86       [1,14,19,5,3,4,3,0,[13,2,26,27,28,3,4,5,6],[1,10,13,15,17,18,2,20,3,21,7]],
87       [1,14,18,6,3,3,3,0,[13,2,22,23,26,27,8,3,4,5,9],[1,13,17,18,19,2,20,6,8,9,22]],
88       [1,14,19,6,4,3,2,0,[10,13,17,18,22,23,25,26,27,29],[13,14,16,17,3,7,8]],
89       [1,14,18,6,3,3,3,0,[13,22,23,26,27,28,3,4,5,7,8,9],[13,17,18,2,20,3,5,6,9]],
90       [1,14,20,1,3,2,3,0,[10,13,15,17,19,2,22,23,24,26,27,3,4,8,9],[13,17,18,20,6,7,8,9]],
91       [1,14,20,6,3,1,3,0,[10,13,16,2,22,23,26,27,3,4,6,8,9],[13,17,20,5,6,9]],
92       [1,14,19,3,3,3,3,0,[10,12,13,18,21,22,23,24,26,27,29,3,4,8,9],[1,10,17,20,6,8,9]],
93       [1,14,19,2,3,1,3,0,[12,13,17,2,22,23,24,26,27,28,4,8,9,19],[1,13,17,18,19,20,6,9]],
94       [1,14,19,5,4,2,3,0,[10,11,13,17,2,21,3,22,23,24,25,26,27,5,6,8,9],[13,17,20,3,21,9]],
95       [1,14,19,6,2,3,3,0,[13,22,23,26,27,28,3,4,5,7,8,9],[13,17,18,20,5,6,9]],
96       [1,14,20,6,3,2,3,0,[10,12,13,19,2,22,23,24,25,1,26,27,28,3,4,8,9],[10,13,17,18,20,3,5,6,7,8,9]],
97       [1,14,19,5,3,4,3,0,[12,13,2,26,27,28,3,4,5,6,8,9],[10,13,17,18,2,20,3,21,7]],
98       [1,14,19,6,3,4,3,0,[13,16,22,23,26,27,28,3,5,7,8,9],[10,13,17,18,19,2,20,5,6,7,8,9]],
99       [1,14,19,6,3,2,3,0,[10,13,22,23,24,25,26,27,3,4,7,8,9],[1,13,17,20,5,21,9,23]],
100       [1,14,18,6,2,2,3,0,[11,13,2,22,23,26,27,3,4,8,9],[1,13,14,15,17,18,19,2,20,6,7,8,5]],
101       [1,14,19,6,2,3,3,0,[13,17,2,22,23,26,27,4,5,7,9],[13,14,16,17,9,22]],
102       [1,14,19,8,3,2,3,0,[13,18,22,23,24,27,28,3,4,5,8,9],[15,16,17,18,19,2,20,6,9]],
103       [1,14,19,1,3,4,2,0,[13,17,18,22,23,26,27,29,9,11,8],[13,17,20,3,21,7,8,9,6]],
104       [1,15,18,6,4,4,1,0,[13,17,22,25,27,29],[14,16,3,7,8]],
105       [1,14,18,6,3,1,3,0,[12,13,16,17,18,19,2,22,23,26,27,3,4,9],[13,17,20,3,6,9]],
106       [1,14,19,6,2,3,2,0,[13,2,22,23,26,27,9],[13,16,17,9]],
107       [1,14,19,8,3,4,3,0,[13,22,26,5,6,7,8,9],[13,15,17,18,19,2,20,6,9]],
108       [1,14,20,1,2,2,3,0,[11,13,22,23,26,27,28,29,3,4,9],[13,17,18,20,6,9]],
109       [1,14,19,6,3,2,2,0,[10,13,17,18,22,23,24,25,26,27,9],[1,13,14,16,17,20,3,6,7,8,9]],
110       [1,14,18,6,3,5,3,0,[11,13,18,22,23,26,27,4,5,2],[1,10,13,17,2,20,5,6,9,22]],
111       [1,14,19,1,3,4,2,0,[17,22,23,26,27,13],[13,16,17,18,2,20,11,6,7,8,9]],
112       [1,15,18,6,1,2,3,0,[13,15,2,22,23,26,3,4,5,6,9],[1,13,17,20,6,9,5]],
113       [1,14,20,6,3,2,3,0,[10,11,24,13,2,22,23,26,27,3,4,5,7,8,9],[1,10,13,17,18,19,2,20,5,6,7,8,9,23]],
114       [1,14,19,4,4,4,3,0,[10,13,17,18,2,22,26,27,28,3,4,5,6,8,9,23],[14,15,17,19,2,20,3,21,7,9,10]],
115       [1,14,19,5,4,3,3,0,[10,13,17,21,22,23,26,27,5,8,9],[10,13,17,18,19,2,20,21,7,9]],
116       [1,14,19,7,4,4,3,0,[13,17,2,22,23,26,27,18,28,3,4,5,7,9],[10,13,17,18,19,2,20,3,21,9]],
117       [1,12,20,6,2,2,2,0,[10,11,13,17,18,22,23,25,26,27,29,8,9],[1,13,16,17,3,6,8,9,24]],
118       [1,14,18,6,3,3,1,0,[13,16,17,22,25,26,27,9],[13,16,17,20,21,8]],
119       [1,14,19,6,2,5,3,0,[13,17,2,22,23,26,27,4,5,9],[10,13,17,2,20,5,6,9]],
120       [1,14,19,6,2,3,3,0,[1,13,17,22,23,26,27,28,4,6,9],[13,17,18,20,6,9]],
121       [1,14,19,4,3,2,3,0,[12,13,17,19,2,22,23,24,26,27,28,3,4,5,8,9],[13,15,17,19,20,21,9,5]],
122       [1,14,19,5,4,2,3,0,[10,17,2,21,22,23,24,26,27,28,3,4,6,8,9],[1,10,13,14,17,19,20,3,21,7,8,9]],
123       [1,14,19,3,4,3,3,0,[10,12,13,2,21,22,23,26,27,4,7,8,9],[1,13,17,20,6,8,9]],
124       [1,14,19,5,3,2,1,0,[13,17,19,21,22,23,24,25,26,27,8,9],[1,14,17,3,6,8,13]],
125       [1,14,19,2,3,1,3,0,[10,11,13,17,18,19,22,24,26,27,4,7,8,9],[13,17,19,20,3,6,9]],
126       [1,14,19,6,2,3,3,0,[13,2,22,23,26,27,4,5,9],[1,13,17,18,20,6,9,24]],
127       [1,14,18,6,2,2,3,0,[11,13,22,23,24,25,26,27,3,4,5,6,8,9],[1,13,17,20,3,5,6,9]],
128       [1,14,18,1,2,2,3,0,[1,11,13,15,17,2,22,23,26,27,4,9],[1,13,17,18,20,6,9]],
129       [1,14,19,2,3,4,3,0,[10,13,22,26,27,28,29,3,4,5,6,7,8,9,36],[1,13,15,17,18,19,20,5,6,7,8,9]],
130       [1,14,19,6,2,1,2,0,[13,17,21,22,26,27,3,8,9],[13,17,20,6]],
131       [1,15,18,6,4,3,1,0,[10,13,16,17,20,22,25,27],[16,17,3,6,7,8,9]],
132       [1,14,19,4,3,5,3,0,[10,11,13,17,22,24,26,27,28,3,4,5,6,7,8,9],[10,13,15,17,2,20,3,6,7,9]],
133       [1,14,20,6,3,1,2,0,[10,11,17,18,19,22,23,25,26,27,29,8,9],[1,10,13,14,16,17,3,4,6,7,8,9]],
134       [1,15,18,6,3,3,1,0,[13,16,22,26,27,9,23],[13,16,17,20,21,6]],
135       [1,15,18,1,3,4,3,0,[10,13,17,2,22,23,25,26,27,28,29,4,9,12],[13,17,18,20,6,9,5]],
136       [1,21,25,6,2,1,4,0,[30,31,34,35],[6,3]],
137       [1,21,25,6,3,4,4,0,[30,31,34,35],[6,3]],
138       [1,20,25,1,3,3,3,0,[9,10,13,17,18,22,23,26,27,29],[20,18,17,13,8,7,6,5,4]],
139       [1,21,25,6,2,5,4,0,[30,31,34,35],[6,3]],
140       [1,21,25,6,3,3,4,0,[30,31,96,79,34,35],[6,7]],
141       [1,21,25,1,3,4,3,0,[4,9,13,17,18,22,23,25,26,27],[21,20,17,12,11,9,3,2]],
142       [1,21,25,6,2,3,4,0,[30,34],[6,3]],
143       [1,22,25,1,3,4,3,0,[7,9,12,13,22,23,27,28],[20,17,13,9,7,6,2]],
144       [1,21,25,6,3,3,4,0,[30,31,34,35],[6]],
145       [1,20,25,5,4,2,3,0,[2,3,5,8,9,12,13,17,18,21,22,23,24,26,27,28],[21,20,19,18,17,13,10,9,8,7,5,1]],
146       [1,20,25,8,4,4,3,0,[2,3,4,5,6,9,13,22,26,28],[21,20,19,18,17,15,9]],
147       [1,24,25,6,2,2,3,0,[2,3,4,5,6,8,9,11,13,22,23,26,27,29],[20,18,17,13,9,8,7,6]],
148       [1,20,25,4,2,4,3,0,[2,3,5,6,7,8,9,12,13,17,22,26,28],[20,19,17,15,13,10,9,6,5,3,2]],
149       [1,20,25,2,3,5,3,0,[2,3,5,6,7,8,9,10,13,17,22,26,27,28],[20,19,18,17,13,10,9,7,6,1]],
150       [1,20,25,4,3,3,3,0,[2,3,4,6,8,9,13,17,22,23,24,26,27],[20,19,17,13,10,9,7,6,5,3]],
151       [1,20,25,1,3,2,3,0,[3,4,5,6,8,9,10,13,22,23,26,27,28],[20,18,17,15,9,8,6,2]],
152       [1,21,25,2,3,3,4,0,[30,31,34,35],[6,3,7]],
153       [1,21,25,6,3,2,4,0,[30,34],[6,3]],
154       [1,20,25,5,3,2,3,0,[8,9,10,11,13,16,17,21,22,23,24,26,27],[20,19,18,17,13,10,9,7,6,5,1]],
155       [1,20,25,2,2,5,4,0,[30,31,34],[6,3,7]],
156       [1,20,25,4,4,4,3,0,[2,3,4,5,6,8,9,10,13,22,23,26,27],[21,20,19,17,14,13,9,7]],
157       [1,24,25,6,3,3,3,0,[2,3,4,8,9,11,13,15,22,23,26,27,28],[20,18,17,13,9,6,1]],
158       [1,22,25,1,4,4,3,0,[4,11,13,18,22,23,27,28],[21,20,17,9]],
159       [1,21,25,6,2,1,4,0,[30,34,35],[6,3]],
160       [1,20,25,6,4,4,3,0,[9,10,13,17,18,22,23,26,27],[21,20,18,17,14,13,9,8,7,3,1]],
161       [1,24,25,6,3,4,2,0,[9,10,13,17,18,22,23,25,26,27,29],[20,17,16,14,13,9,8,7,3]],
162       [1,20,25,1,3,3,3,0,[2,3,4,8,9,10,11,13,17,22,23,26,27,29],[21,20,18,17,15,14,13,10,9,8,7,5,1]],
163       [1,20,25,1,2,3,3,0,[3,4,8,11,13,17,22,23,26,27,28,29],[20,18,17,13,9,8,7,6]],
164       [1,20,25,5,3,4,3,0,[2,3,4,5,6,13,26,27,28],[21,20,18,17,15,13,10,3,2,1]],
165       [1,20,25,6,4,3,2,0,[10,13,17,18,22,23,25,26,27,29],[17,16,14,13,8,7,3]],
166       [1,21,25,6,2,1,4,0,[30,34,35],[6,3]],
167       [1,21,25,1,3,2,3,0,[2,3,4,8,9,10,13,15,17,19,22,23,24,26,27],[20,18,17,13,8,9,7,6]],
168       [1,20,25,2,3,3,3,0,[11,13,2,21,22,23,24,26,27,28,29,3,4,5,8,9],[1,13,17,18,19,2,20,3,6,7,9]],
169       [1,24,25,6,3,1,3,0,[2,3,4,6,8,9,10,13,16,22,23,26,27],[20,17,13,9,6,5]],
170       [1,20,25,3,3,3,3,0,[3,4,8,9,10,12,13,18,21,22,23,24,26,27,29],[20,17,10,9,8,6,1]],
171       [1,20,25,2,3,1,3,0,[2,4,8,9,12,13,17,22,23,24,26,27,28],[20,19,18,17,13,9,6,1]],
172       [1,20,25,5,4,2,3,0,[2,3,5,6,8,9,10,11,13,17,21,22,23,24,25,26,27],[21,20,17,13,9,3]],
173       [1,24,25,6,3,2,3,0,[2,3,4,8,9,10,13,19,22,23,24,25,26,27,28],[20,18,17,13,10,9,8,7,6,5,3]],
174       [1,21,25,6,2,1,4,0,[30,31,33,34],[6]],
175       [1,20,25,8,3,2,3,0,[3,4,5,8,9,13,17,18,22,23,24,27,28],[20,19,18,17,15,9,6]],
176       [1,21,25,6,4,4,4,0,[30,31,27,10,34],[6,3,7]],
177       [1,21,25,6,4,4,4,0,[30,31,34],[6,3,7]],
178       [1,20,25,1,3,4,2,0,[9,13,17,18,22,23,26,27,29],[20,17,13,9,8,7,6,3]],
179       [1,20,25,7,4,4,3,0,[2,3,4,5,7,9,13,17,18,22,23,26,27,28],[21,20,19,18,17,13,10,9,3,2]],
180       [1,21,25,6,4,4,4,0,[30,31,34],[6,7]],
181       [1,21,25,6,3,3,4,0,[30,31,35],[6,3]],
182       [1,20,25,8,3,4,3,0,[5,6,7,8,9,13,22,26,28],[20,19,18,17,15,13,9,6,2]],
183       [1,21,25,1,2,2,3,0,[3,4,9,11,13,22,23,26,27,28,29],[20,18,17,13,9,6]],
184       [1,20,25,6,3,2,2,0,[9,10,13,17,18,22,23,25,26,27],[20,17,16,14,13,9,8,7,6,3,1]],
185       [1,24,25,6,3,2,3,0,[2,3,4,5,7,8,9,10,11,13,22,23,24,26,27],[20,19,18,17,13,10,9,8,7,6,5,2,1]],
186       [1,20,25,2,3,5,3,0,[29,24,13,4,5,22,23,16,2,28,9,10],[7,13,5,1,15,3,9,6,17]],
187       [1,20,25,4,3,2,3,0,[2,3,4,5,6,8,9,12,13,17,19,22,23,24,26,27,28],[20,19,17,13,9]],
188       [1,20,25,5,4,3,3,0,[3,4,5,8,9,10,13,17,21,22,23,26,27],[21,20,19,18,17,13,10,9,7,2]],
189       [1,20,25,4,4,4,3,0,[2,3,4,5,6,8,9,10,13,17,18,22,23,26,27,28],[21,20,19,17,15,14,9,7,3,2]],
190       [1,21,25,6,3,3,4,0,[30,31,10,34],[6,3,7]],
191       [1,20,25,6,2,3,3,0,[1,4,6,9,13,17,22,23,26,27,28],[20,18,17,13,9,6]],
192       [1,21,25,6,2,2,2,0,[8,9,10,11,13,17,18,22,23,25,26,27,29],[17,16,13,9,8,6,3,1]],
193       [1,21,25,6,3,4,4,0,[30,32,33,27,34],[6,7]],
194       [1,20,25,3,4,3,3,0,[2,4,7,8,9,10,12,13,21,22,23,26,27],[20,17,13,9,8,6,1]],
195       [1,20,25,6,2,3,3,0,[],[20,18,17,13,9,6,1]],
196       [1,20,25,2,3,1,3,0,[4,7,8,9,10,11,13,17,18,19,22,24,26,27],[20,19,17,13,9,6,3]],
197       [1,20,25,5,3,2,4,0,[30,31,96],[6,3,7]],
198       [1,20,25,2,3,4,3,0,[3,4,5,6,7,8,9,10,13,22,26,27,28,29],[20,19,18,17,13,9,8,7,6,5,1]],
199       [1,21,25,6,3,3,4,0,[30,31,27,10,34],[6,7]],
200       [1,21,25,4,3,2,3,0,[3,4,5,6,8,9,10,11,13,18,19,22,23,26,27],[20,17,13,9]],
201       [1,21,25,6,4,3,4,0,[30,31,27,10,35],[6,7]],
202       [1,21,25,6,2,2,4,0,[30,34],[6,3]],
203       [1,24,25,6,2,1,2,0,[3,8,9,13,17,21,22,26,27],[20,17,13,6]],
204       [1,20,25,4,3,5,3,0,[3,4,5,6,7,8,9,10,11,13,17,22,24,26,27,28],[20,17,15,13,10,9,7,6,3,2]],
205       [1,20,26,6,4,3,4,0,[30,31,27,10,34,35],[6,3,7]],
206       [1,21,25,6,2,3,4,0,[30,33,34],[6]],
207       [1,21,25,6,3,1,2,0,[8,9,10,11,17,18,19,22,23,25,26,27,29],[17,16,14,13,10,9,8,7,6,4,3,1]],
208       [1,21,25,6,4,4,4,0,[30,31,10,34,35],[6,7]],
209       [1,21,25,6,3,2,4,0,[30,31,33,34],[6,3]],
210       [1,21,26,6,3,5,4,0,[30,31],[6,3]],
211       [1,21,25,6,2,1,4,0,[30,34,35],[6,3]],
212       [1,21,25,6,3,3,4,0,[30,34],[6]],
213       [1,20,25,8,2,2,3,0,[3,4,5,6,8,9,13,16,21,22,23,24,26,27],[20,17,15,9,6,3]],
214       [1,20,25,5,3,4,3,0,[2,3,4,5,6,8,9,12,13,26,27,28],[21,20,18,17,13,10,3,2]],
215       [1,20,25,5,4,2,3,0,[3,4,6,8,9,10,17,21,22,23,24,26,27,28],[21,20,19,17,14,13,10,9,8,7,3,1]],
216       [1,13,19,6,2,3,3,0,[2,3,13,22,19,8,9,12,27],[9,6,17,20]],
217       [1,15,18,2,3,3,1,0,[25,24,13,16,19,8,9,10,17,22,29,23],[16,8,3,21,17,19]],
218       [1,14,19,2,3,3,3,0,[13,2,21,22,23,24,26,27,28,29,3,4,5,8,9,17],[1,13,17,18,19,2,20,3,6,7,9]],
219       [1,15,18,6,4,4,1,0,[29,16,17,22,27,10],[16,8,3,14,7]],
220       [1,14,20,6,3,4,3,0,[3,4,2,5,13,22,23,27,8,9],[20,7,8,2,9,21,17]],
221       [1,14,19,2,3,5,3,0,[29,24,13,4,5,22,23,16,2,28,9,10],[7,13,5,1,15,3,9,6,17]],
222       [1,15,18,6,3,2,1,0,[25,13,22,23,17,29,16,9],[16,21,17,20]],
223       [1,24,25,6,2,3,3,0,[],[]],
224       [1,21,25,1,2,5,3,0,[],[]],
225       [1,21,25,6,3,4,3,0,[],[]]
226    ];
227
228    var nbVillages = V.length;
229
230    for (i=0; i<nbVillages; i++) {
231        if ((((mois   == 0) && (1==V[i][0])) || ((mois >= V[i][1]) && (mois <= V[i][2]))) &&
232            ((region  == 0)                  || (region  == V[i][3]                    )) &&
233            ((confort == 0)                  || (confort == V[i][4]                    )) &&
234            ((encadrement == 0)                                               ||
235             ((encadrement==3)&&((V[i][5]==1)||(V[i][5]==2)||(V[i][5] == 3))) ||
236             ((encadrement==2)&&((V[i][5]==1)||(V[i][5]==2)                )) ||
237             ((encadrement==1)&&(encadrement==V[i][5])                      ) ||
238             ((encadrement>3)&&(encadrement==V[i][5])                       )) &&
239            ((typeVillage == 0) || (typeVillage == V[i][6]                ))   &&
240            ((budget == 0)      || (budget      == V[i][7]                ))) {
241
242            bl = 1;
243            if ((sport1 != 0) || (sport2 != 0) || (sport3 != 0)) {
244                bl = 0;
245                liste  = V[i][8];
246                taille = liste.length;
247                for (j=0; j<taille; j++) {
248                    if ((sport1 == 0) || ((sport1 != 0) && (sport1 == liste[j]))) {
249                        bl = 1;
250                        break;
251                    }
252                }
253                if (bl == 1) {
254                    bl = 0;
255                    for (j=0; j<taille; j++) {
256                        if ((sport2 == 0) || ((sport2 != 0) && (sport2 == liste[j]))) {
257                            bl = 1;
258                            break;
259                        }
260                    }
261                }
262                if (bl == 1) {
263                    bl = 0;
264                    for (j=0; j<taille; j++) {
265                        if ((sport3 == 0) || ((sport3 != 0) && (sport3 == liste[j]))) {
266                            bl = 1;
267                            break;
268                        }
269                    }
270                }
271            }
272            if ((bl==1) && ((activite1 != 0) || (activite2 != 0) || (activite3 != 0))) {
273                bl = 0;
274                liste  = V[i][9];
275                taille = liste.length;
276                for (j=0; j<taille; j++) {
277                    if ((activite1 == 0) || ((activite1 != 0) && (activite1 == liste[j]))) {
278                        bl = 1;
279                        break;
280                    }
281                }
282                if (bl == 1) {
283                    bl = 0;
284                    for (j=0; j<taille; j++) {
285                        if ((activite2 == 0) || ((activite2 != 0) && (activite2 == liste[j]))) {
286                            bl = 1;
287                            break;
288                        }
289                    }
290                }
291                if (bl == 1) {
292                    bl = 0;
293                    for (j=0; j<taille; j++) {
294                        if ((activite3 == 0) || ((activite3 != 0) && (activite3 == liste[j]))) {
295                            bl = 1;
296                            break;
297                        }
298                    }
299                }
300            }
301            if (1 == bl) {
302                ret++;
303            }
304        }
305    }
306}
307