var mmmm,nmmn,mmnm,mmnmm,tblvclfcs,bi,mmmmmm;var waypoints=new Array;mmmm=0;mmnm=0;nmmn=0;mmnmm=0;tblvclfcs=0;mmmmmm=0;bi=105;function gethidb(){bi=document.getElementById("hidb").value;}function odClick(ctrl,odt,mmn){var nmmmn,tdctrl,mmnnmn,nmnnmn,mnnm,mmnmn,nmnnnn,searchtxt,nmnmnm;toggleTblprice(0);if(ctrl==1){tdctrl="tdorigctrl";mmmnmn="tblorigctrl";nmmmn="tblorigadr";mmnnmn="origComment";nmnnmn="origInstruct";nmnnnn="tblorigQ";hidODType="hidOrigType";mmmmmnm="origAdrTxtPc";nmm="hidOrigAdress";mnm="tbladlist";}else{tdctrl="tddestctrl";mmmnmn="tbldestctrl";nmmmn="tbldestadr";mmnnmn="destComment";nmnnmn="destInstruct";nmnnnn="tbldestQ";hidODType="hidDestType";mmmmmnm="destAdrTxtPc";nmm="hidDestAdress";mnm="tbladlistDest";}dom=findDOM(nmnnnn,1);dom.display="none";document.getElementById(mmmmmnm).innerHTML="";document.getElementById(nmm).value="";document.getElementById(hidODType).value=odt;if(odt==-1){var mmnnn;document.getElementById("txtOrigPostcode").display="none";document.getElementById("btnTxtFrom").display="inline";document.getElementById("txtFrom").display="inline";document.getElementById(mmnnmn).innerHTML="<b>Please enter the street name and/or any part of postcode and click submit.</b>";dom=findDOM(mmmnmn,1);dom.display="none";dom=findDOM(nmmmn,1);dom.display="inline";if(ctrl==1){dom=findDOM("rdDstType15",1);dom.display="inline";dom=findDOM("rdDstType16",1);dom.display="inline";dom=findDOM("rdDstType3",1);dom.display="inline";dom=findDOM("rdDstType-1",1);dom.display="inline";}else{dom=findDOM("rdOrgType15",1);dom.display="inline";dom=findDOM("rdOrgType16",1);dom.display="inline";dom=findDOM("rdOrgType3",1);dom.display="inline";dom=findDOM("rdOrgType-1",1);dom.display="inline";}}else if(odt==3){dom=findDOM(mmmnmn,1);if(dom.display=="none"){dom.display="inline";dom=findDOM(nmmmn,1);dom.display="none";dom=findDOM(mnm,1);dom.display="none";}if(ctrl==1){mnnm="txtOrigPostcode";mmnmn="txtOrigPostcode";nmnmnm="btnTxtFrom";searchtxt="txtFrom";}else{mnnm="txtDestPostcode";mmnmn="txtDestPostcode";nmnmnm="btnTxtDestination";searchtxt="txtDestination";}document.getElementById(tdctrl).innerHTML="<input type='text' name='"+mnnm+"' id='"+mmnmn+"' onblur='getAddressPC("+ctrl+")'>";document.getElementById(mnnm).display="inline";document.getElementById(nmnmnm).display="none";document.getElementById(searchtxt).display="none";document.getElementById(mmnnmn).innerHTML="Please enter the full postcode including spaces.<br>Examples; (SW1 9SJ) (N1 9PU).";document.getElementById(nmnnmn).innerHTML="<b>Enter Postcode</b>";if(ctrl==1){dom=findDOM("rdDstType15",1);dom.display="inline";dom=findDOM("rdDstType16",1);dom.display="inline";dom=findDOM("rdDstType3",1);dom.display="inline";dom=findDOM("rdDstType-1",1);dom.display="inline";}else{dom=findDOM("rdOrgType15",1);dom.display="inline";dom=findDOM("rdOrgType16",1);dom.display="inline";dom=findDOM("rdOrgType3",1);dom.display="inline";dom=findDOM("rdOrgType-1",1);dom.display="inline";}}else{dom=findDOM(mmmnmn,1);if(dom.display=="none"){dom.display="inline";dom=findDOM(nmmmn,1);dom.display="none";dom=findDOM(mnm,1);dom.display="none";}if(ctrl==1){mnnm="origList";mmnmn="origList";}else{mnnm="destList";mmnmn="destList";}if(odt==-5){document.getElementById(tdctrl).innerHTML="<select id='"+mmnmn+"' name='"+mnnm+"' style='width:250px; font-size:11px;' onchange='gtAdBk("+ctrl+")'><option value='-1'></option></select>";pplAdBk(ctrl,odt,mmn);}else{document.getElementById(tdctrl).innerHTML="<select id='"+mmnmn+"' name='"+mnnm+"' style='width:250px; font-size:11px;' onchange='getPostcode("+ctrl+")'><option value='-1'></option></select>";populateCtrl(ctrl,odt,mmn);}}}function populateCtrl(ctrl,odt,mmn){var nnmnm,mnnmm,nmnmm,mnnnn,mmmnn,mnn,nmmnm,i,mmmnm,nnmm,mmmmnnm;mm="xmlGetOdList.asp?bi="+bi+"&odt="+odt;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){if(ctrl==1){document.getElementById("origList").options.length=0;mmmnm="origComment";nnmm="origInstruct";}else if(ctrl==2){document.getElementById("destList").options.length=0;mmmnm="destComment";nnmm="destInstruct";}mnnnn=xmlHttpReq.responseXML.getElementsByTagName("odloc");nnmnm=xmlHttpReq.responseXML.getElementsByTagName("odid");mnnmm=xmlHttpReq.responseXML.getElementsByTagName("oddesc");nmnmm=xmlHttpReq.responseXML.getElementsByTagName("odpostcode");if(ctrl==1){document.getElementById("origList").options[0]=new Option("Please select",0,false,false);}else if(ctrl==2){document.getElementById("destList").options[0]=new Option("Please select",0,false,false);}for(i=0;i<mnnnn.length;i++){mmmnn=nnmnm[i].childNodes[0].nodeValue;mnn=mnnmm[i].childNodes[0].nodeValue;nmmnm=nmnmm[i].childNodes[0].nodeValue;if(odt==15){mnn=mnn+" - "+nmmnm;}if(ctrl==1){document.getElementById("origList").options[i+1]=new Option(mnn,mmmnn,false,false);}else if(ctrl==2){document.getElementById("destList").options[i+1]=new Option(mnn,mmmnn,false,false);}}document.getElementById(mmmnm).innerHTML="Please select the "+mmn+" from the list below. If your "+mmn+" is not on the list, click on postcode and enter the full postcode of the "+mmn+".";document.getElementById(nnmm).innerHTML=mmn;}}};xmlHttpReq.send(null);}function getFullAddress(mmmmnn,nmmm,myid){var xmlHttpReq;var mm,results,freetext,rst,cnt;var nnnnn,nnnmn,mmnnmm,mmmnnn,mmnnnm,mnmmmm,mmnmmn,nm,nnmmn;var nmmnnn,nmnmmm,nmmmnm,nnmmmm,nmmmnn,nmmnmn,nmmnmm,mmm;var nnmnn,mmmmnmm,nmnmn,mmnmnmn,mmnmnnn,mnmm,mnm;var lblBno,nnmmm,nmnnn,searchbox,adoid,addid,mnmmn,mmmmmmm;var nmnmnn,nmnnmm,trip,nmm,ctrlHidPc;document.frmBooking.hidDistance.value=0;toggleTblprice(0);lblBno="lblBnoFrom";nnmmm="txtBnoFrom";nmnnn="ftfhid";searchbox="ftf";mmnmnm="hidadoidFrom";mmnmnn="hidaddidFrom";mnmm="origAdrTxt";mnm="tbladlist";nmm="hidOrigAdress";mnmmm=document.frmBooking.slcAdrec;ctrlHidPc="hidOrigPc";trip="F";if(nmmm=="txtDestination"){trip="T";nmmm="txtDestination";lblBno="lblBnoTo";nnmmm="txtBnoTo";nmnnn="ftthid";searchbox="ftt";mmnmnm="hidadoidTo";mmnmnn="hidaddidTo";mnmm="destAdrTxt";mnm="tbladlistDest";mnmmm=document.frmBooking.slcAdrecDest;}if(nmmm=="txtVia"){trip="V";lblBno="lblBnoVia";nnmmm="txtBnoVia";nmnnn="ftvhid";searchbox="ftv";mmnmnm="hidadoidVia";mmnmnn="hidaddidVia";mnmm="ViaAdrTxt";mnm="tbladlistVia";mnmmm=document.frmBooking.slcAdrecVia;}if(myid==0){freetext=mmmmnn.value;nnmnn="0";adoid="0";addid="0";}else{nmnmn=mnmmm;mmmmmmm=nmnmn.options[nmnmn.selectedIndex].value;freetext=nmnmn.options[nmnmn.selectedIndex].text;mnmmn=mmmmmmm.split("|");nnmnn=mnmmn[0];adoid=mnmmn[1];addid=mnmmn[2];}mm="getaddressPC.asp?adid="+nnmnn+"&adoid="+adoid+"&addid="+addid+"&ft="+freetext;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){rst=xmlHttpReq.responseXML.getElementsByTagName("rst")[0].childNodes[0].nodeValue;if(rst==1){nmmnnn=xmlHttpReq.responseXML.getElementsByTagName("organ")[0];nmnmmm=xmlHttpReq.responseXML.getElementsByTagName("line1")[0];nmmmnm=xmlHttpReq.responseXML.getElementsByTagName("line2")[0];nnmmmm=xmlHttpReq.responseXML.getElementsByTagName("line3")[0];nmmmnn=xmlHttpReq.responseXML.getElementsByTagName("line4")[0];nmmnmn=xmlHttpReq.responseXML.getElementsByTagName("town")[0];nmmnmm=xmlHttpReq.responseXML.getElementsByTagName("county")[0];mmm=xmlHttpReq.responseXML.getElementsByTagName("postcode")[0];nmnmnn=xmlHttpReq.responseXML.getElementsByTagName("adoid")[0];nmnnmm=xmlHttpReq.responseXML.getElementsByTagName("addid")[0];if(nmmnnn.childNodes[0]){nnnnn=nmmnnn.childNodes[0].nodeValue;}else{nnnnn="";}if(nmnmmm.childNodes[0]){nnnmn=nmnmmm.childNodes[0].nodeValue;}else{nnnmn="";}if(nmmmnm.childNodes[0]){mmnnmm=nmmmnm.childNodes[0].nodeValue;}else{mmnnmm="";}if(nnmmmm.childNodes[0]){mmmnnn=nnmmmm.childNodes[0].nodeValue;}else{mmmnnn="";}if(nmmmnn.childNodes[0]){mmnnnm=nmmmnn.childNodes[0].nodeValue;}else{mmnnnm="";}if(nmmnmn.childNodes[0]){mnmmmm=nmmnmn.childNodes[0].nodeValue;}else{mnmmmm="";}if(nmmnmm.childNodes[0]){mmnmmn=nmmnmm.childNodes[0].nodeValue;}else{mmnmmn="";}if(mmm.childNodes[0]){nm=mmm.childNodes[0].nodeValue;}else{nm="";}if(nmnmnn.childNodes[0]){adoid=nmnmnn.childNodes[0].nodeValue;}else{adoid=0;}if(nmnnmm.childNodes[0]){addid=nmnnmm.childNodes[0].nodeValue;}else{addid=0;}cnt="";if(nnnnn!=""){cnt=nnnnn+", ";}if(nnnmn!=""){cnt=cnt+nnnmn+", ";}if(mmnnmm!=""){cnt=cnt+mmnnmm+", ";}if(mmmnnn!=""){cnt=cnt+mmmnnn+", ";}if(mmnnnm!=""){cnt=cnt+mmnnnm+", ";}if(mnmmmm!=""){cnt=cnt+mnmmmm+", ";}if(mmnmmn!=""){cnt=cnt+mmnmmn+", ";}if(nm!=""){nnmmn=nm.substring(0,nm.indexOf(" "));}else{nnmmn="0";}if(trip=="T"){nmmm="txtDestination";lblBno="lblBnoTo";nnmmm="txtBnoTo";nmnnn="ftthid";searchbox="ftt";mmnmnm="hidadoidTo";mmnmnn="hidaddidTo";mnmm="destAdrTxt";mnm="tbladlistDest";nmm="hidDestAdress";mnmmm=document.frmBooking.slcAdrecDest;ctrlHidPc="hidDestPc";}if(trip=="V"){nmmm="txtVia";lblBno="lblBnoVia";nnmmm="txtBnoVia";nmnnn="ftvhid";searchbox="ftv";mmnmnm="hidadoidVia";mmnmnn="hidaddidVia";mnmm="ViaAdrTxt";mnm="tbladlistVia";nmm="hidViaAdress";mnmmm=document.frmBooking.slcAdrecVia;var tblViaList,newRow,newCell,viaLinkRemove,vn;tblViaList=document.getElementById("tblviaList");vn=tblViaList.rows.length-3;newRow=tblViaList.insertRow(tblViaList.rows.length);newCell=newRow.insertCell(0);newCell.innerHTML=vn+1;newCell.className="txt4";newCell=newRow.insertCell(1);newCell.innerHTML=cnt;newCell.className="txt4";newCell=newRow.insertCell(2);newCell.innerHTML="<a class=\"link1f\" href=\"javascript:removeVia("+vn+");\">Remove</a>";newCell.className="link1";}if(trip=="T"||trip=="F"){document.getElementById(nmmm).value=nm;document.getElementById(ctrlHidPc).value=nm;document.getElementById(mnmm).innerHTML=cnt;document.getElementById(nmm).value=cnt;}else{document.getElementById(nmmm).value=nm;document.getElementById(nmm).value=cnt;}dom=findDOM(mnm,1);dom.display="none";if(trip=="F"){getPostcodeLatLong(nm,1);}else if(trip=="T"){getPostcodeLatLong(nm,2);}else{getPostcodeLatLong(nm,3);}}else if(rst==2){dom=findDOM(mnm,1);dom.display="inline";if(trip=="T"){document.frmBooking.slcAdrecDest.options.length=0;}else if(trip=="F"){document.frmBooking.slcAdrec.options.length=0;}else{document.frmBooking.slcAdrecVia.options.length=0;}var nmmnnm,i,newad,mnmmm,nnmmnm,nnmnnn;nmmnnm=xmlHttpReq.responseXML.getElementsByTagName("adid");mmmnmmn=xmlHttpReq.responseXML.getElementsByTagName("addesc");nnmmnm=xmlHttpReq.responseXML.getElementsByTagName("adoid");nnmnnn=xmlHttpReq.responseXML.getElementsByTagName("addid");for(i=0;i<nmmnnm.length;i++){nnmnn=nmmnnm[i].childNodes[0].nodeValue;mmmmnmm=mmmnmmn[i].childNodes[0].nodeValue;adoid=nnmmnm[i].childNodes[0].nodeValue;addid=nnmnnn[i].childNodes[0].nodeValue;mnmmn=nnmnn+"|"+adoid+"|"+addid;newad=new Option(mmmmnmm,mnmmn,false,false);if(trip=="T"){document.frmBooking.slcAdrecDest.options[document.frmBooking.slcAdrecDest.options.length]=newad;}else if(trip=="F"){document.frmBooking.slcAdrec.options[document.frmBooking.slcAdrec.options.length]=newad;}else{document.frmBooking.slcAdrecVia.options[document.frmBooking.slcAdrecVia.options.length]=newad;}}}else{document.getElementById(nmmm).value="Not Found";}}}};xmlHttpReq.send(null);}function removeVia(vn){toggleTblprice(0);var tblViaList,rn,i,viaCells;waypoints.splice(vn,1);tblViaList=document.getElementById("tblviaList");tblViaList.deleteRow(vn+3);rn=tblViaList.rows.length;if(rn>3){for(var i=1;i<rn-2;i++){viaCells=tblViaList.rows[i+2].cells;viaCells[0].innerText=i;viaCells[2].innerHTML="<a href=\"javascript:removeVia("+(i-1)+");\">Remove</a>";}}assignLatLng(0,0,3);}function showVehicle(vid,mmmnnm){if(vid>0){var mm,mn,mmnnn;var mmmnmnm,results,vid,mmmnnmm,nmnmmn,mmnmmnm,mmnmmnn,mmnmmmn;mm="xmlGetVehicle.asp?bi="+bi+"&vi="+vid+"&pi="+mmmnnm;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){mmnnn=xmlHttpReq.responseText;document.getElementById("tdVclDetails").innerHTML=mmnnn;dom=findDOM("imgapmsg",1);dom.display="inline";}}};xmlHttpReq.send(null);}else if(vid==0){document.getElementById("tdVclDetails").innerHTML="";}else{}if(vid==0){showVehicleStatic(mmmnnm);}}function showVehicleStatic(mmmnnm){var vid;for(var i=0;i<frmBooking.rdVclType.length;i++){if(frmBooking.rdVclType[i].checked){vi=document.frmBooking.rdVclType[i].value;break;}else{vi=0;}}vid=vi;if(vid>0){var mm,mn,mmnnn;var mmmnmnm,results,vid,mmmnnmm,nmnmmn,mmnmmnm,mmnmmnn,mmnmmmn;mm="xmlGetVehicle.asp?bi="+bi+"&vi="+vid+"&pi="+mmmnnm;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){mmnnn=xmlHttpReq.responseText;document.getElementById("tdVclDetails").innerHTML=mmnnn;dom=findDOM("imgapmsg",1);dom.display="inline";}}};xmlHttpReq.send(null);}else if(vid==0){document.getElementById("tdVclDetails").innerHTML="";}else{}}function showGT(showyn){if(showyn==0){dom=findDOM("tblgt",1);dom.display="none";dom=findDOM("btnQuote",1);dom.display="inline";dom=findDOM("btnQuery",1);dom.display="none";document.frmBooking.action="bookd2.asp";}else{if(document.getElementById("rdVclType-1").checked){dom=findDOM("tblgt",1);dom.display="inline";dom=findDOM("btnQuote",1);dom.display="none";dom=findDOM("btnQuery",1);dom.display="inline";document.frmBooking.action="bookquery.asp";}else{dom=findDOM("tblgt",1);dom.display="none";dom=findDOM("btnQuery",1);dom.display="none";dom=findDOM("btnQuote",1);dom.display="inline";document.frmBooking.action="bookd2.asp";}}}function showVia(){toggleTblprice(0);if(document.getElementById("chkVia").checked){dom=findDOM("tblvia",1);dom.display="inline";}else{dom=findDOM("tblvia",1);dom.display="none";}}function regvchk(){if(tblvclfcs==0){document.getElementById("tdVclDetails").innerHTML="";}setTimeout("regvchk()",1000);}function getPrice(){var xmlHttpReq,mm,results,nnmmmn,nmnmmn,nn,nnm,mmmn;var mmmnmnn,bi,vi,oi,di,mmmmnn,bp,nmnn,mnnn,d,pud,drd;var adoidFrom,addidFrom,adoidTo,addidTo;var odt,ctrl,dAdr,oAdr,rdbt,cs,strVia,cscost,bdate;document.getElementById("txtPrice").innerHTML=" ";strVia=document.getElementById("txaVia").value;bi=document.frmBooking.hidb.value;hot=document.frmBooking.hidOrigType.value;hdt=document.frmBooking.hidDestType.value;d=document.frmBooking.hidDistance.value;pud=document.frmBooking.hidpDistance.value;drd=document.frmBooking.hiddDistance.value;bdate=document.getElementById("hidDate").value;for(var i=0;i<frmBooking.rdVclType.length;i++){if(frmBooking.rdVclType[i].checked){vi=document.frmBooking.rdVclType[i].value;break;}else{vi=0;}}if(vi==0){alert("Please select a vehicle type");}for(var i=0;i<frmBooking.rdbt.length;i++){if(frmBooking.rdbt[i].checked){rdbt=document.frmBooking.rdbt[i].value;}}cs=document.frmBooking.slcCs.value;if(hot==-1){nmnn=document.frmBooking.txtFrom.value;oAdr=document.getElementById("origAdrTxt").innerHTML;}else{nmnn="0";}if(hot==3){nmnn=document.getElementById("txtOrigPostcode").value;}else{if(hot!=-1){nmnn="0";}}if(hot!=-1&&hot!=3&&hot!=-5){ctrl=document.getElementById("origList");oi=ctrl.options[ctrl.selectedIndex].value;nmnn=document.getElementById("hidOrigPc").value;}else if(hot==-5){oi=document.getElementById("hidorigList").value;nmnn=document.getElementById("hidOrigPc").value;}else{oi=0;}if(strVia!=""){nmnn=document.getElementById("hidOrigPc").value;oi=0;}if(hdt==-1){mnnn=document.frmBooking.txtDestination.value;}else{mnnn="0";}if(hdt==3){mnnn=document.getElementById("txtDestPostcode").value;}else{if(hdt!=-1){mnnn="0";}}if(hdt!=-1&&hdt!=3&&hdt!=-5){ctrl=document.getElementById("destList");di=ctrl.options[ctrl.selectedIndex].value;mnnn=document.getElementById("hidDestPc").value;}else if(hdt==-5){di=document.getElementById("hiddestList").value;mnnn=document.getElementById("hidDestPc").value;}else{di=0;}if(strVia!=""){mnnn=document.getElementById("hidDestPc").value;di=0;}mm="xmlGetPrice.asp?bi="+bi+"&vi="+vi+"&op="+nmnn+"&dp="+mnnn+"&oi="+oi+"&di="+di+"&bt="+rdbt+"&cs="+cs+"&d="+d+"&bdt="+bdate+"&pud="+pud+"&drd="+drd;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;alert(mm);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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){nnmmmn=xmlHttpReq.responseText;results=nnmmmn.split("|");mmmnmnn=results[0];nmnmmn=results[1];nn=results[2];mmmn=results[3];nnm=results[4];cscost=results[7];nn=parseFloat(nn)+parseFloat(waypoints.length*3);if(rdbt=="R"){mmmn=parseFloat(mmmn)+parseFloat(waypoints.length*3);nnm=parseFloat(nnm)+parseFloat(waypoints.length*6);}nn=parseFloat(nn);nn=nn.toFixed(2);mmmn=parseFloat(mmmn);mmmn=mmmn.toFixed(2);nnm=parseFloat(nnm);nnm=nnm.toFixed(2);if(nn>-1){if(nn==0){nn="Call";}if(mmmn==0){document.getElementById("txtPrice").innerHTML="\xA3"+nn;document.getElementById("txtPrice1st").innerHTML="";document.getElementById("lblPrice1st").innerHTML="";document.getElementById("txtPrice2nd").innerHTML="";document.getElementById("lblPrice2nd").innerHTML="";document.getElementById("hidPrice").value=nn;mmmmmm=nn;bdscnt(1);}else{document.getElementById("txtPrice").innerHTML="\xA3"+nnm;document.getElementById("txtPrice1st").innerHTML="\xA3"+nn;document.getElementById("lblPrice1st").innerHTML="1st Journey";document.getElementById("txtPrice2nd").innerHTML="\xA3"+mmmn;document.getElementById("lblPrice2nd").innerHTML="2nd Journey";document.getElementById("hidPrice").value=nnm;mmmmmm=nnm;bdscnt(1);}if(cscost>0){document.getElementById("txtChildSeat").innerHTML="<i>Price includes \xA3"+cscost+" cost of the child seat/s";}dom=findDOM("tblPrice",1);dom.display="inline";}else{alert("Unfortunately we are unable to provide an online price for your journey. Please contact us for a favourable quote.");}}}};xmlHttpReq.send(null);}function getAddressPC(ctrl){var pc,mm,mnmmnn,nnnnm;document.frmBooking.hidDistance.value=0;toggleTblprice(0);if(ctrl==1){pc=document.getElementById("txtOrigPostcode").value;document.getElementById("hidOrigPc").value=pc;mnmm="origAdrTxtPc";nmm="hidOrigAdress";mmmm=0;nmmn=0;}else{pc=document.getElementById("txtDestPostcode").value;document.getElementById("hidDestPc").value=pc;mnmm="destAdrTxtPc";nmm="hidDestAdress";mmnm=0;mmnmm=0;}mm="xmlGetPaf.asp?pc="+pc;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){mnmmnn=xmlHttpReq.responseXML.getElementsByTagName("address")[0];mmm=xmlHttpReq.responseXML.getElementsByTagName("postcode")[0];if(mnmmnn.childNodes[0]){nnnnm=mnmmnn.childNodes[0].nodeValue;}else{nnnnm="";}if(mmm.childNodes[0]){pc=mmm.childNodes[0].nodeValue;}document.getElementById(mnmm).innerHTML=nnnnm;document.getElementById(nmm).value=nnnnm;if(ctrl==1){document.getElementById("txtOrigPostcode").value=pc;document.getElementById("hidOrigPc").value=pc;}else{document.getElementById("txtDestPostcode").value=pc;document.getElementById("hidDestPc").value=pc;}}}};xmlHttpReq.send(null);getPostcodeLatLong(pc,ctrl);}function showLgn(ct){if(ct=="e"){bookName=findDOM("tblcustexist",1);bookName.display="inline";bookName=findDOM("tblcustnew",1);bookName.display="none";bookName=findDOM("qupgr",1);bookName.display="inline";}else if(ct=="n"){bookName=findDOM("tblcustexist",1);bookName.display="none";bookName=findDOM("tblcustnew",1);bookName.display="inline";bookName=findDOM("qupgr",1);bookName.display="inline";}}function showBkPgr(yn){var mmmnmm;if(yn==1){mmmnmm=findDOM("tblBkPgrDtl",1);mmmnmm.display="inline";}else{mmmnmm=findDOM("tblBkPgrDtl",1);mmmnmm.display="none";}}function getUser(myref){var xmlHttpReq;var mm,results,us,ps,sn,mnmmnm,bi,nnnmnn,nnnmnm,cnt,nnnnmm,nnnnnn,nnnnmn,nnnnnm,em,mmmmmmn,mmmmmnn,mmmmnm;bi=document.frmBooking.hidb.value;us=document.frmBooking.txtUser.value;ps=document.frmBooking.txtPass.value;mm="xmlhtgetuser.asp?bi="+bi+"&us="+us+"&ps="+ps;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){sn=xmlHttpReq.responseXML.getElementsByTagName("sname")[0];nnnmnn=xmlHttpReq.responseXML.getElementsByTagName("adr")[0];nnnnmm=xmlHttpReq.responseXML.getElementsByTagName("phn")[0];nnnnmn=xmlHttpReq.responseXML.getElementsByTagName("mbl")[0];em=xmlHttpReq.responseXML.getElementsByTagName("em")[0];mmmmmnn=xmlHttpReq.responseXML.getElementsByTagName("crda")[0];mnmmnm=sn.childNodes[0].nodeValue;nnnmnm=nnnmnn.childNodes[0].nodeValue;nnnnnn=nnnnmm.childNodes[0].nodeValue;nnnnnm=nnnnmn.childNodes[0].nodeValue;mmmmmmn=em.childNodes[0].nodeValue;mmmmnm=mmmmmnn.childNodes[0].nodeValue;mmmmnm=parseInt(mmmmnm);cnt=mnmmnm+"<br>"+nnnmnm+"<br><br>"+"<b>Tel: </b>"+nnnnnn+"<br><b>Tel: </b>"+nnnnnm+"<br><b>Email: </b>"+mmmmmmn+"<br><br>";document.getElementById("txtContact").innerHTML=cnt;bookName=findDOM("tdBookname",1);bookName.display="block";dom=findDOM("submitbp",1);dom.visibility="visible";var bn="<b>Booking Name: </b>"+mnmmnm;document.getElementById("tdBookname").innerHTML=bn;if(myref==2){if(mmmmnm>0){dom=findDOM("tblpmin",1);dom.display="inline";}}}else{}}};xmlHttpReq.send(null);}function getPostcodeLatLong(nm,mnmnm){var strTrip;localSearch.setSearchCompleteCallback(null,function(){if(localSearch.results[0]){var resultLat=localSearch.results[0].lat;var resultLng=localSearch.results[0].lng;var point=new GLatLng(resultLat,resultLng);if(mnmnm==-5){setBizLatLng(resultLat,resultLng);}else{assignLatLng(resultLat,resultLng,mnmnm);}}else{}});localSearch.execute(nm+", UK");}function getBizLatLng(){var nnnmmn;nnnmmn=document.getElementById("hidbPC").value;getPostcodeLatLong(nnnmmn,-5);}function setBizLatLng(lat,lng){document.getElementById("hidbLt").value=lat;document.getElementById("hidbLn").value=lng;}function assignLatLng(lat,lng,mnmnm){var strTrip,viaList,strVia,mnmnnn,mnnnmn;strVia="";mnmnnn=document.getElementById("hidbLt");mnnnmn=document.getElementById("hidbLn");if(mnmnm=="1"){mmmm=lat;nmmn=lng;viaList=document.getElementById("txaVia");if(viaList.value==""){waypoints.splice(0);}else{strTrip="";for(var i=0;i<waypoints.length;i++){strVia=strVia+" to "+waypoints[i].lat+","+waypoints[i].lng;}}if(mmmm!=0&&mmnm!=0){strTrip=mmmm+","+nmmn+strVia+" to "+mmnm+","+mmnmm;getDistance(strTrip);}strTrip=mnmnnn+","+mnnnmn+" to "+mmmm+","+nmmn;getBaseDistance(strTrip,1);}else if(mnmnm=="2"){mmnm=lat;mmnmm=lng;viaList=document.getElementById("txaVia");if(viaList.value==""){waypoints.splice(0);}else{strTrip="";for(var i=0;i<waypoints.length;i++){strVia=strVia+" to: "+waypoints[i].lat+","+waypoints[i].lng;}}if(mmmm!=0&&mmnm!=0){strTrip="from: "+mmmm+","+nmmn+strVia+" to: "+mmnm+","+mmnmm;getDistance(strTrip);}strTrip=mmnm+","+mmnmm+" to "+mnmnnn+","+mnnnmn;getBaseDistance(strTrip,2);}else if(mnmnm=="3"){var mmnmnnm=0;var v1Lat=lat;var v1Lng=lng;var cnt,mnnmnn;cnt=document.getElementById("hidViaAdress").value;viaList=document.getElementById("txaVia");mnnmnn="";var n,mmnnmmm,mmnnmmn;n=waypoints.length;if(v1Lat!=0&&v1Lng!=0){waypoints[n]={lat:v1Lat,lng:v1Lng,adr:cnt};}n=waypoints.length;if(n>0||v1Lat==0){strTrip="";strVia="";viaList.value="";for(var i=0;i<waypoints.length;i++){strVia=strVia+" to: "+waypoints[i].lat+","+waypoints[i].lng;viaList.value=mnnmnn+"|"+waypoints[i].adr;mnnmnn=viaList.value;}strTrip="from: "+mmmm+","+nmmn+strVia+" to: "+mmnm+","+mmnmm;getDistance(strTrip);}}}function getDistance(strTrip){var mmnmmmm,mmmnnnn;if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));directionsPanel=document.getElementById("dirdiv");map.setCenter(new GLatLng(mmmm,nmmn),3);directions=new GDirections(map,directionsPanel);GEvent.addListener(directions,"load",function(){durTime=directions.getDuration();tripDistance=directions.getDistance();document.getElementById("hidDistance").value=tripDistance.meters;document.getElementById("hidDuration").value=durTime.seconds;});directions.load(strTrip);}}function getBaseDistance(strTrip,pd){var mmnmmmm,mmmnnnn;if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));directionsPanel=document.getElementById("dirdiv");map.setCenter(new GLatLng(lat,lng),3);directions=new GDirections(map,directionsPanel);GEvent.addListener(directions,"load",function(){durTime=directions.getDuration();tripDistance=directions.getDistance();if(pd==1){document.getElementById("hidpDistance").value=tripDistance.meters;document.getElementById("hidpDuration").value=durTime.seconds;}if(pd==2){document.getElementById("hiddDistance").value=tripDistance.meters;document.getElementById("hiddDuration").value=durTime.seconds;}});directions.load(strTrip);}}function getPostcode(trip){var pc,mm,mmm,nm,ctrl,cid,mmmmm,mnmn,mmmmn,adr,nnnn;toggleTblprice(0);if(trip==1){ctrl=document.getElementById("origList");cid=ctrl.options[ctrl.selectedIndex].value;mmmmm="hidOrigPc";mnmn="hidorigList";mmmmn="hidOrigAdress";}else{ctrl=document.getElementById("destList");cid=ctrl.options[ctrl.selectedIndex].value;mmmmm="hidDestPc";mnmn="hiddestList";mmmmn="hidDestAdress";}document.getElementById(mnmn).value=cid;mm="xmlGetPostcode.asp?cid="+cid;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){mmm=xmlHttpReq.responseXML.getElementsByTagName("postcode")[0];nnnn=xmlHttpReq.responseXML.getElementsByTagName("adr")[0];if(mmm.childNodes[0]){pc=mmm.childNodes[0].nodeValue;}else{pc="";}if(nnnn.childNodes[0]){adr=nnnn.childNodes[0].nodeValue;}else{adr="";}document.getElementById(mmmmm).value=pc;document.getElementById(mmmmn).value=adr;if(pc!=""){getPostcodeLatLong(pc,trip);}}}};xmlHttpReq.send(null);}function bdscnt(page){var bdate,mnnmnm,mnnmmm,mnnmmn,mnnnnn,price,mmmnmmm,mmnmmm;bdate=document.getElementById("hidDate").value;if(page==2){mnnmmn=document.getElementById("hidHour");mnnmnm=mnnmmn.options[mnnmmn.selectedIndex].value;mnnnnn=document.getElementById("hidMinute");mnnmmm=mnnnnn.options[mnnnnn.selectedIndex].value;mmnmmm=parseFloat(document.getElementById("spancardprice").innerHTML);}else{mnnmnm="00";mnnmmm="00";}mm="xmlGetDscnt.asp?bi="+bi+"&bdate="+bdate+"&bhour="+mnnmnm+"&bmnts="+mnnmmm;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){nnmnnm=xmlHttpReq.responseXML.getElementsByTagName("dscamt")[0];nnmnmm=xmlHttpReq.responseXML.getElementsByTagName("dscpct")[0];if(nnmnnm.childNodes[0]){nmmmm=parseFloat(nnmnnm.childNodes[0].nodeValue);}else{nmmmm=0;}if(nnmnmm.childNodes[0]){mnnnm=parseFloat(nnmnmm.childNodes[0].nodeValue);}else{mnnnm=0;}price=parseFloat(document.getElementById("hidPrice").value);if(price==0){price=mmmmmm;}if(price>0){mmmnmmm=price;mmnmmm=((price-nmmmm)*(1-mnnnm)).toFixed(2);if(page==2){var buyit=parseInt(document.getElementById("hidbyn").value);document.getElementById("spancardprice").innerHTML=mmnmmm;document.getElementById("hidDscntPrice").value=mmnmmm;if(buyit==1){document.getElementById("tdprice").innerHTML="<b>\xA3"+((price-nmmmm)*(1-mnnnm)).toFixed(2)+"</b>";}}else{document.getElementById("tddscntprclbl").innerHTML="Buy Now and Save";document.getElementById("tdbuynowimg").innerHTML="<img src='images/buynow2.gif'>";document.getElementById("btnSubmit").value="Pay Later";document.getElementById("btnBuySubmit").style.display="inline";document.getElementById("tddscntprc").innerHTML="\xA3"+((price-nmmmm)*(1-mnnnm)).toFixed(2);document.getElementById("hidDscntPrice").value=((price-nmmmm)*(1-mnnnm)).toFixed(2);}}}}};xmlHttpReq.send(null);if(price==0){if(page==1){setTimeout("bdscnt(1)",1000);}else{setTimeout("bdscnt(2)",1000);}}}function toggleTblprice(st){dom=findDOM("tblPrice",1);if(st==1){dom.display="inline";}else{if(dom.display=="inline"){dom.display="none";}}}function validate(form){var s,a,e,IError,incomplete,showerror,rdval,k,p,nnnmmm;nnnmmm=document.frmBooking.rdcustype.length;p=0;for(var k=0;k<nnnmmm;k++){if(document.frmBooking.rdcustype[k].checked){rdval=document.frmBooking.rdcustype[k].value;p=1;}}if(p==0){dom=findDOM("rdcustypeEr",1);dom.visibility="visible";alert("Please let us know if you are an existing or a new customer.");return false;}else{dom=findDOM("rdcustypeEr",1);dom.visibility="hidden";}if(rdval=="e"){document.getElementById("nuName").optional="true";document.getElementById("nuMobile").optional="true";if(document.getElementById("txtContact").innerHTML==""){alert("Please enter your email and password and then press Login button");return false;}}else{document.getElementById("nuName").optional="false";document.getElementById("nuMobile").optional="false";document.getElementById("nuEmail").optional="false";if(document.getElementById("nuName").value==""){alert("Please enter your name.");dom=findDOM("nuNameEr",1);dom.visibility="visible";return false;}else{dom=findDOM("nuNameEr",1);dom.visibility="hidden";}if(document.getElementById("nuMobile").value==""){alert("Please enter your phone or mobile number.");dom=findDOM("nuMobileEr",1);dom.visibility="visible";return false;}else{dom=findDOM("nuMobileEr",1);dom.visibility="hidden";}if(document.getElementById("nuEmail").value==""){alert("Please enter your Email.");dom=findDOM("nuEmailEr",1);dom.visibility="visible";return false;}else{dom=findDOM("nuEmailEr",1);dom.visibility="hidden";}}p=0;for(var k=0;k<document.frmBooking.rdbkpgr.length;k++){if(document.frmBooking.rdbkpgr[k].checked){rdval=document.frmBooking.rdbkpgr[k].value;p=1;}}if(p==0){dom=findDOM("rdbkpgrEr",1);dom.visibility="visible";alert("Please let us know if you are the passenger.");return false;}else{dom=findDOM("rdbkpgrEr",1);dom.visibility="hidden";}if(rdval=="y"){document.getElementById("txtPgrName").optional="true";document.getElementById("txtPgrPhone").optional="true";}else{document.getElementById("txtPgrName").optional="false";document.getElementById("txtPgrPhone").optional="false";if(document.getElementById("txtPgrName").value==""){alert("Please enter passenger name.");dom=findDOM("txtPgrNameEr",1);dom.visibility="visible";return false;}else{dom=findDOM("txtPgrNameEr",1);dom.visibility="hidden";}if(document.getElementById("txtPgrPhone").value==""){alert("Please enter passenger's phone.");dom=findDOM("txtPgrPhoneEr",1);dom.visibility="visible";return false;}else{dom=findDOM("txtPgrPhoneEr",1);dom.visibility="hidden";}}p=0;if(typeof document.frmBooking.rdpm!="undefined"){for(var k=0;k<document.frmBooking.rdpm.length;k++){if(document.frmBooking.rdpm[k].checked){rdval=document.frmBooking.rdpm[k].value;p=1;}}if(p==0){dom=findDOM("rdpmEr",1);dom.visibility="visible";alert("Please select payment type.");return false;}else{dom=findDOM("rdpmEr",1);dom.visibility="hidden";}}for(var j=0;j<form.length;j++){e=form.elements[j];if(e.optional||e.type=="submit"||e.type=="hidden"||e.type=="button"||e.type=="radio"){continue;}s=form.elements[j].value;a=form.elements[j].id;IError=a+"Er";showerror=false;if(s.length<1){incomplete=true;showerror=true;}else{for(var i=0;i<s.length;i++){var c=s.charAt(i);if(i==0&&c==" "){s=s.substring(1,s.length);if(s.length<1){incomplete=true;showerror=true;}i=-1;continue;}if(c!=" "){break;}else{incomplete=true;showerror=true;}}}if(showerror==true){dom=findDOM(IError,1);dom.visibility="visible";}else{dom=findDOM(IError,1);dom.visibility="hidden";}}if(incomplete==true){alert("you must complete all required fields");return false;}if(document.getElementById("chktc").checked==false){dom=findDOM("chktcEr",1);dom.visibility="visible";alert("Please tick the terms and conditions to confirm your acceptance of our terms before you proceed.");return false;}else{dom=findDOM("chktcEr",1);dom.visibility="hidden";}if(document.getElementById("hidHour").selectedIndex==0){dom=findDOM("hidHourEr",1);dom.visibility="visible";alert("Please select the correct journey time.");return false;}else{dom=findDOM("hidHourEr",1);dom.visibility="hidden";}if(document.getElementById("hidMinute").selectedIndex==0){dom=findDOM("hidMinuteEr",1);dom.visibility="visible";alert("Please select the correct journey time.");return false;}else{dom=findDOM("hidMinuteEr",1);dom.visibility="hidden";}}function bdu(mnmnn){var mmnn,nmn,mmnnm;var mnnmn,nmnm,nnn;var mnmnmm,mnmmmn,mmmmmn;var newoption,newval,newtext,nmmmmm,mmnnnn;if(mnmnn=="hidDate"){mmnn=document.getElementById("slcmonth");nmn=document.getElementById("slcday");mmnnnn=document.getElementById("hidDate");}else{mmnn=document.getElementById("slcmonthFr");nmn=document.getElementById("slcdayFr");mmnnnn=document.getElementById("hidDateFr");}mmnnm=mmnn.options[mmnn.selectedIndex].value;nnn=nmn.options[nmn.selectedIndex].value;mnnmn=mmnnm.substring(0,4);nmnm=mmnnm.substring(4);nmmmmm=nnn+"-"+nmnm+"-"+mnnmn;mmnnnn.value=nmmmmm;}function monthdays(mnmnn){var mmnn,nmn,mmnnm,nnnm,mmnmnmm;var mnnmn,nmnm,nnmn;var nnn=1;var mnmnmm,mnmmmn,mmmmmn;var newoption,newval,newtext,nmmmmm,mmnnnn;if(mnmnn=="hidDate"){mmnn=document.getElementById("slcmonth");nmn=document.getElementById("slcday");}else{mmnn=document.getElementById("slcmonthFr");nmn=document.getElementById("slcdayFr");}mmnnm=mmnn.options[mmnn.selectedIndex].value;mnnmn=Number(mmnnm.substring(0,4));nmnm=Number(mmnnm.substring(4))-1;mmmmmn=new Date;mnmnmm=mmmmmn.getMonth();if(mnmnmm==nmnm){nnn=mmmmmn.getDate();}mnmmmn=nmnm;nnnm=new Date;nnnm.setFullYear(mnnmn);nnnm.setMonth(nmnm,nnn);nmn.options.length=0;while(nmnm==mnmmmn){nnn=nnnm.getDate();mmmmnnn=nnnm.getDay();switch(mmmmnnn){case 0:nnmn="Sun";break;case 1:nnmn="Mon";break;case 2:nnmn="Tue";break;case 3:nnmn="Wed";break;case 4:nnmn="Thu";break;case 5:nnmn="Fri";break;case 6:nnmn="Sat";default:;}newval=nnn;if(newval<10){newval="0"+newval;}newtext=nnn;newoption=new Option(newtext,newval,false,false);nmn.options[nmn.options.length]=newoption;nnn++;nnnm.setDate(nnn);mnmmmn=nnnm.getMonth();}}function updDate(mnmnn){var nmnnm,nnmnmn,nnmmnn,i,nmmnn,nnnmm;if(mnmnn=="hidDate"){nmnnm=document.forms.frmBooking.hidDate.value;nnnmm=document.forms.frmBooking.slcmonth;nmmnn=document.forms.frmBooking.slcday;}else{nmnnm=document.forms.frmBooking.hidDateFr.value;nnnmm=document.forms.frmBooking.slcmonthFr;nmmnn=document.forms.frmBooking.slcdayFr;}nnmnmn=nmnnm.substr(0,2);nnmmnn=nmnnm.substr(6,4)+nmnnm.substr(3,2);for(i=0;i<nnnmm.options.length;i++){if(nnnmm.options[i].value==nnmmnn){nnnmm.options[i].selected="selected";monthdays(mnmnn);}}for(i=0;i<nmmnn.options.length;i++){if(nmmnn.options[i].value==nnmnmn){nmmnn.options[i].selected="selected";}}}function txaUpd(mmmmnn,mmmnnmn){var cval,dom,va,i,j,ig,txtTo,hidTo;cval=mmmmnn.value;mmmnnmn.value=cval;}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 ctlopwindow(url,wtyp,w,h,sb){var mmmmnmn;mmmmnmn="toolbar=0,directories=0,status=0, menubar=0,scrollbars="+sb+",resizable=1,width="+w+",height="+h+",left=250,top=450";window.open(url,0,mmmmnmn);}function showPgrOpt(){if(document.getElementById("txtContact").innerHTML!=""){dom=findDOM("qupgr",1);dom.display="inline";}}function buyit(mmmnnnm){if(mmmnnnm==1){document.getElementById("hidbyn").value="1";}else{document.getElementById("hidbyn").value="0";}}function gtAdBk(trip){var pc,mm,mmm,nm,ctrl,cid,mmmmm,mnmn,mmmmn,adr,nnnn,ai;var mnmnmn,mnnnmm,mnnnnm,nnmmn,mnmnnm,nmnnnm,nmmmmn;toggleTblprice(0);ai=document.getElementById("hidAcntId").value;if(trip==1){ctrl=document.getElementById("origList");cid=ctrl.options[ctrl.selectedIndex].value;mmmmm="hidOrigPc";mnmn="hidorigList";mmmmn="hidOrigAdress";nmmmmn="hidAdbOrigOdtype";}else{ctrl=document.getElementById("destList");cid=ctrl.options[ctrl.selectedIndex].value;mmmmm="hidDestPc";mnmn="hiddestList";mmmmn="hidDestAdress";nmmmmn="hidAdbDestOdtype";}document.getElementById(mnmn).value=cid;mm="xmlGetAdBk.asp?bi="+bi+"&ai="+ai+"&cid="+cid;mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){mnmnmn=xmlHttpReq.responseXML.getElementsByTagName("odid")[0];nnnn=xmlHttpReq.responseXML.getElementsByTagName("oddesc")[0];mmm=xmlHttpReq.responseXML.getElementsByTagName("odpostcode")[0];mnnnmm=xmlHttpReq.responseXML.getElementsByTagName("odpcode")[0];mnmnnm=xmlHttpReq.responseXML.getElementsByTagName("odtype")[0];if(mnmnmn.childNodes[0]){mnnnnm=mnmnmn.childNodes[0].nodeValue;}else{mnnnnm=0;}if(nnnn.childNodes[0]){adr=nnnn.childNodes[0].nodeValue;}else{adr="";}if(mmm.childNodes[0]){pc=mmm.childNodes[0].nodeValue;}else{pc="";}if(mnnnmm.childNodes[0]){nnmmn=mnnnmm.childNodes[0].nodeValue;}else{nnmmn="";}if(mnmnnm.childNodes[0]){nmnnnm=mnmnnm.childNodes[0].nodeValue;}else{nmnnnm="";}document.getElementById(mmmmm).value=pc;document.getElementById(mmmmn).value=adr;document.getElementById(mnmn).value=mnnnnm;document.getElementById(nmmmmn).value=nmnnnm;if(pc!=""){getPostcodeLatLong(pc,trip);}}}};xmlHttpReq.send(null);}function pplAdBk(ctrl,odt,mmn){var nnmnm,mnnmm,nmnmm,mnnnn,mmmnn,mnn,nmmnm,i,mmmnm,nnmm,mmmmnnm,ai;ai=document.getElementById("hidAcntId").value;if(ctrl==1){document.getElementById("origComment").innerHTML="<img src='images/status_progress.gif'>";}else if(ctrl==2){document.getElementById("destComment").innerHTML="<img src='images/status_progress.gif'>";}mm="xmlGetAdBk.asp?bi="+bi+"&ai="+ai+"&cid=0";mn=parseInt(Math.random()*99999999999999);mm=mm+"&mr="+mn;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",mm,true);xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){if(xmlHttpReq.status==200){if(ctrl==1){document.getElementById("origList").options.length=0;mmmnm="origComment";nnmm="origInstruct";}else if(ctrl==2){document.getElementById("destList").options.length=0;mmmnm="destComment";nnmm="destInstruct";}mnnnn=xmlHttpReq.responseXML.getElementsByTagName("odloc");nnmnm=xmlHttpReq.responseXML.getElementsByTagName("odid");mnnmm=xmlHttpReq.responseXML.getElementsByTagName("oddesc");nmnmm=xmlHttpReq.responseXML.getElementsByTagName("odpostcode");if(ctrl==1){document.getElementById("origList").options[0]=new Option("Please select",0,false,false);}else if(ctrl==2){document.getElementById("destList").options[0]=new Option("Please select",0,false,false);}for(i=0;i<mnnnn.length;i++){mmmnn=nnmnm[i].childNodes[0].nodeValue;mnn=mnnmm[i].childNodes[0].nodeValue;nmmnm=nmnmm[i].childNodes[0].nodeValue;if(odt==15){mnn=mnn+" - "+nmmnm;}if(ctrl==1){document.getElementById("origList").options[i+1]=new Option(mnn,mmmnn,false,false);}else if(ctrl==2){document.getElementById("destList").options[i+1]=new Option(mnn,mmmnn,false,false);}}document.getElementById(mmmnm).innerHTML="Please select the "+mmn+" from the list below.<br>If your "+mmn+" is not on the list, click on postcode<br> and enter the full postcode of the "+mmn+".";document.getElementById(nnmm).innerHTML=mmn;}}};xmlHttpReq.send(null);}
