TP = new Array(); TPA = new Array(); TPA[0]="Afghanistan"; TPA[1]="Albania"; TPA[2]="Algeria"; TPA[3]="America Samoa"; TPA[4]="Andora"; TPA[5]="Angola"; TPA[6]="Anguilla"; TPA[7]="Antartica"; TPA[8]="Antigua and Barbuda"; TPA[9]="Argentina"; TPA[10]="Armenia"; TPA[11]="Aruba"; TPA[12]="Australia"; TPA[13]="Austria"; TPA[14]="Azerbaijan"; TPA[15]="Bahamas"; TPA[16]="Bahrain"; TPA[17]="Bangladesh"; TPA[18]="Barbados"; TPA[19]="Belarus"; TPA[20]="Belgium"; TPA[21]="Belize"; TPA[22]="Benin"; TPA[23]="Bermuda"; TPA[24]="Bolivia"; TPA[25]="Bosnia and Herzegovina"; TPA[26]="Botswana"; TPA[27]="Bouvet Island"; TPA[28]="Brazil"; TPA[29]="British Indian ocean territory"; TPA[30]="Brunei Darussalam"; TPA[31]="Bulgaria"; TPA[32]="Burkina Faso"; TPA[33]="Burundi"; TPA[34]="Buthan"; TPA[35]="Cambodia"; TPA[36]="Cameroon"; TPA[37]="Canada"; TP[0]="37|Alberta"; TP[1]="37|British Columbia"; TP[2]="37|Manitoba"; TP[3]="37|New Brunswick"; TP[4]="37|Newfoundland"; TP[5]="37|Northwest Terr. "; TP[6]="37|Nova Scotia "; TP[7]="37|Nunavut"; TP[8]="37|Ontario"; TP[9]="37|Prince Edward Isl."; TP[10]="37|Quebec"; TP[11]="37|Saskatchewan"; TP[12]="37|Yukon"; TPA[38]="Cape Verde"; TPA[39]="Cayman Islands"; TPA[40]="Central African republic"; TPA[41]="Chad"; TPA[42]="Chile"; TPA[43]="China"; TPA[44]="Christmas Island"; TPA[45]="Cocos (keeling) Island"; TPA[46]="Colombia"; TPA[47]="Comoros"; TPA[48]="Congo, The Democratic republic of the"; TPA[49]="Cook Island"; TPA[50]="Costa Rica"; TPA[51]="Cote d'ivoire"; TPA[52]="Croatia (local name : Hrvatska)"; TPA[53]="Cuba"; TPA[54]="Cyprus"; TPA[55]="Czech Republic"; TPA[56]="Denmark"; TPA[57]="Djibouti"; TPA[58]="Dominica"; TPA[59]="Dominican Republic"; TPA[60]="East Timor"; TPA[61]="Ecuador"; TPA[62]="Egypt"; TPA[63]="El Savador"; TPA[64]="equatorial Guinea"; TPA[65]="Eritrea"; TPA[66]="Estonia"; TPA[67]="Ethopia"; TPA[68]="Falkland Island (Mavinas)"; TPA[69]="Faroe Island"; TPA[70]="Fiji"; TPA[71]="Finland"; TPA[72]="France"; TPA[73]="France Metropolitan"; TPA[74]="French Guiana"; TPA[75]="French Polynesia"; TPA[76]="French Southern Territories"; TPA[77]="Gabon"; TPA[78]="Gambia"; TPA[79]="Georgia"; TPA[80]="Germany"; TPA[81]="Ghana"; TPA[82]="Gibraltar"; TPA[83]="Greece"; TPA[84]="Greenland"; TPA[85]="Grenada"; TPA[86]="Guadeloupe"; TPA[87]="Guam"; TPA[88]="Guatemala"; TPA[89]="Guinea"; TPA[90]="Guinea-Bissau"; TPA[91]="Guyana"; TPA[92]="Haiti"; TPA[93]="Heard and Mcdonald Island"; TPA[94]="Honduras"; TPA[95]="Hong kong"; TPA[96]="Hungary"; TPA[97]="Iceland"; TPA[98]="India"; TPA[99]="Indonesia"; TPA[100]="Iran (Islamic Republic of)"; TPA[101]="Iraq"; TPA[102]="Ireland"; TPA[103]="Israel"; TPA[104]="Italy"; TPA[105]="Jamaica"; TPA[106]="Japan"; TPA[107]="Jordan"; TPA[108]="Kazakhstan"; TPA[109]="Kenya"; TPA[110]="Kiribati"; TPA[111]="Korea, Democratic people's Republic of"; TPA[112]="Korea, Republic of"; TPA[113]="Kuwait"; TPA[114]="Kyrgyzstan"; TPA[115]="Lao people's democratic Republic"; TPA[116]="Latvia"; TPA[117]="Lebanon"; TPA[118]="Lesotho"; TPA[119]="Liberia"; TPA[120]="Libyan Arab Jamahiriya"; TPA[121]="Liechtenstein"; TPA[122]="Lithuania"; TPA[123]="Luxembourg"; TPA[124]="Macau"; TPA[125]="Macedonia, The Former Yugoslav Republic of"; TPA[126]="Madagascar"; TPA[127]="Malawi"; TPA[128]="Malaysia"; TPA[129]="Maldives"; TPA[130]="Mali"; TPA[131]="Malta"; TPA[132]="Marshall Island"; TPA[133]="Martinique"; TPA[134]="Mauritania"; TPA[135]="Mauritius"; TPA[136]="Mayotte"; TPA[137]="Mexico"; TPA[138]="Micronesia, Federated States of"; TPA[139]="Moldova, Republic of"; TPA[140]="Monaco"; TPA[141]="Mongolia"; TPA[142]="Montserrat"; TPA[143]="Morocco"; TPA[144]="Mozambique"; TPA[145]="Myanmar"; TPA[146]="Namibia"; TPA[147]="Nauru"; TPA[148]="Nepal"; TPA[149]="Netherlands"; TPA[150]="Netherlands Antilles"; TPA[151]="New Caledonia"; TPA[152]="New Zealand"; TPA[153]="Nicaragua"; TPA[154]="Niger"; TPA[155]="Nigeria"; TPA[156]="Niue"; TPA[157]="Norfolk island"; TPA[158]="Northern Mariana Island"; TPA[159]="Norway"; TPA[160]="Oman"; TPA[161]="Pakistan"; TPA[162]="Palau"; TPA[163]="Palestinian Authority"; TPA[164]="Panama"; TPA[165]="Papua New Guinea"; TPA[166]="Paraguay"; TPA[167]="Peru"; TPA[168]="Philippines"; TPA[169]="Pitcairn"; TPA[170]="Poland"; TPA[171]="Portugal"; TPA[172]="Puerto Rico"; TPA[173]="Qatar"; TPA[174]="Reunion"; TPA[175]="Romania"; TPA[176]="Russian Federation"; TPA[177]="Rwanda"; TPA[178]="Saint Kitts and Nevis"; TPA[179]="Saint Lucia"; TPA[180]="Saint Vincent and The Grenadines"; TPA[181]="Samoa"; TPA[182]="San Marino"; TPA[183]="Sao Tome and Principe"; TPA[184]="saudi Arabia"; TPA[185]="Senegal"; TPA[186]="Seychelles"; TPA[187]="Sierra Leone"; TPA[188]="Singapore"; TPA[189]="Slovakia (Slovak Republic)"; TPA[190]="Slovenia"; TPA[191]="Solomon Island"; TPA[192]="Somalia"; TPA[193]="South Africa"; TPA[194]="South Georgia and The South sandwich Island"; TPA[195]="Spain"; TPA[196]="Sri Lanka"; TPA[197]="St. Helena"; TPA[198]="St. Pierre and Miquelon"; TPA[199]="Sudan"; TPA[200]="Suriname"; TPA[201]="Svalbard and Jan mayen island"; TPA[202]="Swaziland"; TPA[203]="Sweden"; TPA[204]="Switzerland"; TPA[205]="Syrian Arab Republic"; TPA[206]="Taiwan, Republic of China"; TPA[207]="Tajikistan"; TPA[208]="Tanzania, United Republic of"; TPA[209]="Thailand"; TPA[210]="Togo"; TPA[211]="Tokelau"; TPA[212]="Tonga"; TPA[213]="Trinidad and Tobago"; TPA[214]="Tunesia"; TPA[215]="Turkey"; TPA[216]="Turkmenistan"; TPA[217]="Turks and Caicos Island"; TPA[218]="Tuvalu"; TPA[219]="Uganda"; TPA[220]="Ukraine"; TPA[221]="United Arab Emirates"; TPA[222]="United Kingdom"; TPA[223]="United States"; TP[13]="223|Alabama"; TP[14]="223|Alaska"; TP[15]="223|Arizona"; TP[16]="223|Arkansas"; TP[17]="223|California"; TP[18]="223|Colorado"; TP[19]="223|Connecticut"; TP[20]="223|D.C."; TP[21]="223|Delaware"; TP[22]="223|Florida"; TP[23]="223|Georgia"; TP[24]="223|Hawaii"; TP[25]="223|Idaho"; TP[26]="223|Illinois"; TP[27]="223|Indiana"; TP[28]="223|Iowa"; TP[29]="223|Kansas"; TP[30]="223|Kentucky"; TP[31]="223|Louisiana"; TP[32]="223|Maine"; TP[33]="223|Maryland"; TP[34]="223|Massachusetts"; TP[35]="223|Michigan"; TP[36]="223|Minnesota"; TP[37]="223|Mississippi"; TP[38]="223|Missouri"; TP[39]="223|Montana"; TP[40]="223|Nebraska"; TP[41]="223|Nevada"; TP[42]="223|New Hampshire"; TP[43]="223|New Jersey"; TP[44]="223|New Mexico"; TP[45]="223|New York"; TP[46]="223|North Carolina"; TP[47]="223|North Dakota "; TP[48]="223|Ohio"; TP[49]="223|Oklahoma"; TP[50]="223|Oregon"; TP[51]="223|Pennsylvania"; TP[52]="223|Rhode Island"; TP[53]="223|South Carolina"; TP[54]="223|South Dakota "; TP[55]="223|Tennessee"; TP[56]="223|Texas"; TP[57]="223|Utah"; TP[58]="223|Vermont"; TP[59]="223|Virginia"; TP[60]="223|Washington"; TP[61]="223|West Virginia"; TP[62]="223|Wisconsin"; TP[63]="223|Wyoming"; TPA[224]="United States Minor Outlying Island"; TPA[225]="Uruguay"; TPA[226]="Uzbekistan"; TPA[227]="Vanuatu"; TPA[228]="Vatican City State (Holy see)"; TPA[229]="Venezuela"; TPA[230]="Viet Nam"; TPA[231]="Virgin Island (British)"; TPA[232]="Virgin Island (U.S)"; TPA[233]="Wallis and Futuna Island"; TPA[234]="Western Sahara"; TPA[235]="Yemen"; TPA[236]="Yugoslavia"; TPA[237]="Zambia"; TPA[238]="Zimbabwe"; function MAJPays(pays){ nbOptions = pays.length; for (i=0; i < nbOptions; i++) pays[0] = null; for (i=0; i=1 && jour>=1); return t_tempo; } function bisx(quoi) { if ((quoi % 100 == 0) && (quoi % 400 == 0)) return true; else if ((quoi % 4) == 0) return true; return false; } function DateAdd(startDate, numDays, numMonths, numYears) { var returnDate = new Date(startDate.getTime()); var yearsToAdd = numYears; var month = returnDate.getMonth() + numMonths; if (month > 11) { yearsToAdd = Math.floor((month+1)/12); month -= 12*yearsToAdd; yearsToAdd += numYears; } returnDate.setMonth(month); returnDate.setFullYear(returnDate.getFullYear() + yearsToAdd); returnDate.setTime(returnDate.getTime()+60000*60*24*numDays); return returnDate; } function YearAdd(startDate, numYears) { return DateAdd(startDate,0,0,numYears); } function MonthAdd(startDate, numMonths) { return DateAdd(startDate,0,numMonths,0); } function DayAdd(startDate, numDays) { return DateAdd(startDate,numDays,0,0); } function DateDiff(date1, date2) { diff = new Date(); diff.setTime(Math.abs(date1.getTime() - date2.getTime())); timediff = diff.getTime(); days = Math.floor(timediff / (1000 * 60 * 60 * 24)); timediff -= days * (1000 * 60 * 60 * 24); return days; } function PopulerJours(mois, jour, annee) { var vieuxJourSelectionne = jour.selectedIndex; nbOptions = jour.length; for (i=0; i < nbOptions; i++) jour[0] = null; var nbJours = 0; switch (mois) { case '01' : nbJours = 31; break; case '02' : if ((annee % 4) == 0) if (((annee % 100) == 0) && ((annee % 400) == 0)) nbJours = 29; else if ((annee % 100) == 0) nbJours = 28; else nbJours = 29; else nbJours = 28; break; case '03' : nbJours = 31; break; case '04' : nbJours = 30; break; case '05' : nbJours = 31; break; case '06' : nbJours = 30; break; case '07' : nbJours = 31; break; case '08' : nbJours = 31; break; case '09' : nbJours = 30; break; case '10' : nbJours = 31; break; case '11' : nbJours = 30; break; case '12' : nbJours = 31; break; default : nbJours = 31; break; } var i = 1; while (i <= nbJours) { if (i < 10) nouvelleOption = new Option('0' + i, '0' + i); else nouvelleOption = new Option(i, i); jour.options[(i - 1)] = nouvelleOption; i++; } if (vieuxJourSelectionne >= jour.length) jour[(jour.length - 1)].selected = true; else jour[vieuxJourSelectionne].selected = true; } function OuvrirTelechargement(langue) { WindowTelechargement = open('fenetreTelechargement'+langue+'.cfm', 'Telechargement', 'scrollbars=no,statusbar=no,menubar=no,' + StringGrandeur(423,230)); } function StringGrandeur (width, height) { var string = 'width=' + width + ',height=' + height + ',left=' + ((screen.width - width) / 2) + ',top=' + ((screen.height - height) / 2) + ',screenX=' + ((screen.width - width) / 2) + ',screenY=' + ((screen.height - height) / 2); return string; } function NumberFormat(num) { this.COMMA = ','; this.PERIOD = '.'; this.DASH = '-'; this.LEFT_PAREN = '('; this.RIGHT_PAREN = ')'; this.LEFT_OUTSIDE = 0; this.LEFT_INSIDE = 1; this.RIGHT_INSIDE = 2; this.RIGHT_OUTSIDE = 3; this.LEFT_DASH = 0; this.RIGHT_DASH = 1; this.PARENTHESIS = 2; this.num; this.numOriginal; this.hasSeparators = false; this.separatorValue; this.inputDecimalValue; this.decimalValue; this.negativeFormat; this.negativeRed; this.hasCurrency; this.currencyPosition; this.currencyValue; this.places; this.setNumber = setNumberNF; this.toUnformatted = toUnformattedNF; this.setInputDecimal = setInputDecimalNF; this.setSeparators = setSeparatorsNF; this.setCommas = setCommasNF; this.setNegativeFormat = setNegativeFormatNF; this.setNegativeRed = setNegativeRedNF; this.setCurrency = setCurrencyNF; this.setCurrencyPrefix = setCurrencyPrefixNF; this.setCurrencyValue = setCurrencyValueNF; this.setCurrencyPosition = setCurrencyPositionNF; this.setPlaces = setPlacesNF; this.toFormatted = toFormattedNF; this.toPercentage = toPercentageNF; this.getOriginal = getOriginalNF; this.getRounded = getRoundedNF; this.preserveZeros = preserveZerosNF; this.justNumber = justNumberNF; this.setInputDecimal(this.PERIOD); this.setNumber(num); this.setCommas(true); this.setNegativeFormat(this.LEFT_DASH); this.setNegativeRed(false); this.setCurrency(true); this.setCurrencyPrefix('$'); this.setPlaces(2); } function setInputDecimalNF(val) { this.inputDecimalValue = val; } function setNumberNF(num) { this.numOriginal = num; this.num = this.justNumber(num); } function toUnformattedNF() { return (this.num); } function getOriginalNF() { return (this.numOriginal); } function setNegativeFormatNF(format) { this.negativeFormat = format; } function setNegativeRedNF(isRed) { this.negativeRed = isRed; } function setSeparatorsNF(isC, separator, decimal) { this.hasSeparators = isC; if (separator == null) separator = this.COMMA; if (decimal == null) decimal = this.PERIOD; if (separator == decimal) { this.decimalValue = (decimal == this.PERIOD) ? this.COMMA : this.PERIOD; } else { this.decimalValue = decimal; } this.separatorValue = separator; } function setCommasNF(isC) { this.setSeparators(isC, this.COMMA, this.PERIOD); } function setCurrencyNF(isC) { this.hasCurrency = isC; } function setCurrencyValueNF(val) { this.currencyValue = val; } function setCurrencyPrefixNF(cp) { this.setCurrencyValue(cp); this.setCurrencyPosition(this.LEFT_OUTSIDE); } function setCurrencyPositionNF(cp) { this.currencyPosition = cp } function setPlacesNF(p) { this.places = p; } function toFormattedNF() { var pos; var nNum = this.num; var nStr; var splitString = new Array(2); nNum = this.getRounded(nNum); nStr = this.preserveZeros(Math.abs(nNum)); if (nStr.indexOf(this.PERIOD) == -1) { splitString[0] = nStr; splitString[1] = ''; } else { splitString = nStr.split(this.PERIOD, 2); } if (this.hasSeparators) { pos = splitString[0].length; while (pos > 0) { pos -= 3; if (pos <= 0) break; splitString[0] = splitString[0].substring(0,pos) + this.separatorValue + splitString[0].substring(pos, splitString[0].length); } } if (splitString[1].length > 0) { nStr = splitString[0] + this.decimalValue + splitString[1]; } else { nStr = splitString[0]; } var c0 = ''; var n0 = ''; var c1 = ''; var n1 = ''; var n2 = ''; var c2 = ''; var n3 = ''; var c3 = ''; var negSignL = (this.negativeFormat == this.PARENTHESIS) ? this.LEFT_PAREN : this.DASH; var negSignR = (this.negativeFormat == this.PARENTHESIS) ? this.RIGHT_PAREN : this.DASH; if (this.currencyPosition == this.LEFT_OUTSIDE) { if (nNum < 0) { if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n1 = negSignL; if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n2 = negSignR; } if (this.hasCurrency) c0 = this.currencyValue; } else if (this.currencyPosition == this.LEFT_INSIDE) { if (nNum < 0) { if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n0 = negSignL; if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n3 = negSignR; } if (this.hasCurrency) c1 = this.currencyValue; } else if (this.currencyPosition == this.RIGHT_INSIDE) { if (nNum < 0) { if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n0 = negSignL; if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n3 = negSignR; } if (this.hasCurrency) c2 = this.currencyValue; } else if (this.currencyPosition == this.RIGHT_OUTSIDE) { if (nNum < 0) { if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n1 = negSignL; if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n2 = negSignR; } if (this.hasCurrency) c3 = this.currencyValue; } nStr = c0 + n0 + c1 + n1 + nStr + n2 + c2 + n3 + c3; if (this.negativeRed && nNum < 0) { nStr = '' + nStr + ''; } return (nStr); } function toPercentageNF() { nNum = this.num * 100; nNum = this.getRounded(nNum); return nNum + '%'; } function getRoundedNF(val) { var factor; var i; factor = 1; for (i=0; i max) { champ.value = champ.value.substring(0,max); if (langue == "_ang") alert("Your message has exceeded the maximum length for sending a page and has been automatically truncated to "+max+" characters."); else alert("Votre message dépasse le nombre de caractères permis et a été réduit à "+max+" caractères."); } } // Utilisé pour empêcher les double-clicks... var estEnvoye; estEnvoye=false;