var nDownloadImgTimeout = 5; 
var nFaddingIntrvl   = 1;         
var nFaddingImg    = 10;         
var nFaddingTime   = 1000 * nFaddingIntrvl / nFaddingImg; 
var nFaddingStep   = 100 / nFaddingImg;     
var nTimeForNextSequence = 5;         
var nInfoMinSpeed = 2;    
var nInfoMaxSpeed = 14;    
var nInfoSpeed  = nInfoMinSpeed; 
var nInfoMarge  = 5;    
var bFixedOrder  = false;
window.onload = function Window_onLoad() { 
try{
if (window.bActivMonitoring) profilerData.postData(); 
putTime(); 
} catch(e) {}       
}
function globalTimeoutExpired() {
try{ 
var aDocImage = window.document.images; 
for( var i = 0; i<aDocImage.length; i++ ) {
var hImg = aDocImage[i];
if (  hImg.complete == false ) {
stopDownloadTimer(hImg);  
}
}
return true;
} catch (e){}
}
function stopDownloadTimer(hImg) {
try{
if ( hImg.complete == false ){
if (hImg.lowsrc) hImg.src = hImg.lowsrc;
else hImg.src = "http://static.hp.fti.net/I/z.gif";
}
if (hImg.clockId) clearTimeout(hImg.clockId);
hImg.clockId = null;
return true;
} catch (e) {}
}
function startDownloadTimers() {
try{
var aDocImg = window.document.images;
for( var i=0; i<aDocImg.length; i++ ) {
var hImg = aDocImg[i];
if ( hImg.id && hImg.attributes["timeout"] && hImg.complete == false ) {
var nTimeout = hImg.attributes["timeout"].value * 1; 
hImg.clockId = setTimeout( "stopDownloadTimer( o_hGetById('" + hImg.id + "') );", nTimeout * 1000 );
}
}
setTimeout( "globalTimeoutExpired();", nDownloadImgTimeout * 1000 ); 
return true;
} catch (e){}
}
function startJsDownloadTimer(iScript,nTimeout){
try{
window.scriptClockId = window.setTimeout( "stopJavascriptDownload( '" + iScript + "', true );", nTimeout*1000 );
return true;
} catch (e) {}
}
function stopJsDownload(iScript,bAutoClose ) {
try{
if ( bAutoClose == null ) { 
if ( window.scriptClockId != null ) window.clearTimeout( window.scriptClockId ); 
} else { 
var hScript = o_hGetById(iScript); 
hScript.src = "/Js/Nothing.js"; 
} 
window.scriptClockId = null; 
return true;
} catch(e){}
} 
function movePub(){
if (typeof bPubHab == 'undefined' || !bPubHab){
if (document.getElementById('o_carrepubtmp')){
document.getElementById('o_carrepub').innerHTML = document.getElementById('o_carrepubtmp').innerHTML;
document.getElementById('o_carrepubtmp').parentNode.removeChild(document.getElementById('o_carrepubtmp'));
}
}
}
function initUrlReferrer(){
try{
if (! window.sUrlReferrer ) sUrlReferrer ="W3ACC"; 
var nHour = (new Date()).getHours();    
var sPeriod = '0003';
if  ( nHour <= 3 ) sPeriod = '0003'; 
else if ( nHour <= 6 ) sPeriod = '0306'; 
else if ( nHour <= 9 ) sPeriod = '0609'; 
else if ( nHour <= 12) sPeriod = '0912'; 
else if ( nHour <= 15) sPeriod = '1215'; 
else if ( nHour <= 18) sPeriod = '1518'; 
else if ( nHour <= 21) sPeriod = '1821'; 
else      sPeriod = '2124'; 
sUrlReferrer = sUrlReferrer +'_'+ sPeriod ;
return true;
} catch (e){}
}
function vider(hElt,sTxtDefault){
if (hElt.value == sTxtDefault) hElt.value = '';
}
function remplir(hElt,sTxt){
if (hElt.value == '')  hElt.value = sTxt;
}
function firstNode(hElement){
var hFirstNode = hElement.firstChild;
while (hFirstNode.nodeType != 1) hFirstNode = hFirstNode.nextSibling;
return hFirstNode;
}
function lastNode(hElement){
var hLastNode = hElement.lastChild;
while (hLastNode.nodeType != 1) hLastNode = hLastNode.previousSibling;
return hLastNode;
}
function displayErr(oError) {
try{
alert ( "erreur js : "+ oError.description +
"\n message : " + oError.message +
"\n nom : " + oError.name +
"\n # : " + oError.number);
return true;
} catch( e ) { } 
}
function i2h(iElt) {
try{
handler = (document.getElementById(iElt))?document.getElementById(iElt):false;
return handler;
} catch( e ) { } 
}
function addSelectOption(hSel,nPos,sTitle,sVal) {
try{
hSel.options[nPos] = new Option(sTitle, sVal);
return true;
} catch( e ) { } 
}
function infoMoveDown(iContenu){
try{
var hContenu = o_hGetById(iContenu);
var hContainer = hContenu.parentNode;
var iHauteurMax = hContenu.offsetHeight;
var iHauteurMin = hContainer.offsetHeight-nInfoMarge; 
if ((iHauteurMax + parseInt(hContenu.style.top) - nInfoSpeed) > iHauteurMin){
var iDeplacement = parseInt(hContenu.style.top) - nInfoSpeed;
hContenu.style.top = iDeplacement+"px";
} else hContenu.style.top = (iHauteurMin - iHauteurMax) + "px";
hInfoMoveDown = setTimeout("infoMoveDown('"+iContenu+"')",100);
return true;
} catch(e) {}
}
function infoMoveUp(iContenu){
try{
var hContenu = o_hGetById(iContenu);
if (parseInt(hContenu.style.top) + nInfoSpeed < 0){
var iDeplacement = parseInt(hContenu.style.top) + nInfoSpeed;
hContenu.style.top = iDeplacement+"px";
} else hContenu.style.top = "0px";
hInfoMoveUp = setTimeout("infoMoveUp('"+iContenu+"')",100);
return true;
} catch(e) {}
}
function changeOpacity(hNode,nOpacity ){
try{
hNode.style.filter   = "alpha(opacity=" + nOpacity + ")";  
hNode.style.MozOpacity  = nOpacity / 100;      
hNode.style.KHTMLOpacity = nOpacity / 100;      
hNode.style.opacity   = nOpacity / 100;      
return true;
} catch(e){}
}
function Fadding( hFaddingImg, hCallBackFct) {
try { window.clearInterval( window.currentFadding.hFaddingTimeout ); } catch( e ) { } 
window.currentFadding = this;
this.hcallbackFunction = hCallBackFct;  
this.hFaddingImg = hFaddingImg;    
this.nOpacityRate = 100;     
this.hFaddingTimeout = window.setInterval( "window.currentFadding.nextStep()", nFaddingTime );
this.nextStep = function Fadding_nextStep() {
this.nOpacityRate -= nFaddingStep;
if ( this.nOpacityRate < 0 ) this.nOpacityRate = 0;
changeOpacity(this.hFaddingImg, this.nOpacityRate);
if ( this.nOpacityRate == 0 ) {
window.clearInterval( window.currentFadding.hFaddingTimeout ); 
if ( this.hcallbackFunction != null ) this.hcallbackFunction();
}
return true;
}
}
function faddingEnd(){
o_hGetById('imagePrinc').src = o_hGetById('imageSec').src;
o_hGetById('imagePrinc').title = o_hGetById('imageSec').title;
o_hGetById('imagePrinc').alt = o_hGetById('imageSec').alt;
if (typeof document.body.style.maxHeight != "undefined"){
setTimeout("changeOpacity(o_hGetById('imagePrinc'), 100)",100); 
}
}
function ScreenPlayerv2(nIdPublication) {
this.aSequence   = new Array();    
this.aPoids    = new Array();    
this.aJamaisVu   = new Array();    
this.nCurrentSequence = 0;      
this.nIdPublication  = parseInt(nIdPublication); 
this.addSequence = function ScreenPlayerv2_addSequence(iSequence,nPoids) {
try{
this.aSequence[this.aSequence.length] = iSequence;
if (nPoids) this.aPoids[this.aPoids.length] = parseInt(nPoids);
else this.aPoids[this.aPoids.length] = 1;
o_hGetById(iSequence).style.display = 'none'; 
return true;
} catch( e ) { } 
}
this.prevSequence = function ScreenPlayerv2_getPreviousSequence() {
try{
if ((--this.nCurrentSequence) == -1) this.nCurrentSequence = this.aSequence.length-1;
this.display();
return true;
} catch( e ) { } 
}
this.nextSequence = function ScreenPlayerv2_getNextSequence() {
try{
if ((++this.nCurrentSequence) == this.aSequence.length) this.nCurrentSequence = 0;
this.display();
return true;
} catch( e ) { } 
}
this.display = function ScreenPlayerv2_display(){
if (this.aSequence.length == 0) {
alert("You must add sequences to the ScreenPlayer");
throw true;
}
var iSequence = this.aSequence[this.nCurrentSequence];
if (o_hGetById(iSequence)){
changeOpacity(o_hGetById('imagePrinc'), 100); 
o_hGetById('imageSec').src = firstNode(firstNode(o_hGetById(iSequence))).src;
o_hGetById('imageSec').title = firstNode(firstNode(o_hGetById(iSequence))).title;
o_hGetById('imageSec').alt = firstNode(firstNode(o_hGetById(iSequence))).alt;
new Fadding(o_hGetById('imagePrinc'),faddingEnd);
o_hGetById('lienImgManchette').href  = o_changeOneUrl(firstNode(o_hGetById(iSequence)).href,"manchette");
o_hGetById('lienImgManchette').target = firstNode(o_hGetById(iSequence)).target;
if (lastNode(o_hGetById(iSequence)).nodeName == "DIV"){
o_hGetById('lienTxtManchette').href  = o_changeOneUrl(lastNode(lastNode(o_hGetById(iSequence))).href,"manchette");
o_hGetById('lienTxtManchette').target = lastNode(lastNode(o_hGetById(iSequence))).target;
o_hGetById('lienTxtManchette').innerHTML = lastNode(lastNode(o_hGetById(iSequence))).innerHTML;
} else {
if (o_hGetById('lienTxtManchette')) o_hGetById('lienTxtManchette').parentNode.removeChild(o_hGetById('lienTxtManchette'));
}
o_bSetCookie("lastSequence", this.nCurrentSequence); 
if (this.aSequence.length > 1) this.launchTimer();  
}
}
this.launchTimer = function ScreenPlayer_launchTimer() {
try{
if (nTimeForNextSequence > 0) {
if (this.clockId) window.clearInterval(this.clockId); 
this.clockId = window.setInterval("oScreenPlayer.nextSequence()", nTimeForNextSequence * 1000); 
}
return true;
} catch( e ) { }
}
this.findSequence = function ScreenPlayerv2_findSequence() {
var sDejaAffiche = "";
sCookieManchette = o_sGetCookie('manchette');
if (sCookieManchette) {
var aCookie = sCookieManchette.split(":");
var iPublication = parseInt(aCookie[0]);
if (iPublication == this.nIdPublication){
sDejaAffiche = aCookie[1];
aCookieManchette = sDejaAffiche.split(',');
} else aCookieManchette = new Array();
} else aCookieManchette = new Array();
for (var i=0;i<this.aSequence.length;i++) this.aJamaisVu.push(true);
for (var i=0;i<aCookieManchette.length;i++){
var nTmp = parseInt(aCookieManchette[i]);
if ( nTmp > -1 && nTmp < this.aSequence.length) this.aJamaisVu[nTmp] = false;
}
var nSommePoids = 0;
for (var i=0;i<this.aPoids.length;i++){
if (this.aJamaisVu[i]) nSommePoids += this.aPoids[i];
}
var nRandom = Math.floor(Math.random()*100000%(nSommePoids-1));
var nSomme = 0;
var bManchetteChoisi = false;
for (var i=0;i<this.aSequence.length && !bManchetteChoisi;i++){
if (this.aJamaisVu[i]){
nSomme += this.aPoids[i];
if (nRandom<nSomme) { 
this.nCurrentSequence = i;
if (aCookieManchette.length != this.aSequence.length){
var sCookieVal = "";
if (sDejaAffiche == "") sCookieVal = this.nIdPublication+":"+i;
else sCookieVal = this.nIdPublication+":"+sDejaAffiche + ',' + i;
o_bSetCookie('manchette',sCookieVal);
this.nCurrentSequence--; 
}
bManchetteChoisi = true;
}
}
}
if (!bManchetteChoisi) this.nCurrentSequence = o_sGetCookie("lastSequence"); 
if (this.nCurrentSequence == null || this.nCurrentSequence >= this.aSequence.length || bFixedOrder == true) this.nCurrentSequence = -1;
}
this.start = function ScreenPlayerv2_start(){
try{
if (this.aSequence.length > 1){
o_hGetById('manchetteBtn').style.display = "";
o_hGetById('manchetteBtn').style.visibility = "visible";
}
this.findSequence();
o_hGetById('screenPlayer').style.display = "";
o_hGetById('screenPlayer').style.visibility = "visible";
this.nextSequence();
return true;
} catch( e ) { } 
}
}
function choisirThematique(aCom){
var nThematique = aCom.length;
return Math.min(nThematique,Math.round(Math.random()* nThematique + 0.5));
}
function afficherThematique(aCom){
var nIndex = choisirThematique(aCom);
var oThematique = aCom[nIndex-1];
var oProd = null;
if (window.sUrlReferrer.indexOf("W3ACC_pro") != -1) var nDiff = 6;
else var nDiff = 0;
if (i2h('shopThematique')){
i2h('shopThematique').innerHTML = oThematique.sNom;
if (typeof oThematique.sLien != "undefined" && oThematique.sLien != null && oThematique.sLien != ""){
i2h('shopThematique').href = o_changeOneUrl(oThematique.sLien,'zoneecommerce_shopping_titre'+nIndex);
}
}
for (var i=1;i<6;i++){
if (i2h('lien'+i) && i < oThematique.aProduit.length +1){
oProd = oThematique.aProduit[i-1];
var hDiv = document.createElement("div");
var hStrong = document.createElement("strong");
hStrong.innerHTML = oProd.sTitre;
var hSpanDesc = document.createElement("span");
hSpanDesc.className= "desc";
hSpanDesc.innerHTML = oProd.sDesc;
var hSpanPrix = document.createElement("span");
hSpanPrix.className= "prix";
if (oProd.sPrix != '') hSpanPrix.innerHTML = oProd.sPrix + " &euro;";
hDiv.appendChild(hStrong);
hDiv.appendChild(hSpanDesc);
hDiv.appendChild(hSpanPrix);
if (i2h('texte'+i)) i2h('texte'+i).innerHTML = hDiv.innerHTML;
if (i2h('lien'+i)) i2h('lien'+i).href = o_changeOneUrl(oProd.sLien,'zoneecommerce_shopping_bloc'+(nIndex+nDiff)+'_brick'+i);
if (i2h('img'+i)){
i2h('img'+i).src = oProd.sImg;
i2h('img'+i).alt = oProd.sAlt;
i2h('img'+i).title = oProd.sAlt;
}
}
}
}
function Produit(sTitre,sDesc,sPrix,sLien,sImg,sAlt) {
this.sTitre = sTitre;
this.sDesc = sDesc;
this.sPrix = sPrix;
this.sLien = sLien;
this.sImg = sImg;
this.sAlt = sAlt;
}
function Thematique(sNom,aProduit,sLien) {
this.sNom = sNom;
this.sLien = sLien;
this.aProduit = aProduit;
}
var mNames = ["janvier","f&eacute;vrier","mars","avril","mai","juin","juillet","ao&ucirc;t","septembre","octobre","novembre","d&eacute;cembre"];
var mNamesShort = ["jan.","f&eacute;v.","mars","avr.","mai","juin","juil.","ao&ucirc;t","sept.","oct.","nov.","d&eacute;c."];
var days =  ["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi",];
var dNames = ["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"];
var mDays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
var firstDate = 0;
var lastDate = 365;
var cl, cMonthYearField, cDayField, cDateField;
function ShowCalendar(dt,iDivCalendar) {
try{
var tDate = new Date( yearToday, monthToday-1, dayToday);
var calDate = new Date(dt);
calDate.setDate(1);
calDate.setHours(23);
calDate.setMinutes(59);
calDate.setSeconds(59);
var uDate = new Date(tDate);    
uDate.setDate(uDate.getDate()+lastDate); 
tDate.setDate(tDate.getDate()+firstDate); 
var cyear = calDate.getFullYear();
var isLeapYear = (((cyear % 4 == 0) && (cyear % 100 != 0)) || (cyear % 400 == 0));
mDays[1] = (isLeapYear)?29:28;
var calStr = '<table cellpadding="0" cellspacing="1" border="0" style="width:100%;background-color:#FFFFFF;">';
calStr += '<tr>';
calStr += '<td colspan="7" class="titre" style="vertical-align:middle;">';
if (calDate>tDate){
calDate.setMonth(calDate.getMonth()-1); 
calStr +='<div class="prec"><a href="javascript:ShowCalendar(\''+calDate.getFullYear()+'/'+(calDate.getMonth()+1)+'/'+calDate.getDate()+'\',\''+iDivCalendar+'\')"><img src="/I/Voyages/prev.gif" />&nbsp;</a></div>';
calDate.setMonth(calDate.getMonth()+1); 
} else calStr += '<div class="prec">&nbsp;</div>'
calStr += '<div class="mois">'+mNames[calDate.getMonth()]+' '+calDate.getFullYear()+'</div>';
calDate.setMonth(calDate.getMonth()+1);
if (calDate<uDate){
calStr +='<div class="next">&nbsp;<a href="javascript:ShowCalendar(\''+calDate.getFullYear()+'/'+(calDate.getMonth()+1)+'/'+calDate.getDate()+'\',\''+iDivCalendar+'\')"><img src="/I/Voyages/next.gif" onclick=""/></div>';
} else calStr += '<div class="next">&nbsp;</div>'
calDate.setMonth(calDate.getMonth()-1);
calStr += '<div class="fermer"><a href="" onclick="cl.style.display=\'none\'; selectState( false);return false;" class="close"><img src="/I/Voyages/close.gif" /> Fermer</a></div>';
calStr += '</td>';
calStr += '</tr><tr class="nomJour">';
for(var x=0;x<dNames.length;x++) calStr += '<td>'+dNames[x]+'</td>';
calStr+='</tr>';
var nJourSem = 0,clDate = (calDate.getDay()==0)?6:calDate.getDay()-1; 
for(var x=0;x<clDate;x++) {
if (nJourSem == 0) calStr += '<tr class="jour">'; 
calStr += '<td class="invalide">&nbsp;</td>';
nJourSem++;
}
var nJourMoisActuel = mDays[calDate.getMonth()];
for(var x=0;x < nJourMoisActuel;x++) {
calDate.setDate(x+1);
if(calDate >= tDate && calDate <= uDate) {
calStr+=(nJourSem==0)?'<tr class="jour"><td class="valide">':'<td class="valide">';
calStr +='<a href="javascript:setDay(\''+(((calDate.getMonth()+1)<10)?0+''+(calDate.getMonth()+1):(calDate.getMonth()+1))+'-'+calDate.getFullYear()+'\',\''+(((x+1)<10)?0+''+(x+1):(x+1))+'\'); selectState(false);">'+(x+1)+'</a></td>';
} else {
calStr +=(nJourSem==0)?'<tr class="jour"><td class="invalide">':'<td class="invalide">';
calStr+=(x+1)+"</td>"
}
nJourSem++;
if(nJourSem == 7) {
calStr +='</tr>';
nJourSem=0;
}
}
while (nJourSem < 7 && nJourSem != 0){
calStr+='<td class="invalide">&nbsp;</td>';
if( nJourSem == 6) {
calStr+='</tr>';
}
nJourSem++;
}
calStr+= "</table>";
cl = document.getElementById(iDivCalendar);
cl.style.display='';
cl.innerHTML=calStr;
} catch( e ) { } 
}
function Calendar( hJour, hMois, hDayTxt,iDivCalendar) {
try{
cMonthYearField=hMois;
cMonthYearFieldVal = o_getSlctVal(hMois);
cDateField=hJour;
cDayFieldVal = o_getSlctVal(hJour);
cDayField = hDayTxt;
newDate = new Date(cMonthYearFieldVal.substr(3,4)+"/"+cMonthYearFieldVal.substr(0,2)+"/"+cDayFieldVal);
selectState(true);
ShowCalendar(newDate,iDivCalendar);
} catch( e ) { } 
}
function setDay(MYnm,Dnm) {
try{
element1 = i2h(cMonthYearField);
element2 = i2h(cDateField);
cl.style.display='none';
setDDValue( element1, MYnm);
setDDValue( element2, Dnm);
if (cDayField) {
calcDay( cDateField, cMonthYearField, cDayField);
}
upDate();
return true;
} catch( e ) { } 
}
function calcDay(nm,nm2,day) {
try{
dateVal = o_getSlctVal(nm);
monthVal = o_getSlctVal(nm2);
var isLeapYear = (((monthVal.substr(3,4) % 4 == 0) && (monthVal.substr(3,4) % 100 != 0)) || (monthVal.substr(3,4) % 400 == 0));
mDays[1] = (isLeapYear)?29:28;
if(dateVal > mDays[monthVal.substr(0,2)-1]) {
setDDValue(i2h(nm),mDays[monthVal.substr(0,2)-1]);
dateVal = o_getSlctVal(nm);
}
newDate = new Date(monthVal.substr(3,4)+"/"+monthVal.substr(0,2)+"/"+dateVal);
i2h(day).innerHTML = days[newDate.getDay()];
return true;
} catch( e ) { } 
}
function rSetCal(day,month,year) {
try{
dateCal = day+'-'+month+'-'+year;
dayCal = (day.length < 2)?'0'+day:day;
monthCal = month;
yearCal = year;
return true;
} catch( e ) { } 
}
function today_date(plusdays) { 
try{
if ((typeof plusdays == 'undefined') || (plusdays == '')) {
plusdays=0;
}
var date = new Date(yearToday,monthToday*1-1, dayToday);
date.setDate(date.getDate() + plusdays);
var d  = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = (date.getMonth()*1)+1;
var month = (m < 10) ? '0' + m : m;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
rSetCal(day, month, year);
return(day + "-" + month + "-" + year);
} catch( e ) { } 
}
function initForm() {
try{
i2h("sArrivalDate").value = today_date(9);
i2h("sDepartDate").value = today_date(8);
addSelectDate( i2h('sDepartDate1'), i2h('sDepartDate2'));
addSelectDate( i2h('sArrivalDate1'), i2h('sArrivalDate2'));
calcDay('sDepartDate1','sDepartDate2','DepartDayOfWeek');
calcDay('sArrivalDate1','sArrivalDate2','DDayOfWeek');
var dateD = i2h("sDepartDate").value;
var dateA = i2h("sArrivalDate").value;
setDDValue(i2h("sArrivalDate2"), dateA.substr(3,7));
setDDValue(i2h("sArrivalDate1"), dateA.substr(0,2));
calcDay('sArrivalDate1','sArrivalDate2','DDayOfWeek');
setDDValue(i2h("sDepartDate2"), dateD.substr(3,7));
setDDValue(i2h("sDepartDate1"), dateD.substr(0,2));
calcDay('sDepartDate1','sDepartDate2','DepartDayOfWeek');
return true;
} catch( e ) { } 
}
function upDate() {
try{
dateD = new Date(i2h("sDepartDate2").value.substr(3,4),i2h("sDepartDate2").value.substr(0,2),i2h("sDepartDate1").value);
dateA = new Date(i2h("sArrivalDate2").value.substr(3,4),i2h("sArrivalDate2").value.substr(0,2),i2h("sArrivalDate1").value);
if (dateA < dateD) {
var dateG = dateD;
dateG.setDate(dateG.getDate() + 0); 
var d  = dateG.getDate();
var day = (d < 10) ? '0' + d : d;
var m = dateG.getMonth();
var month = (m < 10) ? '0' + m : m;
var yy = dateG.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
var good_monthyear = month + '-' + year;
var good_day = day;
setDDValue(i2h("sArrivalDate2"), good_monthyear);
setDDValue(i2h("sArrivalDate1"), good_day);
calcDay('sArrivalDate1','sArrivalDate2','DDayOfWeek');
}
i2h("sDepartDate").value = i2h("sDepartDate1").value + '-' + i2h("sDepartDate2").value;
i2h("sArrivalDate").value = i2h("sArrivalDate1").value + '-' + i2h("sArrivalDate2").value;
return true;
} catch( e ) { } 
}
function selectState(hidden) {
try{
var state = (hidden)?'hidden':'visible';
i2h("form_vol").style.visibility = state;
} catch( e ) { } 
}
function addSelectDate( iJour, iMois) {
try{
for (var i=0; i<iJour.options.length; i++){ iJour.options[i] = null; }
for (var i=0; i<iMois.options.length; i++){ iMois.options[i] = null; }
for( i=1; i<=31; i++) {
addSelectOption( iJour, i-1, i, (i<10)?"0"+i:i);
}
iJour.options[dayCal-1].selected = true;
for(i=0; i<13; i++) {
mois = monthCal*1 + i - 1;
mois = (mois<=0)?12+mois:mois;
annee = (mois>12)?yearCal+1:yearCal;
mois = (mois>12)?mois-12:mois;
addSelectOption( iMois, i, mNamesShort[mois-1]+annee.toString().substr(2,2), ((mois<10)?"0"+mois:mois)+"-"+annee);
}
iMois.options[1].selected = true;
return true;
} catch( e ) { } 
}
function setDDValue(oDropDown, sValue) {
try{
for(var iIndex=0; iIndex<oDropDown.options.length; ++iIndex) {
if(oDropDown.options[iIndex].value == sValue) {
oDropDown.selectedIndex = iIndex;
break;
}
}
return true;
} catch( e ) { } 
}
function validFormVol() {
try{
var strAlert = '';
if(i2h('psAdults').value=='0' && i2h('psChildren').value=='0') strAlert += "Le nombre de passagers ne peut être nul.\n";
if(i2h('sDepartLocation').value == "" || i2h('sDepartLocation').value == sDepartDefault) strAlert += "La ville de depart doit etre specifiee.\n";
if(i2h('sArrivalLocation').value == "" || i2h('sArrivalLocation').value == sArriveeDefault) strAlert += "La ville d'arrivee doit etre specifiee.\n";
currentDate = new Date();
v_departDate = new Date(i2h('sDepartDate').value.substr(6,4),i2h('sDepartDate').value.substr(3,2)-1,i2h('sDepartDate').value.substr(0,2));
if(currentDate.getTime()>v_departDate.getTime()) strAlert += "La date de départ doit être postérieure à la date courante.\n";
if (document.getElementById('form_vol').psFareType) var psFareType = (document.getElementById('form_vol').psFareType.checked)?"S":"R";
else var psFareType = "R";
if (strAlert.length > 0) {
alert(strAlert);
} else {
var url = document.getElementById('form_vol').action;
url+= "?sTazzooFor=Orange";
url+= "&sDepartDate=" + document.getElementById('form_vol').sDepartDate.value;
url+= "&sArrivalDate=" + document.getElementById('form_vol').sArrivalDate.value;
url+= "&sDepartLocation=" + document.getElementById('form_vol').sDepartLocation.value;
url+= "&sArrivalLocation=" + document.getElementById('form_vol').sArrivalLocation.value;
url+= "&psAdults=" + document.getElementById('form_vol').psAdults.value;
url+= "&psChildren=" + document.getElementById('form_vol').psChildren.value;
url+= "&psBabies=0";
url+= "&psFareType=" + psFareType;
document.location.href = url;
}
return false;
} catch( e ) { } 
}
function closeOpenSearch(){
var oObj = document.getElementById('barreOpenSearch');
oObj.style.visibility = "hidden";
if (document.getElementById('imgOS')){
var sCode = o_changeOneUrl('http://c.orange.fr/z.gif','O_OpenSearchClose',true);
document.getElementById('imgOS').innerHTML = "<img width='10' src='"+sCode+"' />";
}
hTimeoutHeight = window.setInterval( "changeHeight('barreOpenSearch',-1,31,0,'hidden')", 20 );  
return false;
}
function ajouterOpenSearch(){
if (document.getElementById('imgOS')){
document.getElementById('imgOS').innerHTML = "<img width='10' src='"+o_changeOneUrl('http://c.orange.fr/z.gif','O_OpenSearch',true)+"' />";
}
window.external.AddSearchProvider('http://opensearch.search.ke.voila.fr/orange.xml');
o_bSetCookie('barreOpenS',2,'expires = 365');
return false;
}
function displayOpenSearch(){
iTransparence = 0;
hTimeoutHeight = window.setInterval( "changeHeight('barreOpenSearch',1,0,31,'visible')", 20 );  
}
function changeHeight(hDiv,iPas,iDebut,iFin,sFinalVisibility){
var oObj = document.getElementById(hDiv);
var iHauteur = oObj.offsetHeight+iPas;
oObj.style.height = iHauteur+"px";
if ((iPas < 0 && iHauteur <= iFin) || (iPas > 0 && iHauteur >= iFin)){
changeOpacity(oObj,iTransparence);
oObj.style.visibility = sFinalVisibility;
if (typeof hTimeoutOpacity == "undefined") hTimeoutOpacity = window.setInterval( "augmenterTransparence('barreOpenSearch',5)", 20 );
clearInterval(hTimeoutHeight);
}
}
function augmenterTransparence(hDiv,iPas){
var oObj = document.getElementById(hDiv);
iTransparence += iPas;
if (iTransparence > 100){
clearInterval(hTimeoutOpacity);
} else changeOpacity(oObj,iTransparence);
}
function detectNav(){
var _ = {'type':'unknown','version':'unknown','id':'unknown','ua':navigator.userAgent};
switch(navigator.appName){
case 'Microsoft Internet Explorer' :_.type = 'ie'; _.version = _.ua.substr(_.ua.indexOf('MSIE')+5,3); break;
case 'Opera' :_.type = 'op'; _.version = _.ua.substr(6,4); break;
case 'Netscape':
var pos = _.ua.indexOf('Firefox');
switch(pos > -1){
case true:_.type = 'ff';_.version = _.ua.substr(pos+8,7);break;
default  :_.type = 'ns';_.version = _.ua.substr(_.ua.indexOf('Netscape')+9,3);break;
}
break;
default :
var pos = _.ua.indexOf('Safari');if(pos > -1){_.type = 'sf';_.version = _.ua.substr(pos+7,5);}
break; 
}
_.id = _.type +''+ _.version.substr(0,1); 
return _;
}
function cacherAstuce(){
if (o_hGetById('astuceJour')) o_hGetById('astuceJour').style.display = 'none'; 
return false;
}