function ECOTOURUtil(){}ECOTOURUtil.showById=function(a){var b=a;a=$(a);if(a==null){alert("showById() can't find an element with id: "+b+".");return}a.style.display="block";a.style.visibility="visible"};ECOTOURUtil.hideById=function(a){var b=a;a=$(a);if(a==null){alert("hideById() can't find an element with id: "+b+".");return}a.style.display="none"};ECOTOURUtil.isHideById=function(a){var b=a;a=$(a);if(a==null){alert("isHideById() can't find an element with id: "+b+".");return}return a.style.display=="none"};function popUpCGV(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.ecotour.com/cgv.jsp', '"+id+"', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=700,height=400');")}function popUpSNAV(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.snav.org', '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=795,height=540');")}function popUpCO2(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.co2solidaire.org/calculateurCO2/avion.php', '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=816,height=540');")}function popUpCO2Home(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.co2solidaire.org/', '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=816,height=540');")}function popUpCO2Information(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.ecotour.com/rechauffement-planete-voyages.html', '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=816,height=540');")}function popUpANCV(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.ecotour.com/ancv.html', '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=400');")}function popUpFormality(URL){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=850,height=600');")}function popUpInsuranceAllRiskH1N1Full(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('/insurance-allriskH1N1Full.jsp', '"+id+"', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=700,height=400');")}function popUpInsuranceAllRisk(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('/insurance-allrisk.jsp', '"+id+"', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=700,height=400');")}function popUpInsuranceAllRiskEco(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('/insurance-allriskeco.jsp', '"+id+"', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=700,height=400');")}function popUpRembourse(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('http://www.ecotour.com/rembourse-popup.jsp', '"+id+"', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=700,height=600');")}function popHotline(){day=new Date();id=day.getTime();eval("page"+id+" = window.open('/hotline-popup.jsp', '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=440,height=405');")}function inc_js(e){var b=document.getElementsByTagName("script");for(var d=0,a=b.length;d<a;++d){var c=b[d];if(c.src.indexOf(e)!=-1){return"already loaded"}}var c=document.createElement("script");c.type="text/javascript";c.src=e;document.getElementsByTagName("head")[0].appendChild(c);return"add script"}function showHide(a,d,c,b){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="";document.getElementById(d).style.background="transparent url("+c+") no-repeat;"}else{document.getElementById(a).style.display="none";document.getElementById(d).style.background="transparent url("+b+") no-repeat;"}}function showHideClass(a,d,c,b){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="";document.getElementById(d).className=c}else{document.getElementById(a).style.display="none";document.getElementById(d).className=b}}function showHide1(a,c,d){var b=document.getElementById(a);if(b.style.display=="none"){b.style.display="";if(c,d){addCssClass(document.getElementById(c),d)}}else{b.style.display="none";if(c,d){removeCssClass(document.getElementById(c),d)}}}function showHide2(a,b){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="";document.getElementById(b).style.display="none"}else{document.getElementById(a).style.display="none";document.getElementById(b).style.display=""}}function showHide3(a,b){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="";document.getElementById(b).style.display="none"}else{document.getElementById(a).style.display="none";document.getElementById(b).style.display=""}}function showHide4(b,a){document.getElementById(b).style.display="";document.getElementById(a).style.display="none"}function showHideSelect(b,a){if(b.options[b.selectedIndex].value=="Autre"){document.getElementById(a).style.display=""}else{document.getElementById(a).style.display="none"}}function addCssClass(b,a){if(!checkCssClass(b,a)){b.className+=b.className?" "+a:a}}function removeCssClass(b,a){var c=b.className.match(" "+a)?" "+a:a;b.className=b.className.replace(c,"")}function swapCssClass(c,b,a){c.className=!checkCssClass(c,b)?c.className.replace(a,b):c.className.replace(b,a)}function checkCssClass(b,a){return new RegExp("\\b"+a+"\\b").test(b.className)}function inc_js(e){var b=document.getElementsByTagName("script");for(var d=0,a=b.length;d<a;++d){var c=b[d];if(c.src.indexOf(e)!=-1){return"already loaded"}}document.write(unescape("%3Cscript src='"+e+"' type='text/javascript'%3E%3C/script%3E"));return"add script"}var AUTOMATIC_AUTHENTICATION_ON=1;var AUTOMATIC_AUTHENTICATION_OFF=0;function displayAccountWait(){form=document.getElementById("account-login-form");document.getElementById("compte-rubrique").style.display="none";document.getElementById("compte-rubrique-chargement").style.display="block";Account.login(form.email.value,form.password.value,callbackAccount);return false}function callbackAccount(a){DWRUtil.setValue("Account",a,{escapeHtml:false})}function logout(){Account.logout(logoutCallback)}function logoutCallback(){location.href="/"}function setAutomaticAuthentication(a){a.disabled=true;document.getElementById("automaticAuthenticationError").style.display="none";Account.setAutomaticAuthentication(a.checked,setAutomaticAuthenticationCallback);return false}function setAutomaticAuthenticationCallback(b){var a=document.getElementById("automaticAuthentication");if(b==AUTOMATIC_AUTHENTICATION_ON){document.getElementById("logout").style.display="none";a.disabled=false}else{if(b==AUTOMATIC_AUTHENTICATION_OFF){location.href="/"}else{document.getElementById("automaticAuthenticationError").style.display="";a.checked=!a.checked;a.disabled=false}}}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function setCookie(b,c,a){var d=new Date();d.setDate(d.getDate()+a);document.cookie=b+"="+escape(c)+((a==null)?"":";expires="+d.toUTCString())}function switchState(f,e,d,c,a){var b=getCookie("accountstate");if(b==null){b="A0-P0-C0-H1-I0-AG1-AP1"}if(b.indexOf("AG")==-1||b.indexOf("AP")==-1){b=b+"-AG1-AP1"}if(f=="A"){if(b.indexOf("A1")!=-1){b=b.replace(/A1/,"A0")}else{b=b.replace(/A0/,"A1")}}if(f=="P"){if(b.indexOf("P1")!=-1){b=b.replace(/P1/,"P0")}else{b=b.replace(/P0/,"P1")}}if(f=="C"){if(b.indexOf("C1")!=-1){b=b.replace(/C1/,"C0")}else{b=b.replace(/C0/,"C1")}}if(f=="H"){if(b.indexOf("H1")!=-1){b=b.replace(/H1/,"H0")}else{b=b.replace(/H0/,"H1")}}if(f=="I"){if(b.indexOf("I1")!=-1){b=b.replace(/I1/,"I0")}else{b=b.replace(/I0/,"I1")}}if(f=="AG"){if(b.indexOf("AG1")!=-1){b=b.replace(/AG1/,"AG0")}else{b=b.replace(/AG0/,"AG1")}}if(f=="AP"){if(b.indexOf("AP1")!=-1){b=b.replace(/AP1/,"AP0")}else{b=b.replace(/AP0/,"AP1")}}setCookie("accountstate",b,5000);showHideClass(e,d,c,a)}function startChrono(c,b,d){if(b==0||d==0){document.getElementById("vente-privee").innerHTML="Vente priv&eacute;e : Vente Ferm&eacute;e";return}var a=new Date();runChrono(c,a.getTime(),d.getTime())}function runChrono(f,e,c){if(e>=c){document.getElementById("vente-privee").innerHTML="Vente priv&eacute;e : Vente Ferm&eacute;e";return}var b=new Date();b.setTime(parseInt(c-e));var h=b.getDate();var a=b.getHours();var d=b.getMinutes();var g=b.getSeconds();h=parseInt(h)-1;a=parseInt(a)-1;document.getElementById("product"+f+"days").innerHTML=h;document.getElementById("product"+f+"hours").innerHTML=a;document.getElementById("product"+f+"minutes").innerHTML=d;document.getElementById("product"+f+"seconds").innerHTML=g;setTimeout("runChrono("+f+","+(e+1000)+","+c+")",1000)}function showToolTip(b){var a=document.getElementById(b);if(a!=null){a.style.display="block"}}function hideToolTip(b){var a=document.getElementById(b);if(a!=null){a.style.display="none"}}function selectFavorite(a){if(document.getElementById("favorite-0")!=null){document.getElementById("favorite-0").className=""}if(document.getElementById("favorite-1")!=null){document.getElementById("favorite-1").className=""}if(document.getElementById("favorite-2")!=null){document.getElementById("favorite-2").className=""}if(document.getElementById("favorite-3")!=null){document.getElementById("favorite-3").className=""}if(document.getElementById("favorite-4")!=null){document.getElementById("favorite-4").className=""}if(document.getElementById("favorite-"+a)!=null){document.getElementById("favorite-"+a).className="selection"}if(document.getElementById("favorite-0")!=null){document.getElementById("produit-favori-info-0").style.display="none"}if(document.getElementById("favorite-1")!=null){document.getElementById("produit-favori-info-1").style.display="none"}if(document.getElementById("favorite-2")!=null){document.getElementById("produit-favori-info-2").style.display="none"}if(document.getElementById("favorite-3")!=null){document.getElementById("produit-favori-info-3").style.display="none"}if(document.getElementById("favorite-4")!=null){document.getElementById("produit-favori-info-4").style.display="none"}if(document.getElementById("favorite-"+a)!=null){document.getElementById("produit-favori-info-"+a).style.display="block"}}function showTextArea(a){document.getElementById(a).style.display="block"}function postSupplierComment(a){form=document.getElementById("form-returnQuestion");form.dispatch.value="setSupplierComment";form.idReturnQuestion.value=a;form.comment.value=document.getElementById("supplierComment-"+a).value;form.submit()}function postEcotourComment(a){form=document.getElementById("form-returnQuestion");form.dispatch.value="setEcotourComment";form.idReturnQuestion.value=a;form.comment.value=document.getElementById("ecotourComment-"+a).value;form.submit()}function postModerate(a){form=document.getElementById("form-returnQuestion");form.dispatch.value="moderate";form.idReturnQuestion.value=a;form.submit()};