var bbbdd="F";function resetTrip(bdbddb){if(bdbddb=="F"){bbbdd="F";}}function getAddressv1(bd,bbb,dd,ddd,bbbb,bdbdd){var xmlHttpReq;var bbd,results,dbddd,rst,db;var bbdbb,bbdbd,bdbdb,bdbbd,bbddd,bdbbb,bbddb,bdbb,bdbbdb;var ddbbd,ddbbb,dbbdb,bddbb,dbbbd,bdddb,dbbbb,ddbdb;var bdbbbd,bdbbdd,bbbbdd,bbbdbb;var bbbbdb,dbdb,dbbb,bbbbbd;bbbdbb=document.frm_booking.hdPostcodeFrom;bbbbdb="lblBnoFrom";dbdb="txtBnoFrom";dbbb="ftfhid";bbbbbd="ftf";if(dd=="txtDestination"){bbbdd="T";}if(bdbdd==0){dbddd=bd.value;}else{bbbbdd=document.frm_Journey.slcAdrec;bdbdd=bbbbdd.options[bbbbdd.selectedIndex].value;dbddd="0";}bbd="getaddress.asp?adid="+bdbdd+"&ft="+dbddd;dbbd=parseInt(Math.random()*99999999999999);bbd=bbd+"&mr="+dbbd;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",bbd,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){rst=xmlHttpReq.responseXML.getElementsByTagName("rst")[0].childNodes[0].nodeValue;if(rst==1){ddbbd=xmlHttpReq.responseXML.getElementsByTagName("organ")[0];ddbbb=xmlHttpReq.responseXML.getElementsByTagName("line1")[0];dbbdb=xmlHttpReq.responseXML.getElementsByTagName("line2")[0];bddbb=xmlHttpReq.responseXML.getElementsByTagName("line3")[0];dbbbd=xmlHttpReq.responseXML.getElementsByTagName("line4")[0];bdddb=xmlHttpReq.responseXML.getElementsByTagName("town")[0];dbbbb=xmlHttpReq.responseXML.getElementsByTagName("county")[0];ddbdb=xmlHttpReq.responseXML.getElementsByTagName("postcode")[0];if(ddbbd.childNodes[0]){bbdbb=ddbbd.childNodes[0].nodeValue;}else{bbdbb="";}if(ddbbb.childNodes[0]){bbdbd=ddbbb.childNodes[0].nodeValue;}else{bbdbd="";}if(dbbdb.childNodes[0]){bdbdb=dbbdb.childNodes[0].nodeValue;}else{bdbdb="";}if(bddbb.childNodes[0]){bdbbd=bddbb.childNodes[0].nodeValue;}else{bdbbd="";}if(dbbbd.childNodes[0]){bbddd=dbbbd.childNodes[0].nodeValue;}else{bbddd="";}if(bdddb.childNodes[0]){bdbbb=bdddb.childNodes[0].nodeValue;}else{bdbbb="";}if(dbbbb.childNodes[0]){bbddb=dbbbb.childNodes[0].nodeValue;}else{bbddb="";}if(ddbdb.childNodes[0]){bdbb=ddbdb.childNodes[0].nodeValue;}else{bdbb="";}db="";if(bbdbb!=""){db=bbdbb+", ";}if(bbdbd!=""){db=db+bbdbd+", ";}if(bdbdb!=""){db=db+bdbdb+", ";}if(bdbbd!=""){db=db+bdbbd+", ";}if(bbddd!=""){db=db+bbddd+", ";}if(bdbbb!=""){db=db+bdbbb+", ";}if(bbddb!=""){db=db+bbddb+", ";}bdbbdb=bdbb.substring(0,bdbb.indexOf(" "));if(bbbdd=="T"){bbbb="lblDestination";bbb=document.frm_Journey.hdpcodeto;ddd=document.frm_booking.hidDestinationDesc;dd="txtDestination";bbbdbb=document.frm_booking.hdPostcodeTo;bbbbdb="lblBnoTo";dbdb="txtBnoTo";dbbb="ftthid";bbbbbd="ftt";}dom=findDOM(bbbb,1);dom.visibility="visible";bbb.value=bdbbdb;bbbdbb.value=bdbb;ddd.value=db;document.getElementById(dd).innerHTML=db;document.getElementById(dbbb).value=db;document.getElementById(bbbbbd).value=db;dom=findDOM(bbbbdb,1);dom.visibility="visible";dom=findDOM(dbdb,1);dom.visibility="visible";dom=findDOM("slcAdrec",1);dom.visibility="hidden";dom=findDOM("lblPickAdrec",1);dom.visibility="hidden";if(bbbdd=="F"){flightCheckAd(db);getPostcodeLatLong(bdbb,1);}else{getPostcodeLatLong(bdbb,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 ddddd,i,bbdddb,bbbdbd;ddddd=xmlHttpReq.responseXML.getElementsByTagName("adid");bdbdbd=xmlHttpReq.responseXML.getElementsByTagName("addesc");for(i=1;i<ddddd.length;i++){bdbbbd=ddddd[i].childNodes[0].nodeValue;bdbbdd=bdbdbd[i].childNodes[0].nodeValue;bbdddb=new Option(bdbbdd,bdbbbd,false,false);bbbdbd=document.frm_Journey.slcAdrec;bbbdbd.options[bbbdbd.options.length]=bbdddb;}}else{document.getElementById(dd).innerHTML="Not Found";}}}};xmlHttpReq.send(null);}function updAddBno(dbdb,dbbb,dd,ddd){var dddbd,ddddb,bddbbd,bddbbb,bbbbbb;dddbd=dbdb.value;bbbbbb=dbbb.value;ddddb=document.getElementById(dd);bddbbb=ddddb.innerHTML;ddddb.innerHTML=dddbd+" "+bbbbbb;ddd.value=dddbd+" "+bbbbbb;}function bdu(){var bbdb,ddb,bbbd;var dbdd,dbd,bdd;var dddbb,dddd,dddb;var ddbdd,bddd,bddbd,tbd,ddbd;bbdb=document.getElementById("slcmonth");ddb=document.getElementById("slcday");bbbd=bbdb.options[bbdb.selectedIndex].value;bdd=ddb.options[ddb.selectedIndex].value;dbdd=bbbd.substring(0,4);dbd=bbbd.substring(4);ddbd=document.getElementById("txtBD");tbd=ddbd.value;tbd=bdd+"-"+dbd+"-"+dbdd;ddbd.value=tbd;txaUpd(document.frm_bDate.txtBD,"txtDate",document.frm_booking.hidDate);showLabel("lblDate");}function monthdays(){var bbdb,ddb,bbbd,bdbd,seldw;var dbdd,dbd,bbdd;var bdd=1;var dddbb,dddd,dddb;var ddbdd,bddd,bddbd,tbd,ddbd;bbdb=document.getElementById("slcmonth");ddb=document.getElementById("slcday");bbbd=bbdb.options[bbdb.selectedIndex].value;dbdd=Number(bbbd.substring(0,4));dbd=Number(bbbd.substring(4))-1;dddb=new Date;dddbb=dddb.getMonth();if(dddbb==dbd){bdd=dddb.getDate();}dddd=dbd;bdbd=new Date;bdbd.setFullYear(dbdd);bdbd.setMonth(dbd,bdd);ddb.options.length=0;while(dbd==dddd){bdd=bdbd.getDate();selwd=bdbd.getDay();switch(selwd){case 0:bbdd="Sun";break;case 1:bbdd="Mon";break;case 2:bbdd="Tue";break;case 3:bbdd="Wed";break;case 4:bbdd="Thu";break;case 5:bbdd="Fri";break;case 6:bbdd="Sat";default:;}bddd=bdd;if(bddd<10){bddd="0"+bddd;}bddbd=bdd;ddbdd=new Option(bddbd,bddd,false,false);ddb.options[ddb.options.length]=ddbdd;bdd++;bdbd.setDate(bdd);dddd=bdbd.getMonth();}}function updDate(){var bbbdb,bbdddd,bdbbbb,i,bbbbd,bbbbb;bbbdb=document.forms.frm_bDate.txtBD.value;bbdddd=bbbdb.substr(0,2);bdbbbb=bbbdb.substr(6,4)+bbbdb.substr(3,2);bbbbb=document.forms.frm_bDate.slcmonth;bbbbd=document.forms.frm_bDate.slcday;for(i=0;i<bbbbb.options.length;i++){if(bbbbb.options[i].value==bdbbbb){bbbbb.options[i].selected="selected";monthdays();}}for(i=0;i<bbbbd.options.length;i++){if(bbbbd.options[i].value==bbdddd){bbbbd.options[i].selected="selected";}}txaUpd(document.frm_bDate.txtBD,"txtDate",document.frm_booking.hidDate);showLabel("lblDate");}function cntrlFill(bd,bbb,dd,dbb,ddd,bbbb){var bb,dom,va,i,j,ig,txthidTo,hidTo;i=bd.options[bd.selectedIndex].value;bb=bd.options[bd.selectedIndex].text;bbb.value=bb;txtTo=document.getElementById(dd);txtTo.innerHTML=bb;txthidTo=document.getElementById(ddd);txthidTo.value=bb;dom=findDOM(bbbb,1);dom.visibility="visible";hidTo=document.getElementById(dbb);hidTo.value=i;}function cntrlFillSlc(bd,dd,dbb,ddd,bbbb){var bb,dom,va,i,j,ig,txtTo,hidTo,txthidTo;i=bd.options[bd.selectedIndex].value;bb=bd.options[bd.selectedIndex].text;hidTo=document.getElementById(dbb);hidTo.value=i;txtTo=document.getElementById(dd);txtTo.innerHTML=bb;txthidTo=document.getElementById(ddd);txthidTo.value=bb;dom=findDOM(bbbb,1);dom.visibility="visible";if(dd=="txtVehicle"){txtTo.innerHTML=bb+" ( <a target='Vehicle' width='500' class='link1' href='vehiclepage.asp?vid="+i+"'>Check the vehicle</a> )";}}function flightCheck(bd){var bb,dom,i,x,y,bbb;i=bd.options[bd.selectedIndex].value;bb=bd.options[bd.selectedIndex].text;x=bb.indexOf("irport");y=bb.indexOf("IRPORT");if(x>-1||y>-1){bbb=findDOM("flight",1);bbb.display="inline";}else{bbb=findDOM("flight",1);bbb.display="none";}}function flightCheckAd(bb){var dom,x,y,bbb;x=bb.indexOf("irport");y=bb.indexOf("IRPORT");if(x>-1||y>-1){bbb=findDOM("flight",1);bbb.display="inline";}else{bbb=findDOM("flight",1);bbb.display="none";}}function txaUpd(bd,dd,dbb){var bb,dom,va,i,j,ig,txtTo,hidTo;bb=bd.value;txtTo=document.getElementById(dd);txtTo.innerHTML=bb;dbb.value=bb;}function flightDetails(bd,dd,dbb,dbdbd){var bb,dbddb,bddb,dom,txtTo;bb=bd.value;txtTo=document.getElementById("ctrlTxt");bddb="<b>"+dbdbd+"</b>: "+bb;alert(bddb);txtTo.innerHTML=bddb;dbb.value=bb;}function txaFlight(bd,dd,dbb,dbdbd){var bb,dbddb,bddb,dom,txtTo;bb=bd.value;txtTo=document.getElementById(dd);dbddb=txtTo.innerHTML;bddb="<b>"+dbdbd+"</b>: "+bb;txtTo.innerHTML=bddb;dbddb=txtTo.innerHTML;dbb.value=bb;}function getFlight(){var myf;myf=document.getElementById("tdFlight");alert(myf.innerHTML);}function timeUpd(){var bb,bbdbdd,dbdbb,dom,bd,va,i,j,ig,txtTo,hidTo;bd=document.frm_bDate.slcAmpm;bbdbdd=document.frm_bDate.txtTime.value;dbdbb=bd.options[bd.selectedIndex].text;bb=bbdbdd+" "+dbdbb;txtTo=document.getElementById("strTime");txtTo.innerHTML="at "+bb;document.frm_booking.hidTime.value=bb;}function timeUpdSl(){var bb,cHr,cMin,dbdbb,dom,dbbdd,bdddd,va,i,j,ig,txtTo,hidTo;dbbdd=document.frm_bDate.slcHour;bdddd=document.frm_bDate.slcMinute;cHr=dbbdd.options[dbbdd.selectedIndex].text;cMin=bdddd.options[bdddd.selectedIndex].text;bb=cHr+":"+cMin;txtTo=document.getElementById("strTime");txtTo.innerHTML="at "+bb;bb=bb+":00";document.frm_booking.hidHour.value=cHr;document.frm_booking.hidMinute.value=cMin;document.frm_booking.hidTime.value=bb;}function xmlhttpPost(bdbddd,bdbdbb,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",bdbddd,true);xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){eval(strResultFunc+"(xmlHttpReq.responseText;);");}};xmlHttpReq.send(bdbdbb);}function getCar(){var xmlHttpReq,bbd,results,bbddbb,ddbb,bdb;var bbdbbd,bi,vi,oi,di,bd,bp,bbdbdb,bbddbd,d;document.getElementById("txtPrice").innerHTML=" ";bi=document.frm_booking.hidb.value;oi=document.frm_booking.hidOrigin.value;di=document.frm_booking.hidDestination.value;bbdbdb=document.frm_booking.hdPostcodeFrom.value;bbddbd=document.frm_booking.hdPostcodeTo.value;d=document.frm_booking.hidDistance.value;bd=document.frm_vehicle.slcVehicle;vi=bd.options[bd.selectedIndex].value;bbd="xmlhtgetcarad.asp?bi="+bi+"&vi="+vi+"&op="+bbdbdb+"&dp="+bbddbd+"&di="+di+"&d="+d;dbbd=parseInt(Math.random()*99999999999999);bbd=bbd+"&mr="+dbbd;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",bbd,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){bbddbb=xmlHttpReq.responseText;results=bbddbb.split("|");bbdbbd=results[0];ddbb=results[1];bdb=results[2];bdb=parseFloat(bdb);bdb=bdb.toFixed(2);document.getElementById("txtVehicle").innerHTML=bbdbbd+" (Max "+ddbb+" passengers)<br>( <a target='Vehicle' width='500' class='link1' href='vehiclepage.asp?vid="+vi+"'>Check the vehicle</a> )";document.getElementById("txtPassengers").value=ddbb;if(bdb>-1){if(bdb==0){bdb="Call";}document.getElementById("txtPrice").innerHTML="\xA3"+bdb;dom=findDOM("lblPrice",1);dom.visibility="visible";document.getElementById("hidPrice").value=bdb;document.getElementById("hidPgrs").value=ddbb;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 bbd,results,us,ps,sn,snval,bi,ad,adval,db,phn,bbbddb,mbl,bbbddd,em,bbdbbb;bi=document.frm_booking.hidb.value;us=document.frm_login.txtUser.value;ps=document.frm_login.txtPass.value;bbd="xmlhtgetuser.asp?bi="+bi+"&us="+us+"&ps="+ps;dbbd=parseInt(Math.random()*99999999999999);bbd=bbd+"&mr="+dbbd;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",bbd,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;bbbddb=phn.childNodes[0].nodeValue;bbbddd=mbl.childNodes[0].nodeValue;bbdbbb=em.childNodes[0].nodeValue;db=snval+"<br>"+adval+"<br><br>"+"<b>Tel: </b>"+bbbddb+"<br><b>Tel: </b>"+bbbddd+"<br><b>Email: </b>"+bbdbbb+"<br><br>";document.getElementById("txtContact").innerHTML=db;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;alert(timeValue);}}}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(bbbb){dom=findDOM(bbbb,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!=""){alert(nextPage);}}