var dj=document.FormJourney;
function Validation(theForm,lang){
var bValid=true;
var vVeh = theForm.VEH.options[theForm.VEH.selectedIndex].value;
var vREM = theForm.REM.options[theForm.REM.selectedIndex].value;
if(theForm.USER){if(theForm.USER.value!="" && theForm.hLOGIN.value!="Y"  && bValid){DisplayError("To login, click on the red button or arrow from the Login section.","Pour vous identifier, cliquez sur le bouton rouge (ou la fl\350che) de la section Espace membre.");activateLogin();theForm.USER.focus();bValid = false;}}
if(theForm.SENS.options[theForm.SENS.selectedIndex].value=="PLS" && bValid){DisplayError("Please specify the direction of travel for your outward journey.","Veuillez indiquer le point de d\351part de votre trajet aller.");theForm.SENS.focus();bValid = false;}
var depDate = new Date();
var adateday = new String(theForm.elements['JJ1'].value);
var adatemonthyear = new String(theForm.elements['MYY1'].value);
if(adatemonthyear.length == 3){adatemonthyear = "0" + adatemonthyear;}
var amonth = parseInt(adatemonthyear.substr(0,2),10) -1;
var ayear = parseInt(("20" + adatemonthyear.substr(2,4)),10);
var aday = parseInt(adateday,10);
var depDate = new Date(ayear, amonth, adateday);
var tmpj = depDate.getDate();
var tmpj2 = parseInt(theForm.JJ1.value,10);
if((tmpj.toString() != tmpj2.toString()) && bValid){DisplayError("Please check the departure date for your outward journey.","Veuillez v\351rifier la date de d\351part");bValid=false;theForm.JJ1.focus();}
if(bValid && theForm.JJ2.selectedIndex != 0){var retDate = new Date();var rdateday = new String(theForm.elements['JJ2'].value);var rdatemonthyear = new String(theForm.elements['MYY2'].value);
if(rdatemonthyear.length == 3){rdatemonthyear = "0" + rdatemonthyear;}
var rmonth = parseInt(rdatemonthyear.substr(0,2),10) -1;
var ryear = parseInt(("20" + rdatemonthyear.substr(2,4)),10);
var rday = parseInt(rdateday,10);
var retDate = new Date(ryear, rmonth, rdateday);
var tmpjr = retDate.getDate();
var tmpjr2 = parseInt(theForm.JJ2.value,10);
if((tmpjr.toString() != tmpjr2.toString())){DisplayError("Please check the departure date for your return journey.","Veuillez v\351rifier la date de retour");bValid=false;theForm.JJ2.focus();}}
if(jourDate>depDate && bValid){DisplayError("Please check the departure date for your outward journey.","Veuillez v\351rifier la date de d\351part");bValid=false;theForm.JJ1.focus();}
if(bValid && theForm.JJ2.selectedIndex != 0){if(retDate<depDate){DisplayError("Please check the chronological order of the dates.","Merci de v\351rifier l'ordre chronologique des dates");bValid=false;theForm.JJ2.focus();}}
if(vVeh == "MOT" && bValid){if(vREM == "CVS"){DisplayError("Please select the \"trailer\" type","Veuillez s\351lectionner le type \"Remorque\"");theForm.REM.focus();bValid = false;}}
if(vVeh == "NONE" && bValid){DisplayError("Please select your type of vehicle","Veuillez s\351lectionner le type de votre v\351hicule");theForm.VEH.focus();bValid = false;}
if(theForm.LPG.options[theForm.LPG.selectedIndex].value == "0" && bValid){DisplayError("Please confirm how your vehicle is powered.","Veuillez indiquer le type de carburant utilis\351 par votre v\351hicule");bValid=false;theForm.LPG.focus();}
if(theForm.LPG.options[theForm.LPG.selectedIndex].value == "Y" && bValid){if(lang=="GB"){alert("Vehicles powered by LPG and dual-powered cannot be accepted for transport by Eurotunnel. We regret we cannot accept your booking unless you choose another type of vehicle.");}else{alert("Les v\351hicules fonctionnant au GPL et ceux \351quip\351s d'un double syst\350me GPL/essence ne peuvent \352tre accept\351s dans nos navettes. Nous regrettons de ne pouvoir donner suite \340 votre demande si vous ne s\351lectionnez pas un autre type de v\351hicule");}bValid = false;theForm.LPG.focus();}
if(theForm.COO){if(bValid && theForm.COO.options[theForm.COO.selectedIndex].value=="NO"){DisplayError("Please select your country of residence.","Merci de s\351lectionner votre pays de r\351sidence.");bValid=false;theForm.COO.focus();}}
if(bValid){
if(Scenario=="NewBooking"){
try{
var pageTracker = _gat._getTracker("UA-829324-3");
pageTracker._trackPageview('/FromQuickquote');
}
catch(e){}
}
theForm.submit();
}
}
var isMYY2no=true;var isJJ2no=true;
function isOneWay(theForm){
if(theForm.MYY2.selectedIndex==0){
isMYY2no=true
}
else
{
isMYY2no=false;
if(theForm.SENS.value!="PLS")
{
document.getElementById("ReturnDir").style.paddingLeft="5px";
if(theForm.SENS.value=="FOCA")
{
document.getElementById("ReturnDir").innerHTML=DirCAFO
}
else
{
document.getElementById("ReturnDir").innerHTML=DirFOCA
}
}
}
if(theForm.JJ2.selectedIndex==0)
{
isJJ2no=true
}
else
{
isJJ2no=false;
if(theForm.SENS.value!="PLS")
{
document.getElementById("ReturnDir").style.paddingLeft="5px";
if(theForm.SENS.value=="FOCA")
{
document.getElementById("ReturnDir").innerHTML=DirCAFO
}
else
{
document.getElementById("ReturnDir").innerHTML=DirFOCA
}
}
}
}
function CheckOneWay(theForm,param){
if(param=="1")
{
if(theForm.JJ2.selectedIndex!=0)
{
if(isMYY2no)
{
theForm.MYY2.selectedIndex=theForm.MYY1.selectedIndex+1;
if(theForm.SENS.value!="PLS")
{
document.getElementById("ReturnDir").style.paddingLeft="5px";
if(theForm.SENS.value=="FOCA")
{
document.getElementById("ReturnDir").innerHTML=DirCAFO
}
else
{
document.getElementById("ReturnDir").innerHTML=DirFOCA
}
}
isMYY2no=false;isJJ2no=false
}
}
else
{
if(!isMYY2no)
{
theForm.MYY2.selectedIndex=0;document.getElementById("ReturnDir").style.paddingLeft="9px";document.getElementById("ReturnDir").innerHTML="-";isMYY2no=true;isJJ2no=true
}
}
}
if(param=="2"){
if(theForm.MYY2.selectedIndex!=0)
{
if(isJJ2no)
{
theForm.JJ2.selectedIndex=theForm.JJ1.selectedIndex+1;
if(theForm.SENS.value!="PLS")
{
document.getElementById("ReturnDir").style.paddingLeft="5px";
if(theForm.SENS.value=="FOCA")
{
document.getElementById("ReturnDir").innerHTML=DirCAFO
}
else
{
document.getElementById("ReturnDir").innerHTML=DirFOCA
}
}
isMYY2no=false;isJJ2no=false
}
}
else
{
if(!isJJ2no)
{
theForm.JJ2.selectedIndex=0;document.getElementById("ReturnDir").style.paddingLeft="9px";document.getElementById("ReturnDir").innerHTML="-";isMYY2no=true;isJJ2no=true
}
}
}
}
function ChangeDir(theForm){if(!isJJ2no){switch(theForm.SENS.selectedIndex){case 0:document.getElementById("ReturnDir").style.paddingLeft="9px";document.getElementById("ReturnDir").innerHTML="-";break;case 1:document.getElementById("ReturnDir").style.paddingLeft="5px";document.getElementById("ReturnDir").innerHTML=DirCAFO;break;case 2:document.getElementById("ReturnDir").style.paddingLeft="5px";document.getElementById("ReturnDir").innerHTML=DirFOCA;break}}}
function MajusculeSansPonctuation(strCHAMP){var doTheJob=true;if((lang=="FR"&&strCHAMP.value=="Saisissez")||(lang=="GB"&&strCHAMP.value=="Please enter")){doTheJob=false}if(doTheJob==true){var bMaj=true;var strRep="";strCHAMP.value=strCHAMP.value.toUpperCase();for(i=0;i<strCHAMP.value.length;i++){car=strCHAMP.value.substring(i,i+1);if((car>="A"&&car<="Z")||(car>="0"&&car<="9")){strRep=strRep+car}}strCHAMP.value=strRep}}
function CtrlRegNum(MyField){if(lang=="GB"){if(MyField.value=="Please enter"||MyField.value=="PLEASEENTER"){MyField.value=""}}else{if(MyField.value=="Saisissez"||MyField.value=="SAISISSEZ"){MyField.value=""}}}
var Calendar_Win=null;var Calendar_Lang=null;var Calendar_Year=0;var Calendar_Month=0;var Calendar_Maxy=0;var dom1=true;var affiche_ferie=false;new Calendar();
Calendar.prototype.cal_wr=function(text){this.cWinCal.document.write(text)}
Calendar.prototype.cal_head=function(){var lnDAY=2;var vHcod="<TR bgcolor="+this.cNmDayBg+">";for(vsd=this.startDay,i=0;i<7;i++){vHcod+="<TD width=21 align=center class=cadaynam>"+this.nmDAY[vsd].substring(0,lnDAY)+"</TD>";if(++vsd>=7)vsd=0}vHcod+="</TR>\n";return vHcod}
Calendar.prototype.cal_couleurjour=function(vday,day,month,year,theForm){
if(theForm.SENS.options[theForm.SENS.selectedIndex].value!="PLS"){
if(test_ferie(day+1,month,year,theForm))return(" bgcolor="+this.cWkDayBg+" class=cadayferie onMouseOut=\"hideLayer(\'my_warning\');\" onMouseOver=\"showLayer(\'my_warning\',\'\');\" ");
}
if(vday==0||vday==6)return(" bgcolor="+this.cWkDayBg+" class=cadaywee");return(" class=cadaynum ")
}
Calendar.prototype.cal_weekclass=function(vday){if(vday==0||vday==6)return(" bgcolor="+this.cWkDayBg+" class=cadaywee");return(" class=cadaynum")}
Calendar.prototype.getDaysInMonth=function(month,year){if(month<1||month>12){return 0}var d=this.ndMON[month-1];if(month==2){if(year%4==0){if(year%100==0){if(year%400==0){d=29}}else{d=29}}}return d}
Calendar.prototype.cal_days=function(theForm){var vDate=new Date();vDate.setDate(1);vDate.setMonth(this.cMonth-1);vDate.setFullYear(this.cYear);var vFirstDay=vDate.getDay();var vLastDay=0;var vNowYear=this.cNow.getFullYear();var vNowMonth=this.cNow.getMonth()+1;var vNowDay=this.cNow.getDate();var vNowYMD=0;var vLastYMD=0;var vNW=0;var vsd=0;var vDay=0;var vOnFirstDay=false;var vDcod="";vNowYMD=(vNowYear*10000)+(vNowMonth*100)+vNowDay;vLastYMD=((vNowYear+this.MaxY)*10000)+(vNowMonth*100)+vNowDay;vLastDay=this.getDaysInMonth(this.cMonth,this.cYear);vOnFirstDay=false;vDcod+="<TR bgcolor="+this.cNuDayBg+">";for(vsd=this.startDay,j=0;j<7;j++){if(!vOnFirstDay&&vsd!=vFirstDay){vDcod+="<TD align=center"+this.cal_weekclass(vsd)+">";vDcod+="<span class=cadaybad>&nbsp;</span>"}else{if(affiche_ferie){vDcod+="<TD align=center"+this.cal_couleurjour(vsd,vDay,this.cMonth,this.cYear,theForm)+">"}else{vDcod+="<TD align=center"+this.cal_weekclass(vsd)+">"}vOnFirstDay=true;vDay+=1;vDayYMD=(this.cYear*10000)+(this.cMonth*100)+vDay;if(vDayYMD<vNowYMD||vDayYMD>vLastYMD){vDcod+="<span class=cadaybad>";if(vDay<=9)vDcod+="&nbsp;";vDcod+=vDay;vDcod+="</span>"}else{vDcod+="<A href='#' "+"onClick=\"Javascript:if (dom1) {Calendar_result(document."+theForm.name+","+this.cYear+","+this.cMonth+","+vDay+");Calendar_hide();} else if (opener && opener.Calendar_result) {opener.Calendar_result(document."+theForm.name+","+this.cYear+","+this.cMonth+","+vDay+");opener.Calendar_hide();};return false;\"";if(vDayYMD==vNowYMD)vDcod+=" class=cared>";else vDcod+=" class=cadaynum>";if(vDay<=9)vDcod+="&nbsp;";vDcod+=vDay;vDcod+="</A>"}}vDcod+="</TD>";if(++vsd>=7)vsd=0}vDcod+="</TR>\n";for(nWK=1;nWK<6;nWK++){vDcod+="<TR bgcolor="+this.cNuDayBg+">";for(vsd=this.startDay,j=0;j<7;j++){if(affiche_ferie){vDcod+="<TD align=center"+this.cal_couleurjour(vsd,vDay,this.cMonth,this.cYear,theForm)+">"}else{vDcod+="<TD align=center"+this.cal_weekclass(vsd)+">"}vDay+=1;if(vDay>vLastDay){vDcod+="<span class=cadaybad>&nbsp;</span>"}else{vDayYMD=(this.cYear*10000)+(this.cMonth*100)+vDay;if(vDayYMD<vNowYMD||vDayYMD>vLastYMD){vDcod+="<span class=cadaybad>";if(vDay<=9)vDcod+="&nbsp;";vDcod+=vDay;vDcod+="</span>"}else{vDcod+="<A href='#' "+"onClick=\"Javascript:if (dom1) {Calendar_result(document."+theForm.name+","+this.cYear+","+this.cMonth+","+vDay+");Calendar_hide();} else if(opener && opener.Calendar_result){opener.Calendar_result(document."+theForm.name+","+this.cYear+","+this.cMonth+","+vDay+"); opener.Calendar_hide();};return false;\"";if(vDayYMD==vNowYMD)vDcod+=" class=cared>";else vDcod+=" class=cadaynum>";if(vDay<=9)vDcod+="&nbsp;";vDcod+=vDay;vDcod+="</A>"}}vDcod+="</TD>";if(++vsd>=7)vsd=0}vDcod+="</TR>\n"}return vDcod}
Calendar.prototype.cal_buildHTML=function(theForm){var prevMM=this.cMonth;var nextMM=this.cMonth;var prevYY=this.cYear;var nextYY=this.cYear;var vTcod="";prevMM=this.cMonth-1;prevYY=this.cYear;if(prevMM<=0){prevMM=12;--prevYY}nextMM=this.cMonth+1;nextYY=this.cYear;if(nextMM>=13){nextMM=1;++nextYY}vTcod+="<FORM name=\"CalForm\">";vTcod+="<TABLE width=\"178\" border=0 cellspacing=0 cellpadding=0 align=center valign=top class=cabodybg>";vTcod+="<TR><TD align=\"center\" height=\"16\" class=\"catitle\">"+this.Title+"</TD></TR>";vTcod+="<TR><TD align=center valign=middle class=cabodybg>\n";vTcod+="<TABLE width=176 border=0 cellspacing=1 cellpadding=0 align=center valign=middle class=caaround>";vTcod+="<TR><TD align=center class=caaround>\n";vTcod+="<TABLE width=174 border=0 cellspacing=0 cellpadding=0 align=center valign=top class=caboard>\n";vTcod+="<TR>";vTcod+="<TD colspan=3 align=center>";vTcod+="<SELECT name=\"Month\"";vTcod+=" onChange=\"if (dom1) {Calendar_build(parseInt(document.CalForm.Month.options[document.CalForm.Month.selectedIndex].value,10),"+this.cYear+",document."+theForm.name+");} else if (window.opener && window.opener.Calendar_build) {window.opener.Calendar_build(parseInt(document.CalForm.Month.options[document.CalForm.Month.selectedIndex].value,10),"+this.cYear+");};\">";sel=this.cMonth;for(mm=1;mm<=12;mm++){vTcod+='<OPTION value="'+mm+'"';if(mm==sel)vTcod+=" selected";vTcod+=">"+this.nmMON[mm-1]}vTcod+="</SELECT><SELECT name=\"Year\"";vTcod+=" onChange=\"if (dom1) {Calendar_build("+this.cMonth+",parseInt(document.CalForm.Year.options[document.CalForm.Year.selectedIndex].value,10),document."+theForm.name+");} else if(window.opener && window.opener.Calendar_build) {window.opener.Calendar_build("+this.cMonth+",parseInt(document.CalForm.Year.options[document.CalForm.Year.selectedIndex].value,10),document."+theForm.name+");};\">";sel=this.cYear;min=(sel-1);max=(sel+this.MaxY);for(yy=min;yy<=max;yy++){vTcod+='<OPTION value="'+yy+'"';if(yy==sel)vTcod+=" selected";vTcod+=">"+yy}vTcod+="</SELECT></TD></TR>\n";vTcod+="<TR>";vTcod+="<TD width=\"9%\" align=left class=caprvnxt>";vTcod+="&nbsp;<A href=\"Javascript:if(dom1) {Calendar_build("+prevMM+","+prevYY+",document."+theForm.name+");} else if (window.opener && window.opener.Calendar_build) {window.opener.Calendar_build("+prevMM+","+prevYY+",document."+theForm.name+");};\" class=\"calink\">&laquo;</A>";vTcod+="</TD>";vTcod+="<TD width=\"82%\" align=center class=camonthy height=\"16\" class=camonthy>";vTcod+=this.cMonthName+"&nbsp;"+this.cYear;vTcod+="</TD>";vTcod+="<TD width=\"9%\" align=right class=caprvnxt>";vTcod+="<A href=\"Javascript:if (dom1) {Calendar_build("+nextMM+","+nextYY+",document."+theForm.name+");} else if(window.opener && window.opener.Calendar_build){ window.opener.Calendar_build("+nextMM+","+nextYY+",document."+theForm.name+");};\" class=\"calink\">&raquo;</A>";vTcod+="&nbsp;</TD></TR>\n";vTcod+="</TABLE>\n";vTcod+="</TD></TR>\n";vTcod+="<TR><TD align=center class=caaround>\n";vTcod+="<TABLE width=174 border=0 cellspacing=1 cellpadding=1 align=center valign=top class=cacalend>\n"+this.cal_head()+this.cal_days(theForm)+"</TABLE>\n";vTcod+="</TD></TR></TABLE>\n";vTcod+="<TR><TD align=\"right\" height=\"16\"><a href=\"#\" onclick=\"IE6SELECT();hideLayer('dCalendar'); return false;\" class=\"caclose\">";vTcod+=closeWin;vTcod+="</a>&nbsp;</TD></TR></TABLE>\n";vTcod+="</TD></TR></TABLE></FORM>\n";return vTcod}
Calendar.prototype.cal_showLayer=function(theForm){var sHTML=this.cal_buildHTML(theForm);if(theForm.SENS.options[theForm.SENS.selectedIndex].value!="PLS"){sHTML+="<div id=\"my_warning\" style=\"visibility:hidden;position:absolute;top:151px;left:0px;\"><table border=0 width=105><tr><td bgcolor=\"#ffffff\" class=\"jrferie\">"}else{sHTML+="<div id=\"my_warning\" style=\"visibility:hidden;position:absolute;top:151px;left:0px;\"><table border=0 width=80><tr><td>"}if(theForm.SENS.options[theForm.SENS.selectedIndex].value=="FOCA"){if(Calendar_Lang=="FR")sHTML+="FR jour&nbsp;f\351ri\351";if(Calendar_Lang=="GB")sHTML+="FR bank&nbsp;holiday"}if(theForm.SENS.options[theForm.SENS.selectedIndex].value=="CAFO"){if(Calendar_Lang=="FR")sHTML+="UK jour&nbsp;f\351ri\351";if(Calendar_Lang=="GB")sHTML+="UK bank&nbsp;holiday"}sHTML+="</td></tr></table></div>\n";document.getElementById('dCalendar').innerHTML=sHTML;showLayer('dCalendar','')}
Calendar.prototype.cal_show=function(theForm){var vTcod="";this.cWinCal.document.open();vTcod="<HTML>\n<HEAD>\n";vTcod+="<META http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";vTcod+="<META http-equiv=\"Content-Script-Type\" content=\"text/javascript\">\n";vTcod+="<META name=\"Author\" content=\"eurotunnel\">\n";vTcod+="<TITLE>"+this.Title+" - "+this.Copyright+"</TITLE>\n";vTcod+="</HEAD>\n";vTcod+="<STYLE type=\"text/css\">\n<!--\n";vTcod+="body { margin:0px; padding:0px; border-width:0px; border-style:outset; background-color:"+this.cBodyBg+"; font-family:Verdana,Arial; font-size:8pt; font-weight:normal; color:"+this.cBodyText+" }\n";vTcod+="a:link { text-decoration:none; color:"+this.cBodyLink+" }\n";vTcod+="a:visited { text-decoration:none; color:"+this.cBodyLink+" }\n";vTcod+="a:active { text-decoration:none; color:"+this.cBodyLink+" }\n";vTcod+="a:hover { text-decoration:underline }\n";vTcod+="table.cabodybg { background-color:"+this.cBodyBg+" }\n";vTcod+="table.caaround { background-color:"+this.cAroundBg+" }\n";vTcod+="table.caboard  { background-color:"+this.cBoardBg+" }\n";vTcod+="table.cacalend { background-color:"+this.cCalenBg+" }\n";vTcod+="td { font-family:Verdana,Arial; font-size:9pt; font-style:normal; font-weight:normal; color:"+this.cBodyText+" }\n";vTcod+="td.cabodybg { background-color:"+this.cBodyBg+" }\n";vTcod+="td.caaround { background-color:"+this.cAroundBg+" }\n";vTcod+="td.caselect { background-color:"+this.cSelectBg+" }\n";vTcod+="font.caselect { font-family:Verdana,Arial; font-size:8pt; font-style:normal; font-weight:normal; color:"+this.cBodyText+" }\n";vTcod+="td.camonthy { background-color:"+this.cTitleBg+" }\n";vTcod+="font.camonthy { font-family:Verdana,Arial; font-size:9pt; font-style:normal; font-weight:bold; color:"+this.cBodyText+" }\n";vTcod+="td.caprvnxt { background-color:"+this.cTitleBg+" }\n";vTcod+="font.caprvnxt { font-family:wingdings; font-size:10pt; font-style:normal; font-weight:normal; color:"+this.cBodyText+" }\n";vTcod+="td.capnyear { background-color:"+this.cTitleBg+" }\n";vTcod+="font.capnyear { font-family:Verdana,Arial; font-size:9pt; font-style:normal; font-weight:normal; color:"+this.cBodyText+" }\n";vTcod+="td.cadaynam { background-color:"+this.cNmDayBg+" }\n";vTcod+="font.cadaynam { font-family:Verdana,Arial; font-size:9pt; font-style:normal; font-weight:bold; color:"+this.cNmDayCo+" }\n";vTcod+="td.cadaywee { background-color:"+this.cWkDayBg+" }\n";vTcod+="td.cadaynum { background-color:"+this.cNuDayBg+" }\n";vTcod+="font.cadaynum { font-family:Verdana,Arial; font-size:9pt; font-style:normal; font-weight:bold; color:"+this.cNuDayCo+" }\n";vTcod+="font.cadaybad { font-family:Verdana,Arial; font-size:9pt; font-style:normal; font-weight:normal; color:"+this.cBaDayCo+" }\n";vTcod+="select { background-color:"+this.cSelectBg+"; font-family:Verdana,Arial; font-size:8pt; font-style:normal; font-weight:normal; color:"+this.cBodyText+" }\n";vTcod+="//-->\n</STYLE>\n";this.cal_wr(vTcod);vTcod="<BODY topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 link="+this.cBodyLink+" vlink="+this.cBodyLink+" alink="+this.cBodyLink+" text="+this.cBodyText+" bgcolor="+this.cBodyBg+">\n";this.cal_wr(vTcod);var sHTML=this.cal_buildHTML(theForm);this.cal_wr(sHTML);vTcod+="</BODY>\n</HTML>\n";this.cal_wr(vTcod);this.cWinCal.document.close()}
Calendar.prototype.cal_hide=function(){if(dom1){document.getElementById("dCalendar").style.visibility="hidden"}else{Calendar_Win.close()}}
function Calendar(winCal,month,year,lang,maxy){this.Copyright="Eurotunnel";this.Version="vJPop1.0";this.GB_Title="Calendar";this.FR_Title="Calendrier";this.DE_Title="Kalender";this.NL_Title="Kalender";this.GB_nmMON=["January","February","March","April","May","June","July","August","September","October","November","December"];this.FR_nmMON=["Janvier","F\351vrier","Mars","Avril","Mai","Juin","Juillet","Ao\373t","Septembre","Octobre","Novembre","D\351cembre"];this.DE_nmMON=["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];this.NL_nmMON=["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"];this.ndMON=[31,28,31,30,31,30,31,31,30,31,30,31];this.GB_nmDAY=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];this.FR_nmDAY=["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"];this.DE_nmDAY=["Son","Mon","Die","Mit","Don","Fre","Sam"];this.NL_nmDAY=["Zon","Maa","Din","Woe","Don","Vri","Zat"];this.cBodyLink="#000000";this.cBodyText="#000000";this.cBodyBg="#0F3184";this.cAroundBg="#ffffff";this.cBoardBg="#C5D2D8";this.cSelectBg="#C5D2D8";this.cTitleCo="#FFFFFF";this.cTitleBg="#C5D2D8";this.cCalenBg="#ffffff";this.cNmDayBg="#0F3184";this.cNmDayCo="#FFFFFF";this.cNuDayBg="#EAEFF1";this.cNuDayCo="#0F3184";this.cWkDayBg="#C5D2D8";this.cBaDayCo="#000000";this.Title=this.GB_Title;this.nmMON=this.GB_nmMON;this.nmDAY=this.GB_nmDAY;if(lang!=null){if(lang=="FR"){this.Title=this.FR_Title;this.nmMON=this.FR_nmMON;this.nmDAY=this.FR_nmDAY}else if(lang=="DE"){this.Title=this.DE_Title;this.nmMON=this.DE_nmMON;this.nmDAY=this.DE_nmDAY}else if(lang=="NL"){this.Title=this.NL_Title;this.nmMON=this.NL_nmMON;this.nmDAY=this.NL_nmDAY}}this.cWinCal=winCal;this.startDay=1;this.MaxY=maxy;this.cNow=new Date();this.cMonthName=this.nmMON[month-1];this.cMonth=month;this.cYear=year}
function Calendar_build(month,year,theForm){n_cal=new Calendar(Calendar_Win,month,year,Calendar_Lang,Calendar_Maxy);if(dom1){n_cal.cal_showLayer(theForm)}else{n_cal.cal_show(theForm);Calendar_Win.focus()}}
function Calender_show(){if(!dom1){Calendar_Win=window.open("","Calendar","width=178,height=170,top=46,left=0,status=no,resizable=no,scrollbars=no,location=no,status=no,statusbar=no,toolbar=no,menubar=no,directories=no,dependent=yes");Calendar_Win.opener=self}}
function Calendar_hide(){n_cal.cal_hide()}
function winCalendar(){var p_lang=arguments[0];var p_month=arguments[1];var p_year=arguments[2];var theForm=arguments[3];var affiche=arguments[4];var p_maxy=null;var p_now=new Date();var v_month=0;var v_year=0;if(p_lang!=null){Calendar_Lang=p_lang}if(affiche!=null){affiche_ferie=affiche}if(p_month!=null&&p_month!="")Calendar_Month=parseInt(p_month,10);else Calendar_Month=0;if(Calendar_Month<=0||Calendar_Month>12)Calendar_Month=p_now.getMonth()+1;if(p_year!=null&&p_year!="")Calendar_Year=parseInt(p_year,10);else Calendar_Year=0;if(Calendar_Year<=2000)Calendar_Year=p_now.getFullYear();if(p_maxy!=null&&p_maxy!=0)Calendar_Maxy=p_maxy;else Calendar_Maxy=1;Calender_show();Calendar_build(Calendar_Month,Calendar_Year,theForm)}
function Calendar_close(){
IE6SELECT();
if(Calendar_Win!=null&&Calendar_Win.close)Calendar_Win.close()
}
function IE6SELECT(){
document.FormJourney.JJ1.style.visibility="visible";
document.FormJourney.JJ2.style.visibility="visible";
document.FormJourney.MYY1.style.visibility="visible";
document.FormJourney.MYY2.style.visibility="visible";
document.FormJourney.SENS.style.visibility="visible";
document.FormJourney.JJ2.style.visibility="visible";
document.FormJourney.MYY2.style.visibility="visible";
document.FormJourney.SENS.style.visibility="visible";
document.FormJourney.VEH.style.visibility="visible";
document.FormJourney.REM.style.visibility="visible";
document.FormJourney.LPG.style.visibility="visible";
}
var Cal_way=0;var Cal_item=0;var Cal_return_field="";var opt="";var Cleaner_status=false;
function Calendar_result(theForm,year,month,day){
theForm.JJ1.style.visibility="visible";
theForm.JJ2.style.visibility="visible";
theForm.MYY1.style.visibility="visible";
theForm.MYY2.style.visibility="visible";
theForm.SENS.style.visibility="visible";
theForm.JJ2.style.visibility="visible";
theForm.MYY2.style.visibility="visible";
theForm.SENS.style.visibility="visible";
theForm.VEH.style.visibility="visible";
theForm.REM.style.visibility="visible";
theForm.LPG.style.visibility="visible";
if(opt=='1'){theForm.JJ1.selectedIndex=parseInt(day,10)-1;year=year.toString();var stmp=month+year.substring(2,4);for(i=0;i<=12;i++){if(theForm.MYY1.options[i].value==stmp){theForm.MYY1.selectedIndex=i}}}else{theForm.JJ2.selectedIndex=parseInt(day,10);year=year.toString();var stmp=month+year.substring(2,4);for(i=0;i<=13;i++){if(theForm.MYY2.options[i].value==stmp){theForm.MYY2.selectedIndex=i}}}if(theForm.JJ2.selectedIndex==0){}else{updateRetdate(theForm)}if(theForm.JJ2.selectedIndex!=0){isMYY2no=false;isJJ2no=false;if(theForm.SENS.value!="PLS"){document.getElementById("ReturnDir").style.paddingLeft="5px";if(theForm.SENS.value=="FOCA"){document.getElementById("ReturnDir").innerHTML=DirCAFO}else{document.getElementById("ReturnDir").innerHTML=DirFOCA}}}
}
function uncheckOneWay(theForm){theForm.JJ2.selectedIndex=theForm.JJ1.selectedIndex+1;theForm.MYY2.selectedIndex=theForm.MYY1.selectedIndex+1}
function updateRetdate(theForm){var depDate=new Date();var retDate=new Date();var adateday=new String(theForm.elements['JJ1'].value);var adatemonthyear=new String(theForm.elements['MYY1'].value);var rdateday=new String(theForm.elements['JJ2'].value);var rdatemonthyear=new String(theForm.elements['MYY2'].value);if(adatemonthyear.length==3){adatemonthyear="0"+adatemonthyear}if(rdatemonthyear.length==3){rdatemonthyear="0"+rdatemonthyear}var amonth=parseInt(adatemonthyear.substr(0,2),10)-1;var ayear=parseInt(("20"+adatemonthyear.substr(2,4)),10);var aday=parseInt(adateday,10);var depDate=new Date(ayear,amonth,adateday);var rmonth=parseInt(rdatemonthyear.substr(0,2),10)-1;var ryear=parseInt(("20"+rdatemonthyear.substr(2,4)),10);var rday=parseInt(rdateday,10);var retDate=new Date(ryear,rmonth,rdateday);if(depDate>retDate){theForm.JJ2.selectedIndex=theForm.JJ1.selectedIndex+1;theForm.MYY2.selectedIndex=theForm.MYY1.selectedIndex+1}}
function popCal(theForm,e,aorr,lang,affiche_ferie){
if(navigator.appVersion.indexOf("MSIE")!=-1){
var version=0;
var tmpver = navigator.appVersion.split("MSIE");
version=parseFloat(tmpver[1]);
if(version<7.0){
if(aorr=="1"){
theForm.JJ1.style.visibility="hidden";
theForm.JJ2.style.visibility="hidden";
theForm.MYY1.style.visibility="hidden";
theForm.MYY2.style.visibility="hidden";
theForm.SENS.style.visibility="hidden";
}
else
{
theForm.JJ2.style.visibility="hidden";
theForm.MYY2.style.visibility="hidden";
theForm.VEH.style.visibility="hidden";
theForm.REM.style.visibility="hidden";
theForm.LPG.style.visibility="hidden";
}
}	
}
var posx=0;var posy=0;opt=aorr;if(!e)var e=window.event;if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY}else if(e.clientX||e.clientY){posx=e.clientX+document.body.scrollLeft;posy=e.clientY+document.body.scrollTop}var iPos=posy-20;iPos=iPos+"px";document.getElementById("dCalendar").style.top=iPos;if(opt=='1'){var dateday=new String(theForm.elements['JJ1'].value);var datemonthyear=new String(theForm.elements['MYY1'].value)}else{var dateday=new String(theForm.elements['JJ2'].value);var datemonthyear=new String(theForm.elements['MYY2'].value)}if(datemonthyear.length==3){datemonthyear="0"+datemonthyear}month=parseInt(datemonthyear.substr(0,2),10)-1;year=parseInt(("20"+datemonthyear.substr(2,4)),10);day=parseInt(dateday,10);var dDate=new Date(year,month,dateday);var sDay=dDate.getDate();var sMonth=dDate.getMonth();var sYear=dDate.getFullYear();sDay=sDay.toString();if(sDay.length==1){sDay="0"+sDay}if((sDay.toString()==dateday)&&(parseInt(sMonth,10)==(parseInt(datemonthyear.substr(0,2),10)-1))&&(parseInt(sYear)==(parseInt(("20"+datemonthyear.substr(2,4)),10)))){}else{dDate=new Date()}winCalendar(lang,dDate.getMonth()+1,dDate.getFullYear(),theForm,affiche_ferie)
}
function winCleaner(){if(Cleaner_status==true){if(helpwin!=null&&helpwin.close)helpwin.close();Calendar_close()}Cleaner_status=true;return true}
var annee_courante=2009;
var V_FR_lundi_paques_annee_en_cours_day=13;
var V_FR_lundi_paques_annee_en_cours_month=4;
var V_FR_jeudi_ascencion_annee_en_cours_day=21;
var V_FR_jeudi_ascencion_annee_en_cours_month=5;
var V_FR_lundi_paques_annee_suivante_day=5;
var V_FR_lundi_paques_annee_suivante_month=4;
var V_FR_jeudi_ascencion_annee_suivante_day=13;
var V_FR_jeudi_ascencion_annee_suivante_month=5;
var V_UK_vendredi_saint_annee_en_cours_day=10;
var V_UK_vendredi_saint_annee_en_cours_month=4;
var V_UK_lundi_paques_annee_en_cours_day=13;
var V_UK_lundi_paques_annee_en_cours_month=4;
var V_UK_ferie_de_mai_annee_en_cours_day=4;
var V_UK_ferie_de_mai_annee_en_cours_month=5;
var V_UK_conge_printemps_annee_en_cours_day=25;
var V_UK_conge_printemps_annee_en_cours_month=5;
var V_UK_conge_ete_annee_en_cours_day=31;
var V_UK_conge_ete_annee_en_cours_month=8;
var V_UK_jour_noel_reporte_lundi_annee_en_cours_day=25;
var V_UK_jour_noel_reporte_lundi_annee_en_cours_month=12;
var V_UK_jour_noel_reporte_mardi_annee_en_cours_day=28;
var V_UK_jour_noel_reporte_mardi_annee_en_cours_month=12;
var V_UK_vendredi_saint_annee_suivante_day=2;
var V_UK_vendredi_saint_annee_suivante_month=4;
var V_UK_lundi_paques_annee_suivante_day=5;
var V_UK_lundi_paques_annee_suivante_month=4;
var V_UK_ferie_de_mai_annee_suivante_day=3;
var V_UK_ferie_de_mai_annee_suivante_month=5;
var V_UK_conge_printemps_annee_suivante_day=31;
var V_UK_conge_printemps_annee_suivante_month=5;
var V_UK_conge_ete_annee_suivante_day=30;
var V_UK_conge_ete_annee_suivante_month=8;
var V_UK_jour_noel_reporte_lundi_annee_suivante_day=27;
var V_UK_jour_noel_reporte_lundi_annee_suivante_month=12;
var V_UK_jour_noel_reporte_mardi_annee_suivante_day=28;
var V_UK_jour_noel_reporte_mardi_annee_suivante_month=12;
var F_FR_fete_du_travail_day = 1;
var F_FR_fete_du_travail_month = 5;
var F_FR_armistice45_day = 8;
var F_FR_armistice45_month = 5;
var F_FR_fete_nationale_day = 14;
var F_FR_fete_nationale_month = 7;
var F_FR_assomption_day = 15;
var F_FR_assomption_month = 8;
var F_FR_toussaint_day = 1;
var F_FR_toussaint_month = 11;
var F_FR_armistice18_day = 11;
var F_FR_armistice18_month = 11;
var F_UK_boxing_day_day=26;
var F_UK_boxing_day_month=12;
var F_nouvel_an_day = 1;
var F_nouvel_an_month = 1;
var F_noel_day = 25;
var F_noel_month = 12;
function test_FR_ferie(day,month,year){if(day==F_nouvel_an_day&&month==F_nouvel_an_month)return(true);if(day==F_noel_day&&month==F_noel_month)return(true);if(day==F_FR_fete_du_travail_day&&month==F_FR_fete_du_travail_month)return(true);if(day==F_FR_armistice45_day&&month==F_FR_armistice45_month)return(true);if(day==F_FR_fete_nationale_day&&month==F_FR_fete_nationale_month)return(true);if(day==F_FR_assomption_day&&month==F_FR_assomption_month)return(true);if(day==F_FR_toussaint_day&&month==F_FR_toussaint_month)return(true);if(day==F_FR_armistice18_day&&month==F_FR_armistice18_month)return(true);if(year==annee_courante){if(day==V_FR_lundi_paques_annee_en_cours_day&&month==V_FR_lundi_paques_annee_en_cours_month)return(true);if(day==V_FR_jeudi_ascencion_annee_en_cours_day&&month==V_FR_jeudi_ascencion_annee_en_cours_month)return(true)}if(year==annee_courante+1){if(day==V_FR_lundi_paques_annee_suivante_day&&month==V_FR_lundi_paques_annee_suivante_month)return(true);if(day==V_FR_jeudi_ascencion_annee_suivante_day&&month==V_FR_jeudi_ascencion_annee_suivante_month)return(true)}return(false)}
function test_UK_ferie(day,month,year){if(day==F_nouvel_an_day&&month==F_nouvel_an_month)return(true);if(day==F_noel_day&&month==F_noel_month)return(true);if(day==F_UK_boxing_day_day&&month==F_UK_boxing_day_month)return(true);if(year==annee_courante){if(V_UK_vendredi_saint_annee_en_cours_day==day&&V_UK_vendredi_saint_annee_en_cours_month==month)return(true);if(V_UK_lundi_paques_annee_en_cours_day==day&&V_UK_lundi_paques_annee_en_cours_month==month)return(true);if(V_UK_ferie_de_mai_annee_en_cours_day==day&&V_UK_ferie_de_mai_annee_en_cours_month==month)return(true);if(V_UK_conge_printemps_annee_en_cours_day==day&&V_UK_conge_printemps_annee_en_cours_month==month)return(true);if(V_UK_conge_ete_annee_en_cours_day==day&&V_UK_conge_ete_annee_en_cours_month==month)return(true);if(V_UK_jour_noel_reporte_lundi_annee_en_cours_day==day&&V_UK_jour_noel_reporte_lundi_annee_en_cours_month==month)return(true);if(V_UK_jour_noel_reporte_mardi_annee_en_cours_day==day&&V_UK_jour_noel_reporte_mardi_annee_en_cours_month==month)return(true)}if(year==annee_courante+1){if(V_UK_vendredi_saint_annee_suivante_day==day&&V_UK_vendredi_saint_annee_suivante_month==month)return(true);if(V_UK_lundi_paques_annee_suivante_day==day&&V_UK_lundi_paques_annee_suivante_month==month)return(true);if(V_UK_ferie_de_mai_annee_suivante_day==day&&V_UK_ferie_de_mai_annee_suivante_month==month)return(true);if(V_UK_conge_printemps_annee_suivante_day==day&&V_UK_conge_printemps_annee_suivante_month==month)return(true);if(V_UK_conge_ete_annee_suivante_day==day&&V_UK_conge_ete_annee_suivante_month==month)return(true);if(V_UK_jour_noel_reporte_lundi_annee_suivante_day==day&&V_UK_jour_noel_reporte_lundi_annee_suivante_month==month)return(true);if(V_UK_jour_noel_reporte_mardi_annee_suivante_day==day&&V_UK_jour_noel_reporte_mardi_annee_suivante_month==month)return(true)}return(false)}
function test_ferie(day,month,year,theForm){if(theForm!=null){if(theForm.SENS.options[theForm.SENS.selectedIndex].value!="PLS"){if(theForm.STEP.value=="30"){if(theForm.SENS.options[theForm.SENS.selectedIndex].value=="FOCA"){return(test_FR_ferie(day,month,year))}else{return(test_UK_ferie(day,month,year))}}else{if(theForm.SENS.options[theForm.SENS.selectedIndex].value=="FOCA"){return(test_FR_ferie(day,month,year))}else{return(test_UK_ferie(day,month,year))}}}}return(test_FR_ferie(day,month,year)||test_UK_ferie(day,month,year))}
var what=null;var newbrowser=true;var check=false;
function init(){if(document.getElementById){layerRef="document.getElementByID";styleSwitch=".style";visibleVar="visible";what="dom1"}else if(document.layers){layerRef="document.layers";styleSwitch="";visibleVar="show";what="ns4"}else if(document.all){layerRef="document.all";styleSwitch=".style";visibleVar="visible";what="ie4"}else{what="none";newbrowser=false}check=true}
function onLoad(){init()}
function showLayer(layerName){if(check){if(what=="none"){return}else if(what=="dom1"){document.getElementById(layerName).style.visibility="inherit"}else{eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="inherit"')}}else{return}}
function hideLayer(layerName){if(check){window.status="Eurotunnel";if(what=="none"){return}else if(what=="dom1"){document.getElementById(layerName).style.visibility="hidden"}else{eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"')}}else{return}}
function writedetails(layerName,writeWhat){if(check){if(what=="none"){return}else if(what=="dom1"){eval('document.getElementById(layerName).innerHTML=('+writeWhat+');')}else{eval(layerRef+'["'+layerName+'"].innerHTML=('+writeWhat+')')}}else{return}}
function moveLayer(layerName,x,y){var o=document.getElementById(layerName);o.style.left=x;o.style.top=y}
function getMouseY(){if(!e)var e=window.event;if(e){if(e.pageX||e.pageY){return e.pageY}else if(e.clientX||e.clientY){return e.clientY+document.body.scrollTop}}}
function getMouseX(){if(!e)var e=window.event;if(e){if(e.pageX||e.pageY){return e.pageX}else if(e.clientX||e.clientY){return e.clientX+document.body.scrollLeft}}}
function DisplayError(inGB,inFR){if(lang=="FR"){alert(inFR)}else{alert(inGB)}}
