var uvw="F";function resetTrip(uvvv){if(uvvv=="F"){uvw="F";}}function getAddressv1(u,wv,vw,vvv,vvw,wuuu){var xmlHttpReq;var vu,results,wvvu,rst,vv;var uuw,vvvv,uuv,uww,uwv,vvvu,vvvw,uu,vuww;var vwuu,vwuv,vwwu,vuvv,vuwv,wvwv,vuvu,vuvw;var wuv,wvww,wvu,vuwu;var www,wvw,wvv,vuuv,adoid,addid,adcombid,wvwu;var wvvw,vwuw;vuwu=document.frm_booking.hdPostcodeFrom;www="lblBnoFrom";wvw="txtBnoFrom";wvv="ftfhid";vuuv="ftf";wuww="hidadoidFrom";wuwv="hidaddidFrom";if(vw=="txtDestination"){uvw="T";}if(wuuu==0){wvvu=u.value;wuv="0";adoid="0";addid="0";}else{wvu=document.frm_Journey.slcAdrec;wvwu=wvu.options[wvu.selectedIndex].value;wvvu=wvu.options[wvu.selectedIndex].text;adcombid=wvwu.split("|");wuv=adcombid[0];adoid=adcombid[1];addid=adcombid[2];}vu="getaddress.asp?adid="+wuv+"&adoid="+adoid+"&addid="+addid+"&ft="+wvvu;vuu=parseInt(Math.random()*99999999999999);vu=vu+"&mr="+vuu;if(window.XMLHttpRequest){try{xmlHttpReq=new XMLHttpRequest;xmlHttpReq.overrideMimeType("text/xml");}catch(err1){try{xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}catch(err2){xmlHttpReq=new ActiveXObject("Msml2.XMLHTTP");}}}else if(window.ActiveXObject){xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}xmlHttpReq.open("GET",vu,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){rst=xmlHttpReq.responseXML.getElementsByTagName("rst")[0].childNodes[0].nodeValue;if(rst==1){vwuu=xmlHttpReq.responseXML.getElementsByTagName("organ")[0];vwuv=xmlHttpReq.responseXML.getElementsByTagName("line1")[0];vwwu=xmlHttpReq.responseXML.getElementsByTagName("line2")[0];vuvv=xmlHttpReq.responseXML.getElementsByTagName("line3")[0];vuwv=xmlHttpReq.responseXML.getElementsByTagName("line4")[0];wvwv=xmlHttpReq.responseXML.getElementsByTagName("town")[0];vuvu=xmlHttpReq.responseXML.getElementsByTagName("county")[0];vuvw=xmlHttpReq.responseXML.getElementsByTagName("postcode")[0];wvvw=xmlHttpReq.responseXML.getElementsByTagName("adoid")[0];vwuw=xmlHttpReq.responseXML.getElementsByTagName("addid")[0];if(vwuu.childNodes[0]){uuw=vwuu.childNodes[0].nodeValue;}else{uuw="";}if(vwuv.childNodes[0]){vvvv=vwuv.childNodes[0].nodeValue;}else{vvvv="";}if(vwwu.childNodes[0]){uuv=vwwu.childNodes[0].nodeValue;}else{uuv="";}if(vuvv.childNodes[0]){uww=vuvv.childNodes[0].nodeValue;}else{uww="";}if(vuwv.childNodes[0]){uwv=vuwv.childNodes[0].nodeValue;}else{uwv="";}if(wvwv.childNodes[0]){vvvu=wvwv.childNodes[0].nodeValue;}else{vvvu="";}if(vuvu.childNodes[0]){vvvw=vuvu.childNodes[0].nodeValue;}else{vvvw="";}if(vuvw.childNodes[0]){uu=vuvw.childNodes[0].nodeValue;}else{uu="";}if(wvvw.childNodes[0]){adoid=wvvw.childNodes[0].nodeValue;}else{adoid=0;}if(vwuw.childNodes[0]){addid=vwuw.childNodes[0].nodeValue;}else{addid=0;}vv="";if(uuw!=""){vv=uuw+", ";}if(vvvv!=""){vv=vv+vvvv+", ";}if(uuv!=""){vv=vv+uuv+", ";}if(uww!=""){vv=vv+uww+", ";}if(uwv!=""){vv=vv+uwv+", ";}if(vvvu!=""){vv=vv+vvvu+", ";}if(vvvw!=""){vv=vv+vvvw+", ";}if(uu!=""){vuww=uu.substring(0,uu.indexOf(" "));}else{vuww="0";}if(uvw=="T"){vvw="lblDestination";wv=document.frm_Journey.hdpcodeto;vvv=document.frm_booking.hidDestinationDesc;vw="txtDestination";vuwu=document.frm_booking.hdPostcodeTo;www="lblBnoTo";wvw="txtBnoTo";wvv="ftthid";vuuv="ftt";wuww="hidadoidTo";wuwv="hidaddidTo";}dom=findDOM(vvw,1);dom.visibility="visible";wv.value=vuww;vuwu.value=uu;vvv.value=vv;document.getElementById(vw).innerHTML=vv;document.getElementById(wvv).value=vv;document.getElementById(vuuv).value=vv;document.getElementById(wuww).value=adoid;document.getElementById(wuwv).value=addid;dom=findDOM(www,1);dom.visibility="visible";if(vv.indexOf("irport")>0||vv.indexOf("IRPORT")>0){document.getElementById(www).innerHTML="Terminal";}else{document.getElementById(www).innerHTML="House No";}dom=findDOM(wvw,1);dom.visibility="visible";dom=findDOM("slcAdrec",1);dom.visibility="hidden";dom=findDOM("lblPickAdrec",1);dom.visibility="hidden";if(uvw=="F"){flightCheckAd(vv);getPostcodeLatLong(uu,1);}else{getPostcodeLatLong(uu,2);}}else if(rst==2){dom=findDOM("slcAdrec",1);dom.visibility="visible";dom=findDOM("lblPickAdrec",1);dom.visibility="visible";document.frm_Journey.slcAdrec.options.length=0;var wvvv,i,wwuw,vwww,adoidnodes,wwuu;wvvv=xmlHttpReq.responseXML.getElementsByTagName("adid");uvvw=xmlHttpReq.responseXML.getElementsByTagName("addesc");adoidnodes=xmlHttpReq.responseXML.getElementsByTagName("adoid");wwuu=xmlHttpReq.responseXML.getElementsByTagName("addid");for(i=0;i<wvvv.length;i++){wuv=wvvv[i].childNodes[0].nodeValue;wvww=uvvw[i].childNodes[0].nodeValue;adoid=adoidnodes[i].childNodes[0].nodeValue;addid=wwuu[i].childNodes[0].nodeValue;adcombid=wuv+"|"+adoid+"|"+addid;wwuw=new Option(wvww,adcombid,false,false);vwww=document.frm_Journey.slcAdrec;vwww.options[vwww.options.length]=wwuw;}}else{document.getElementById(vw).innerHTML="Not Found";}}}};xmlHttpReq.send(null);}function updAddBno(wvw,wvv,vw,vvv){var vuuu,vuuw,uvwv,uvvu,vwwv;vuuu=wvw.value;vwwv=wvv.value;vuuw=document.getElementById(vw);uvvu=vuuw.innerHTML;vuuw.innerHTML=vuuu+" "+vwwv;vvv.value=vuuu+" "+vwwv;}function bdu(){var vwv,uw,vuv;var wwv,vvu,wu;var vvuw,wuw,uvv;var vvuu,vuw,vvuv,tbd,wuu;vwv=document.getElementById("slcmonth");uw=document.getElementById("slcday");vuv=vwv.options[vwv.selectedIndex].value;wu=uw.options[uw.selectedIndex].value;wwv=vuv.substring(0,4);vvu=vuv.substring(4);wuu=document.getElementById("txtBD");tbd=wuu.value;tbd=wu+"-"+vvu+"-"+wwv;wuu.value=tbd;txaUpd(document.frm_bDate.txtBD,"txtDate",document.frm_booking.hidDate);showLabel("lblDate");}function monthdays(){var vwv,uw,vuv,vww,seldw;var wwv,vvu,vwu;var wu=1;var vvuw,wuw,uvv;var vvuu,vuw,vvuv,tbd,wuu;vwv=document.getElementById("slcmonth");uw=document.getElementById("slcday");vuv=vwv.options[vwv.selectedIndex].value;wwv=Number(vuv.substring(0,4));vvu=Number(vuv.substring(4))-1;uvv=new Date;vvuw=uvv.getMonth();if(vvuw==vvu){wu=uvv.getDate();}wuw=vvu;vww=new Date;vww.setFullYear(wwv);vww.setMonth(vvu,wu);uw.options.length=0;while(vvu==wuw){wu=vww.getDate();selwd=vww.getDay();switch(selwd){case 0:vwu="Sun";break;case 1:vwu="Mon";break;case 2:vwu="Tue";break;case 3:vwu="Wed";break;case 4:vwu="Thu";break;case 5:vwu="Fri";break;case 6:vwu="Sat";default:;}vuw=wu;if(vuw<10){vuw="0"+vuw;}vvuv=wu;vvuu=new Option(vvuv,vuw,false,false);uw.options[uw.options.length]=vvuu;wu++;vww.setDate(wu);wuw=vww.getMonth();}}function updDate(){var uwu,wuwu,wuvu,i,uvu,vvwv;uwu=document.forms.frm_bDate.txtBD.value;wuwu=uwu.substr(0,2);wuvu=uwu.substr(6,4)+uwu.substr(3,2);vvwv=document.forms.frm_bDate.slcmonth;uvu=document.forms.frm_bDate.slcday;for(i=0;i<vvwv.options.length;i++){if(vvwv.options[i].value==wuvu){vvwv.options[i].selected="selected";monthdays();}}for(i=0;i<uvu.options.length;i++){if(uvu.options[i].value==wuwu){uvu.options[i].selected="selected";}}txaUpd(document.frm_bDate.txtBD,"txtDate",document.frm_booking.hidDate);showLabel("lblDate");}function cntrlFill(u,wv,vw,uv,vvv,vvw){var w,dom,va,i,j,ig,txthidTo,hidTo;i=u.options[u.selectedIndex].value;w=u.options[u.selectedIndex].text;wv.value=w;txtTo=document.getElementById(vw);txtTo.innerHTML=w;txthidTo=document.getElementById(vvv);txthidTo.value=w;dom=findDOM(vvw,1);dom.visibility="visible";hidTo=document.getElementById(uv);hidTo.value=i;}function cntrlFillSlc(u,vw,uv,vvv,vvw){var w,dom,va,i,j,ig,txtTo,hidTo,txthidTo;i=u.options[u.selectedIndex].value;w=u.options[u.selectedIndex].text;hidTo=document.getElementById(uv);hidTo.value=i;txtTo=document.getElementById(vw);txtTo.innerHTML=w;txthidTo=document.getElementById(vvv);txthidTo.value=w;dom=findDOM(vvw,1);dom.visibility="visible";if(vw=="txtVehicle"){txtTo.innerHTML=w+" ( <a target='Vehicle' width='500' class='link1' href='vehiclepage.asp?vid="+i+"'>Check the vehicle</a> )";}}function flightCheck(u){var w,dom,i,x,y,wv;i=u.options[u.selectedIndex].value;w=u.options[u.selectedIndex].text;x=w.indexOf("irport");y=w.indexOf("IRPORT");if(x>-1||y>-1){wv=findDOM("flight",1);wv.display="inline";}else{wv=findDOM("flight",1);wv.display="none";}}function flightCheckAd(w){var dom,x,y,wv;x=w.indexOf("irport");y=w.indexOf("IRPORT");if(x>-1||y>-1){wv=findDOM("flight",1);wv.display="inline";}else{wv=findDOM("flight",1);wv.display="none";}}function txaUpd(u,vw,uv){var w,dom,va,i,j,ig,txtTo,hidTo;w=u.value;txtTo=document.getElementById(vw);txtTo.innerHTML=w;uv.value=w;}function flightDetails(u,vw,uv,vwvu){var w,vwvw,wwu,dom,txtTo;w=u.value;txtTo=document.getElementById("ctrlTxt");wwu="<b>"+vwvu+"</b>: "+w;txtTo.innerHTML=wwu;uv.value=w;}function txaFlight(u,vw,uv,vwvu){var w,vwvw,wwu,dom,txtTo;w=u.value;txtTo=document.getElementById(vw);vwvw=txtTo.innerHTML;wwu="<b>"+vwvu+"</b>: "+w;txtTo.innerHTML=wwu;vwvw=txtTo.innerHTML;uv.value=w;}function getFlight(){var myf;myf=document.getElementById("tdFlight");}function timeUpd(){var w,wwwv,vwvv,dom,u,va,i,j,ig,txtTo,hidTo;u=document.frm_bDate.slcAmpm;wwwv=document.frm_bDate.txtTime.value;vwvv=u.options[u.selectedIndex].text;w=wwwv+" "+vwvv;txtTo=document.getElementById("strTime");txtTo.innerHTML="at "+w;document.frm_booking.hidTime.value=w;}function timeUpdSl(){var w,cHr,cMin,vwvv,dom,vvwu,vvww,va,i,j,ig,txtTo,hidTo;vvwu=document.frm_bDate.slcHour;vvww=document.frm_bDate.slcMinute;cHr=vvwu.options[vvwu.selectedIndex].text;cMin=vvww.options[vvww.selectedIndex].text;w=cHr+":"+cMin;txtTo=document.getElementById("strTime");txtTo.innerHTML="at "+w;w=w+":00";document.frm_booking.hidHour.value=cHr;document.frm_booking.hidMinute.value=cMin;document.frm_booking.hidTime.value=w;}function xmlhttpPost(wuuw,wuuv,strResultFunc){var xmlHttpReq=false;if(window.XMLHttpRequest){xmlHttpReq=new XMLHttpRequest;xmlHttpReq.overrideMimeType("text/xml");}else if(window.ActiveXObject){xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}xmlHttpReq.open("POST",wuuw,true);xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){eval(strResultFunc+"(xmlHttpReq.responseText;);");}};xmlHttpReq.send(wuuv);}function getCar(){var xmlHttpReq,vu,results,wwvv,uuu,ww;var wwvw,bi,vi,oi,di,u,bp,wwvu,wvuw,d;var wvuv,wwww,wwwu,wuvw;document.getElementById("txtPrice").innerHTML=" ";bi=document.frm_booking.hidb.value;oi=document.frm_booking.hidOrigin.value;di=document.frm_booking.hidDestination.value;wwvu=document.frm_booking.hdPostcodeFrom.value;wvuw=document.frm_booking.hdPostcodeTo.value;d=document.frm_booking.hidDistance.value;wvuv=document.frm_booking.hidadoidFrom.value;wwww=document.frm_booking.hidaddidFrom.value;wwwu=document.frm_booking.hidadoidTo.value;wuvw=document.frm_booking.hidaddidTo.value;u=document.frm_vehicle.slcVehicle;vi=u.options[u.selectedIndex].value;vu="xmlhtgetcarad.asp?bi="+bi+"&vi="+vi+"&op="+wwvu+"&dp="+wvuw+"&di="+di+"&d="+d;vu=vu+"&foid="+wvuv+"&fdid="+wwww+"&toid="+wwwu+"&tdid="+wuvw;vuu=parseInt(Math.random()*99999999999999);vu=vu+"&mr="+vuu;if(window.XMLHttpRequest){try{xmlHttpReq=new XMLHttpRequest;xmlHttpReq.overrideMimeType("text/xml");}catch(err1){try{xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}catch(err2){xmlHttpReq=new ActiveXObject("Msml2.XMLHTTP");}}}else if(window.ActiveXObject){xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}xmlHttpReq.open("GET",vu,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){wwvv=xmlHttpReq.responseText;results=wwvv.split("|");wwvw=results[0];uuu=results[1];ww=results[2];ww=parseFloat(ww);ww=ww.toFixed(2);document.getElementById("txtVehicle").innerHTML=wwvw+" (Max "+uuu+" passengers)<br>( <a target='Vehicle' width='500' class='link1' href='vehiclepage.asp?vid="+vi+"'>Check the vehicle</a> )";document.getElementById("txtPassengers").value=uuu;if(ww>-1){if(ww==0){ww="Call";}document.getElementById("txtPrice").innerHTML="\xA3"+ww;dom=findDOM("lblPrice",1);dom.visibility="visible";document.getElementById("hidPrice").value=ww;document.getElementById("hidVehicle").value=vi;document.getElementById("hidPgrs").value=uuu;dom=findDOM("lblPriceNote",1);dom.visibility="visible";}else{alert("Unfortunately we can not accept your booking as it is outside the area of our operation. You may wish to visit www.CabBookers.com to find a cab service closer to you.");document.frm_booking.hidOrigin.value=0;document.frm_booking.hdPostcodeFrom.value="";document.frm_Journey.ftf.value="";document.frm_Journey.ftt.value="";}}}};xmlHttpReq.send(null);}function getUser(){var xmlHttpReq;var vu,results,us,ps,sn,snval,bi,ad,adval,vv,phn,wwuv,mbl,wuvv,em,wvuu;bi=document.frm_booking.hidb.value;us=document.frm_login.txtUser.value;ps=document.frm_login.txtPass.value;vu="xmlhtgetuser.asp?bi="+bi+"&us="+us+"&ps="+ps;vuu=parseInt(Math.random()*99999999999999);vu=vu+"&mr="+vuu;if(window.XMLHttpRequest){try{xmlHttpReq=new XMLHttpRequest;xmlHttpReq.overrideMimeType("text/xml");}catch(err1){try{xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}catch(err2){xmlHttpReq=new ActiveXObject("Msml2.XMLHTTP");}}}else if(window.ActiveXObject){xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}xmlHttpReq.open("GET",vu,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){sn=xmlHttpReq.responseXML.getElementsByTagName("sname")[0];ad=xmlHttpReq.responseXML.getElementsByTagName("adr")[0];phn=xmlHttpReq.responseXML.getElementsByTagName("phn")[0];mbl=xmlHttpReq.responseXML.getElementsByTagName("mbl")[0];em=xmlHttpReq.responseXML.getElementsByTagName("em")[0];snval=sn.childNodes[0].nodeValue;adval=ad.childNodes[0].nodeValue;wwuv=phn.childNodes[0].nodeValue;wuvv=mbl.childNodes[0].nodeValue;wvuu=em.childNodes[0].nodeValue;vv=snval+"<br>"+adval+"<br><br>"+"<b>Tel: </b>"+wwuv+"<br><b>Tel: </b>"+wuvv+"<br><b>Email: </b>"+wvuu+"<br><br>";document.getElementById("txtContact").innerHTML=vv;bookName=findDOM("bookname",1);bookName.display="block";document.frm_login.txtBookname.value=snval;document.frm_booking.hidBookname.value=snval;dom=findDOM("submitbp",1);dom.visibility="visible";var bn="<b>Booking Name: </b>"+snval;document.getElementById("tdBookname").innerHTML=bn;showLabel("lblContact");}else{}}};xmlHttpReq.send(null);}function usehttpresponse(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){var timeValue=xmlHttpReq.responseText;}}}function opwindow(url,wtyp){window.open(url,0,"toolbar=0,directories=0,status=0, menubar=0,scrollbars=0,resizable=1,width=400,height=150,left=250,top=450");}function showLabel(vvw){dom=findDOM(vvw,1);dom.visibility="visible";}function newUser(){document.frm_booking.action="bookingpnu.asp";document.frm_booking.submit();}function changePage(newLoc){nextPage=newLoc.options[newLoc.selectedIndex].text;if(nextPage!=""){}}