
                        function checkData (){
										if (document.web_book.day.value > 29 && document.web_book.monthyear.value == "2008-02") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 29 && document.web_book.return_monthyear.value == "2008-02") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2008-04") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2008-04") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2008-06") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2008-06") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2008-09") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2008-09") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2008-11") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2008-11") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 28 && document.web_book.monthyear.value == "2009-02") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 28 && document.web_book.return_monthyear.value == "2009-02") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2009-04") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2009-04") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2009-06") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2009-06") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2009-09") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2009-09") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.day.value > 30 && document.web_book.monthyear.value == "2009-11") {
										alert('Please enter a correct date');
                                        return false}
										if (document.web_book.return_day.value > 30 && document.web_book.return_monthyear.value == "2009-11") {
										alert('Please enter a correct date');
                                        return false}
						if (document.web_book.pick_add1.value == "") {
                                        alert("Please enter a pick up address.")
										document.getElementById('pick_add1').style.background='FFCCCC';
                                        document.web_book.focus()
                                        return false}
										if (document.web_book.pick_city.value == "") {
                                        alert("Please enter a pick up town or city.")
										document.getElementById('pick_city').style.background='FFCCCC';
                                        document.web_book.pick_city.focus()
                                        return false}
										if (document.web_book.pick_postcode.value == "") {
                                        alert("Please enter the full or first part of the postcode.")
										document.getElementById('pick_postcode').style.background='FFCCCC';
                                        document.web_book.pick_postcode.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.web_book.pick_postcode; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The pick up postcode must contain a number.")
										document.getElementById('pick_postcode').style.background='FFCCCC';
                                        document.web_book.pick_postcode.focus()
										return false}
										if (document.web_book.dest_add1.value == "") {
                                        alert("Please enter a destination address.")
										document.getElementById('dest_add1').style.background='FFCCCC';
                                        document.web_book.focus()
                                        return false}
										if (document.web_book.dest_city.value == "") {
                                        alert("Please enter a destination town or city.")
										document.getElementById('dest_city').style.background='FFCCCC';
                                        document.web_book.dest_city.focus()
                                        return false}
										if (document.web_book.dest_postcode.value == "") {
                                        alert("Please enter the full or first part of the postcode.")
										document.getElementById('dest_postcode').style.background='FFCCCC';
                                        document.web_book.dest_postcode.focus()
                                        return false}
										if (document.web_book.dest_postcode.value == document.web_book.pick_postcode.value) {
                                        alert("Your destination is the same as your pick up. Please try again.")
                                        document.getElementById('dest_postcode').style.background='FFCCCC';
                                        document.web_book.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.web_book.dest_postcode; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The destination postcode must contain a number.")
										document.getElementById('dest_postcode').style.background='FFCCCC';
                                        document.web_book.dest_postcode.focus()
										return false}
										var pickPos = web_book.pick_postcode.value.indexOf('BT',0);
										destPos = web_book.dest_postcode.value.indexOf('BT',0);
										if (pickPos == 0 && !destPos == 0) {
  										alert("Please choose another destination.")
   										return false}
										if (!pickPos == 0 && destPos == 0) {
  										alert("Please choose another destination.")
   										return false}
										return true
                        }
function checkData20 (){
										if (document.getElementById('ap_pick').value == "1" && document.getElementById('pick_add2').value == "") {
                                        alert("Please select a terminal.")
										document.getElementById('pick_add2').style.background='FFCCCC';
                                        document.getElementById('pick_add2').focus()
                                        return false
										}
										if (document.getElementById('ap_dest').value == "1" && document.getElementById('dest_add2').value == "") {
                                        alert("Please select a terminal.")
										document.getElementById('dest_add2').style.background='FFCCCC';
                                        document.getElementById('dest_add2').focus()
                                        return false
										}
										if (document.book_taxi.dest_add2.value == "Select Area") {
                                        alert("Please select an area.")
                                        document.book_taxi.mySelect2.focus()
                                        return false}
										if (document.book_taxi.ap_pick.value == "1" && document.book_taxi.flight_no.value == "") {
                                        alert("Please enter your flight number or enter N/A if not applicable.")
										document.getElementById('flight_no').style.background='FFCCCC';
                                        document.book_taxi.flight_no.focus()
                                        return false}
										if (document.book_taxi.ap_dest.value == "1" && document.book_taxi.flight_no.value == "") {
                                        alert("Please enter your flight number or enter N/A if not applicable.")
										document.getElementById('flight_no').style.background='FFCCCC';
                                        document.book_taxi.flight_no.focus()
                                        return false}
										if (document.book_taxi.ap_pick.value == "1" && document.book_taxi.rt_flight_no.value == "") {
                                        alert("Please enter your return flight number or enter N/A if not applicable.")
										document.getElementById('rt_flight_no').style.background='FFCCCC';
                                        document.book_taxi.rt_flight_no.focus()
                                        return false}
										if (document.book_taxi.ap_dest.value == "1" && document.book_taxi.rt_flight_no.value == "") {
                                        alert("Please enter your return flight number or enter N/A if not applicable.")
										document.getElementById('rt_flight_no').style.background='FFCCCC';
                                        document.book_taxi.rt_flight_no.focus()
                                        return false}
										if (document.book_taxi.name.value == "") {
                                        alert("Please enter your name.")
										document.getElementById('name').style.background='FFCCCC';
                                        document.book_taxi.name.focus()
                                        return false}
										var digits2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-',. ";
  										for (var i = 0; i < book_taxi.name.value.length; i++)
  										{
    									temp = book_taxi.name.value.substring(i, i+1)
    									if (digits2.indexOf(temp) == -1 )
    									{
     									alert("Please enter your correct name.")
     									return false
   										}
										}
										if (document.book_taxi.email.value == "") {
                                        alert("Please enter your email address.")
										document.getElementById('email').style.background='FFCCCC';
                                        document.book_taxi.email.focus()
                                        return false}
										if (document.book_taxi.phone.value == "") {
                                        alert("Please enter your contact number.")
										document.getElementById('phone').style.background='FFCCCC';
                                        document.book_taxi.phone.focus()
                                        return false}
										if (document.book_taxi.phone.value.length < 11) {
                                        alert("Please enter the correct telephone number.")
										document.getElementById('phone').style.background='FFCCCC';
                                        document.book_taxi.phone.focus()
                                        return false}
										var digits = "()+0123456789- ";
  										for (var i = 0; i < book_taxi.phone.value.length; i++)
  										{
    									temp = book_taxi.phone.value.substring(i, i+1)
    									if (digits.indexOf(temp) == -1 )
    									{
     									alert("Please enter the correct telephone format.")
     									return false
   										}
  }
										
 									    //if ((document.web_book.email.value.indexOf ('@',0) == -1 ||
   										//document.web_book.email.value.indexOf ('.',0) == -1) &&
   										//document.web_book.email.value != "")
  										//{
    									//alert("Please verify your email address.")
                                        //document.web_book.email.focus()
                                        //return false}
										var digits3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._@0123456789";
  										for (var i = 0; i < book_taxi.email.value.length; i++)
  										{
    									temp = book_taxi.email.value.substring(i, i+1)
    									if (digits3.indexOf(temp) == -1 )
    									{
     									alert("Please enter valid email characters only.")
     									return false
   										}
										}
										var atPos = book_taxi.email.value.indexOf('@',0);
										if (atPos == -1) {
   										alert("email address must contain an @")
   										return false}
										if (atPos == 0) {
  										alert("email address must not start with @")
   										return false}
										if (book_taxi.email.value.indexOf('@', atPos + 1) > - 1) {
   										alert('email address must contain only one @');
   										return false;
										}
										if (book_taxi.email.value.indexOf('.', atPos) == -1) {
   										alert('email address must contain a full stop in the domain name');
   										return false;
										}
										if (book_taxi.email.value.indexOf('@.',0) != -1) {
   										alert('full stops must not immediately follow @ in email address');
   										return false;
										}
										if (book_taxi.email.value.indexOf('.@',0) != -1){
   										alert('full stops must not immediately precede @ in email address');
   										return false;
										}
										if (book_taxi.email.value.indexOf('..',0) != -1) {
   										alert('two full stops must not be adjacent in email address');
   										return false;
										}
										var suffix = book_taxi.email.value.substring(book_taxi.email.value.lastIndexOf('.')+1);
										if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
   										if (db) alert('invalid domain in email address');
   										return false;
										}
										if (document.book_taxi.terms.checked == false) {
                                        alert("Please read and accept our terms and conditions.")
                                        document.book_taxi.terms.focus()
                                        return false}
										return true
                        }
function checkData2 (){
										if (document.front_login.email.value == "") {
                                         alert("Please enter your registered e-mail address or contact number.")
                                        document.front_login.email.focus()
                                        return false}
										if (document.front_login.pass.value == "") {
                                         alert("Please enter your password.")
                                        document.front_login.pass.focus()
                                        return false}
										
                        }
function checkData3 (){
										if (document.fares.pc1.value == "") {
                                         alert("Please enter the full or first part of the postcode.")
                                        document.fares.pc1.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.fares.pc1; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The pick up postcode must contain a number.")
                                        document.fares.pc1.focus()
										return false}

										if (document.fares.pc2.value == "") {
                                         alert("Please enter the full or first part of the postcode.")
                                        document.fares.pc2.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.fares.pc2; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The destination postcode must contain a number.")
                                        document.fares.pc2.focus()
										return false}
										
                        }
						
function checkData4 (){
										if (document.quick.pick_pc.value == "") {
                                         alert("Please enter the full or first part of the postcode.")
                                        document.quick.pick_pc.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.quick.pick_pc; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The pick up postcode must contain a number.")
                                        document.quick.pick_pc.focus()
										return false}

										if (document.quick.dest_pc.value == "") {
                                         alert("Please enter the full or first part of the postcode.")
                                        document.quick.dest_pc.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.quick.dest_pc; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The destination postcode must contain a number.")
                                        document.quick.dest_pc.focus()
										return false}
                        }
						var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}
						function searchnow1(url, state) {
										if (document.fares.search1.value == "") {
                                        alert("Please enter a place name, postcode or county.")
                                        document.fares.search1.focus()
                                        return false}
										else {
										closeWin();
										popupWin = window.open(url + '?search=' + state + '&action=pick','newWin','resizable=yes,scrollbars=yes,width=400,height=200');
										popupWin.focus();
										}
										}
						function searchnow2(url, state) {
										if (document.fares.search2.value == "") {
                                        alert("Please enter a place name, postcode or county.")
                                        document.fares.search2.focus()
                                        return false}
										else {
										closeWin();
										popupWin = window.open(url + '?search=' + state + '&action=dest','newWin','resizable=yes,scrollbars=yes,width=400,height=200');
										popupWin.focus();
										}
										}
						function searchnow3(url, state) {
										if (document.web_book.pick_city.value == "") {
                                        alert("Please enter a place name, postcode or county.")
										document.getElementById('pick_city').style.background='FFCCCC';
                                        document.web_book.pick_city.focus()
                                        return false}
										else {
										closeWin();
										popupWin = window.open(url + '?search=' + state + '&action=pick','newWin','resizable=yes,scrollbars=yes,width=400,height=200');
										popupWin.focus();
										}
										}
						function searchnow4(url, state) {
										if (document.web_book.dest_city.value == "") {
                                        alert("Please enter a place name, postcode or county.")
										document.getElementById('dest_city').style.background='FFCCCC';
                                        document.web_book.dest_city.focus()
                                        return false}
										else {
										closeWin();
										popupWin = window.open(url + '?search=' + state + '&action=dest','newWin','resizable=yes,scrollbars=yes,width=400,height=200');
										popupWin.focus();
										}
										}
						function searchnow5(url, state, state2, state3) {
										closeWin();
										popupWin = window.open(url + '?pick_add1=' + state + '&pick_city=' + state2 + '&pick_postcode=' + state3 + '&action=a','newWin','resizable=yes,scrollbars=yes,width=375,height=350');
										popupWin.focus();
										}
						function searchnow6(url, state, state2, state3) {
										closeWin();
										popupWin = window.open(url + '?pick_add1=' + state + '&pick_city=' + state2 + '&pick_postcode=' + state3 + '&action=b','newWin','resizable=yes,scrollbars=yes,width=375,height=350');
										popupWin.focus();
										}
										function checkData5 (){
										if (document.user_login.email.value == "") {
                                         alert("Please enter your registered e-mail address or contact number.")
                                        document.user_login.email.focus()
                                        return false}
										if (document.user_login.pass.value == "") {
                                         alert("Please enter your password.")
                                        document.user_login.pass.focus()
                                        return false}
                        }
										function checkData6 (){
										if (document.taxi_login.email.value == "") {
                                         alert("Please enter your registered e-mail address.")
                                        document.taxi_login.email.focus()
                                        return false}
										if (document.taxi_login.pass.value == "") {
                                         alert("Please enter your password.")
                                        document.taxi_login.pass.focus()
                                        return false}
                        }
										function checkPremierData (){
										if (document.premier_login.hotel_user.value == "") {
                                         alert("Please enter your username.")
                                        document.premier_login.hotel_user.focus()
                                        return false}
										if (document.premier_login.hotel_pass.value == "") {
                                         alert("Please enter your password.")
                                        document.premier_login.hotel_pass.focus()
                                        return false}
                        }
function checkData7 (){
										if (document.quickquote.pick_pc.value == "") {
                                         alert("Please enter the full or first part of the postcode.")
                                        document.quickquote.pick_pc.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.quickquote.pick_pc; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The pick up postcode must contain a number.")
                                        document.quickquote.pick_pc.focus()
										return false}

										if (document.quickquote.dest_pc.value == "") {
                                         alert("Please enter the full or first part of the postcode.")
                                        document.quickquote.dest_pc.focus()
                                        return false}
										var space  = " ";
										fieldname   = document.quickquote.dest_pc; 
										fieldvalue  = fieldname.value; 
										fieldlength = fieldvalue.length; 
										if (!(fieldvalue.match(/\d/))) {
                                         alert("The destination postcode must contain a number.")
                                        document.quickquote.dest_pc.focus()
										return false}
                        }
function updateForm(what,count) {
    selected = what.mySelect.selectedIndex;

    value = what.mySelect.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['text' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['text' + i].value = value.substring(oldpos+1,value.length)
}
function calc(){ 
newtext1 = 'Airport';
web_book.pick_add1.value=web_book.text0.value + newtext1;
web_book.pick_add2.value=web_book.text1.value;
web_book.pick_city.value=web_book.text2.value;
web_book.pick_postcode.value=web_book.text3.value;
web_book.ap_pick.value=web_book.text4.value;
web_book.ap_pick_code.value=web_book.text5.value;
web_book.st_pick.value=web_book.text6.value;
}
function updateForm2(what,count) {
    selected = what.mySelect2.selectedIndex;

    value = what.mySelect2.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['desttext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['desttext' + i].value = value.substring(oldpos+1,value.length)
}
function calc2(){
newtext2 = 'Airport';
web_book.dest_add1.value=web_book.desttext0.value + newtext2;
web_book.dest_add2.value=web_book.desttext1.value;
web_book.dest_city.value=web_book.desttext2.value;
web_book.dest_postcode.value=web_book.desttext3.value;
web_book.ap_dest.value=web_book.desttext4.value;
web_book.ap_dest_code.value=web_book.desttext5.value;
web_book.st_dest.value=web_book.desttext6.value;
web_book.city_dest.value=0;
}
function updateForm3(what,count) {
    selected = what.mySelect3.selectedIndex;

    value = what.mySelect3.options[selected].value;
if (value == "Other") {
web_book.pick_add1.value="";
web_book.pick_add2.value="";
web_book.pick_city.value="";
web_book.pick_postcode.value="";
popupWin = window.open('/stations.php?trip=1','newWin','resizable=yes,scrollbars=yes,width=375,height=425');
popupWin.focus();
document.getElementById("PaPort").style.display = 'none';
document.getElementById("PsPort").style.display = 'none';
document.getElementById("PmTrain").style.display = 'none';
document.getElementById("Pcity").style.display = 'none';
document.getElementById("PnAdd").style.display = 'block';
document.getElementById("PnAdd2").style.display = 'block';
web_book.ap_pick.value=0;
web_book.st_pick.value=1;
web_book.ap_pick_code.value="";
} else {
    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['stpicktext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['stpicktext' + i].value = value.substring(oldpos+1,value.length)
newtext3 = 'Station';
web_book.pick_add1.value=web_book.stpicktext0.value + newtext3;
web_book.pick_add2.value=web_book.stpicktext1.value;
web_book.pick_city.value=web_book.stpicktext2.value;
web_book.pick_postcode.value=web_book.stpicktext3.value;
web_book.ap_pick.value=web_book.stpicktext4.value;
web_book.st_pick.value=web_book.stpicktext5.value;
web_book.ap_pick_code.value="";
}
}
function updateForm4(what,count) {
    selected = what.mySelect4.selectedIndex;

    value = what.mySelect4.options[selected].value;
if (value == "Other") {
web_book.dest_add1.value="";
web_book.dest_add2.value="";
web_book.dest_city.value="";
web_book.dest_postcode.value="";
popupWin = window.open('/stations.php?trip=2','newWin','resizable=yes,scrollbars=yes,width=375,height=425');
popupWin.focus();
document.getElementById("DaPort").style.display = 'none';
document.getElementById("DsPort").style.display = 'none';
document.getElementById("DmTrain").style.display = 'none';
document.getElementById("Dcity").style.display = 'none';
document.getElementById("DnAdd").style.display = 'block';
document.getElementById("DnAdd2").style.display = 'block';
web_book.ap_dest.value=0;
web_book.st_dest.value=1;
web_book.ap_dest_code.value="";
} else {
    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['stdesttext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['stdesttext' + i].value = value.substring(oldpos+1,value.length)
newtext4 = 'Station';
web_book.dest_add1.value=web_book.stdesttext0.value + newtext4;
web_book.dest_add2.value=web_book.stdesttext1.value;
web_book.dest_city.value=web_book.stdesttext2.value;
web_book.dest_postcode.value=web_book.stdesttext3.value;
web_book.ap_dest.value=web_book.stdesttext4.value;
web_book.st_dest.value=web_book.stdesttext5.value;
web_book.ap_dest_code.value="";
}
}
function updateForm5(what,count) {
    selected = what.mySelect5.selectedIndex;

    value = what.mySelect5.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['sppicktext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['sppicktext' + i].value = value.substring(oldpos+1,value.length)
}
function calc5(){
newtext5 = 'Station';
web_book.pick_add1.value=web_book.sppicktext0.value;
web_book.pick_add2.value=web_book.sppicktext1.value;
web_book.pick_city.value=web_book.sppicktext2.value;
web_book.pick_postcode.value=web_book.sppicktext3.value;
web_book.ap_pick.value=web_book.sppicktext4.value;
web_book.st_pick.value=0;
web_book.ap_pick_code.value="";
}
function updateForm6(what,count) {
    selected = what.mySelect6.selectedIndex;

    value = what.mySelect6.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['spdesttext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['spdesttext' + i].value = value.substring(oldpos+1,value.length)
}
function calc6(){
newtext6 = 'Station';
web_book.dest_add1.value=web_book.spdesttext0.value;
web_book.dest_add2.value=web_book.spdesttext1.value;
web_book.dest_city.value=web_book.spdesttext2.value;
web_book.dest_postcode.value=web_book.spdesttext3.value;
web_book.ap_dest.value=web_book.spdesttext4.value;
web_book.city_dest.value=0;
}										
function checkAcc (){
										if (document.prem_reg.co_name.value == "") {
                                         alert("Please enter your company name.")
                                        document.prem_reg.co_name.focus()
                                        return false}
										if (document.prem_reg.co_email.value == "") {
                                         alert("Please enter your email address.")
                                        document.prem_reg.co_email.focus()
                                        return false}
										if (document.prem_reg.co_contact.value == "") {
                                         alert("Please enter your contact name.")
                                        document.prem_reg.co_contact.focus()
                                        return false}
										if (document.prem_reg.co_phone.value == "") {
                                         alert("Please enter your phone number.")
                                        document.prem_reg.co_phone.focus()
                                        return false}
										if (document.prem_reg.co_add1.value == "") {
                                         alert("Please enter your address.")
                                        document.prem_reg.co_add1.focus()
                                        return false}
										if (document.prem_reg.co_city.value == "") {
                                         alert("Please enter your town or city.")
                                        document.prem_reg.co_city.focus()
                                        return false}
										if (document.prem_reg.pseudo.value == "") {
                                         alert("Please enter your pseudo city code or license number.")
                                        document.prem_reg.pseudo.focus()
                                        return false}
										if (document.prem_reg.corp_terms.checked == false) {
                                        alert("Please read and accept our terms and conditions.")
                                        document.prem_reg.corp_terms.focus()
                                        return false}
                        }
function shared_Form(what,count) {
    selected = what.mySelect.selectedIndex;

    value = what.mySelect.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['text' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['text' + i].value = value.substring(oldpos+1,value.length)
}
function shared_calc(){ 
share_book.pick_add1.value=share_book.text0.value;
share_book.pick_add2.value=share_book.text1.value;
share_book.pick_city.value=share_book.text2.value;
share_book.pick_postcode.value=share_book.text3.value;
share_book.ap_pick.value=share_book.text4.value;
share_book.ap_pick_code.value=share_book.text5.value;
}
		
		function share_checkData (){
										if (document.share_book.dest_city.value == "") {
                                        alert("Please enter the pick up point.")
                                        document.share_book.mySelect.focus()
                                        return false}
										if (document.share_book.bk_passengers.value == 0) {
                                        alert("Please enter the number of passengers.")
                                        document.share_book.bk_passengers.focus()
                                        return false}

}
function shared_Form2(what,count) {
    selected = what.mySelect2.selectedIndex;

    value = what.mySelect2.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['text' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['text' + i].value = value.substring(oldpos+1,value.length)
}
function shared_calc2(){ 
book_taxi.dest_add2.value=book_taxi.text0.value;
book_taxi.dest_postcode.value=book_taxi.text1.value;
}
						function airport1(url, state) {
										popupWin = window.open(url + '?city=' + state,'newWin','resizable=yes,scrollbars=yes,width=750,height=500');
										popupWin.focus();
										}
function applyLogin1(value)
{
 document.getElementById("login1").style.display = value;
}
function applyLogin2(value)
{
 document.getElementById("login2").style.display = value;
}
function applyLogin3(value)
{
 document.getElementById("login3").style.display = value;
}
function applyLogin4(value)
{
 document.getElementById("login4").style.display = value;
}
function applyLogin5(value)
{
 document.getElementById("login5").style.display = value;
}
function applyDisplay1(value)
{
 document.getElementById("foo1").style.display = value;
}
function applyDisplay2(value)
{
 document.getElementById("foo2").style.display = value;
}
function applyDisplay3(value)
{
 document.getElementById("foo3").style.display = value;
}
function applyDisplay4(value)
{
 document.getElementById("foo4").style.display = value;
}
function applyDisplay5(value)
{
 document.getElementById("foo5").style.display = value;
}
function applyDisplay6(value)
{
document.getElementById("PnAdd").style.display = value;
document.getElementById("foo6").style.display = value;
}
function applyDisplay7(value)
{
document.getElementById("DnAdd").style.display = value;
document.getElementById("foo7").style.display = value;
}
function choosePickA(value) {
document.getElementById("PaPort").style.display = value;
}
function choosePickB(value) {
document.getElementById("PsPort").style.display = value;
}
function choosePickC(value) {
document.getElementById("PmTrain").style.display = value;
}
function choosePickD(value) {
document.getElementById("Pcity").style.display = value;
}
function choosePickE(value) {
document.getElementById("PnAdd").style.display = value;
document.getElementById("PnAdd2").style.display = value;
document.getElementById("foo6").style.display = 'none';
}
function chooseDestA(value) {
document.getElementById("DaPort").style.display = value;
}
function chooseDestB(value) {
document.getElementById("DsPort").style.display = value;
}
function chooseDestC(value) {
document.getElementById("DmTrain").style.display = value;
}
function chooseDestD(value) {
document.getElementById("Dcity").style.display = value;
}
function chooseDestE(value) {
document.getElementById("DnAdd").style.display = value;
document.getElementById("DnAdd2").style.display = value;
document.getElementById("foo7").style.display = 'none';
}
function train1(url, state) {
popupWin = window.open(url + '?trip=' + state,'newWin','resizable=yes,scrollbars=yes,width=375,height=425');
popupWin.focus();
}
						function searchcity1(url, state) {
										if (document.web_book.pick_city.value == "") {
                                        alert("Please enter a place name, postcode, county, airport, airport code or train station.")
										document.getElementById('pick_city').style.background='FFCCCC';
                                        document.web_book.pick_city.focus()
                                        return false}
										else {
										closeWin();
										popupWin = window.open(url + '?search=' + state + '&action=pick','newWin','resizable=yes,scrollbars=yes,width=400,height=200');
										popupWin.focus();
										}
										}
						function searchcity2(url, state) {
										if (document.web_book.dest_city.value == "") {
                                        alert("Please enter a place name, postcode, county, airport, airport code or train station.")
										document.getElementById('dest_city').style.background='FFCCCC';
                                        document.web_book.dest_city.focus()
                                        return false}
										else {
										closeWin();
										popupWin = window.open(url + '?search=' + state + '&action=dest','newWin','resizable=yes,scrollbars=yes,width=400,height=200');
										popupWin.focus();
										}
										}
function updateForm7(what,count) {
    selected = what.mySelect7.selectedIndex;

    value = what.mySelect7.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['citypicktext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['citypicktext' + i].value = value.substring(oldpos+1,value.length)
}
function calc7(){
web_book.pick_add1.value="";
web_book.pick_add2.value="";
web_book.pick_city.value=web_book.citypicktext0.value;
web_book.pick_postcode.value=web_book.citypicktext1.value;
web_book.ap_pick.value=web_book.citypicktext2.value;
web_book.city_pick.value=1;
web_book.st_pick.value=0;
web_book.ap_pick_code.value="";
document.getElementById('picktown').innerHTML=web_book.citypicktext0.value;
document.getElementById('pickpc').innerHTML=web_book.citypicktext1.value;
}
function updateForm8(what,count) {
    selected = what.mySelect8.selectedIndex;

    value = what.mySelect8.options[selected].value;

    for (var i = 0, oldpos = -1; i<count-1; i++) {
        pos = value.indexOf('&',oldpos+1);
        data = value.substring(oldpos+1,pos);
        what.elements['citydesttext' + i].value = value.substring(oldpos+1,pos);
        oldpos = pos;
    }
    what.elements['citydesttext' + i].value = value.substring(oldpos+1,value.length)
}
function calc8(){
web_book.dest_add1.value="";
web_book.dest_add2.value="";
web_book.dest_city.value=web_book.citydesttext0.value;
web_book.dest_postcode.value=web_book.citydesttext1.value;
web_book.ap_dest.value=web_book.citydesttext2.value;
web_book.city_dest.value=1;
web_book.st_dest.value=0;
web_book.ap_dest_code.value="";
document.getElementById('desttown').innerHTML=web_book.citydesttext0.value;
document.getElementById('destpc').innerHTML=web_book.citydesttext1.value;
}
function clear1(){ 
web_book.pick_add1.value="";
web_book.pick_add2.value="";
web_book.pick_city.value="";
web_book.pick_postcode.value="";
web_book.ap_pick.value="";
web_book.ap_pick_code.value="";
web_book.st_pick.value="";
web_book.city_pick.value="";
}
function clear2(){ 
web_book.dest_add1.value="";
web_book.dest_add2.value="";
web_book.dest_city.value="";
web_book.dest_postcode.value="";
web_book.ap_dest.value="";
web_book.ap_dest_code.value="";
web_book.st_dest.value="";
web_book.city_dest.value="";
}
function checkradio1()
{
document.getElementById("pickA1").checked = true;
document.getElementById("pickA2").checked = false;
document.getElementById("pickA3").checked = false;
document.getElementById("pickA4").checked = false;
document.getElementById("pickA5").checked = false;
}
function checkradio2()
{
document.getElementById("pickA1").checked = false;
document.getElementById("pickA2").checked = true;
document.getElementById("pickA3").checked = false;
document.getElementById("pickA4").checked = false;
document.getElementById("pickA5").checked = false;
}
function checkradio3()
{
document.getElementById("pickA1").checked = false;
document.getElementById("pickA2").checked = false;
document.getElementById("pickA3").checked = true;
document.getElementById("pickA4").checked = false;
document.getElementById("pickA5").checked = false;
}
function checkradio4()
{
document.getElementById("pickA1").checked = false;
document.getElementById("pickA2").checked = false;
document.getElementById("pickA3").checked = false;
document.getElementById("pickA4").checked = true;
document.getElementById("pickA5").checked = false;
}
function checkradio5()
{
document.getElementById("pickA1").checked = false;
document.getElementById("pickA2").checked = false;
document.getElementById("pickA3").checked = false;
document.getElementById("pickA4").checked = false;
document.getElementById("pickA5").checked = true;
}
function checkradio6()
{
document.getElementById("destA1").checked = true;
document.getElementById("destA2").checked = false;
document.getElementById("destA3").checked = false;
document.getElementById("destA4").checked = false;
document.getElementById("destA5").checked = false;
}
function checkradio7()
{
document.getElementById("destA1").checked = false;
document.getElementById("destA2").checked = true;
document.getElementById("destA3").checked = false;
document.getElementById("destA4").checked = false;
document.getElementById("destA5").checked = false;
}
function checkradio8()
{
document.getElementById("destA1").checked = false;
document.getElementById("destA2").checked = false;
document.getElementById("destA3").checked = true;
document.getElementById("destA4").checked = false;
document.getElementById("destA5").checked = false;
}
function checkradio9()
{
document.getElementById("destA1").checked = false;
document.getElementById("destA2").checked = false;
document.getElementById("destA3").checked = false;
document.getElementById("destA4").checked = true;
document.getElementById("destA5").checked = false;
}
function checkradio10()
{
document.getElementById("destA1").checked = false;
document.getElementById("destA2").checked = false;
document.getElementById("destA3").checked = false;
document.getElementById("destA4").checked = false;
document.getElementById("destA5").checked = true;
}
////////////////////////////////////////////////////////////////////////
function PickReset()
{
//document.getElementById("PmTrain").reset;
document.web_book.mySelect.value = 0;
document.web_book.mySelect3.value = 0;
document.web_book.mySelect5.value = 0;
document.web_book.mySelect7.value = 0;
}
function DropReset()
{
//document.getElementById("PmTrain").reset;
document.web_book.mySelect2.value = 0;
document.web_book.mySelect4.value = 0;
document.web_book.mySelect6.value = 0;
document.web_book.mySelect8.value = 0;
}
function htxAll() {
var new_select = document.quickquoteform.airportgroupid;
var htx1=new_select.options[new_select.selectedIndex].text;
var htx2=new_select.options[new_select.selectedIndex].value;
if (htx2==0) {
if(document.location.href==('https://www.where2guv.com/user_booking.php')) {
location.href = 'https://www.where2guv.com/user_booking.php';
} else if(!location.href.toLowerCase().indexOf('https://www.where2guv.com/user_booking.php?page=getAll')==1) {
location.href = 'https://www.where2guv.com/user_booking.php';
} else {
window.location.href = ('index.php');
}
} else {
window.location.href = ('?page=getAll&airportGroupId=' + htx2 + '&AirportGroupName=' + htx1 + '&htx_search=1');
}
}
function htxAll2() {
var new_select = document.quickquoteform.airportgroupid;
var htx1=new_select.options[new_select.selectedIndex].text;
var htx2=new_select.options[new_select.selectedIndex].value;
if (htx2==0) {
if(document.location.href==('http://world.where2guv.com/')) {
location.href = 'http://www.where2guv.com';
} else if(document.location.href==('http://world.where2guv.com/index.php')) {
location.href = 'http://www.where2guv.com';
} else if(!location.href.toLowerCase().indexOf('https://www.where2guv.com/user_booking.php')==1) {
location.href = 'https://www.where2guv.com/user_booking.php';
} else {
window.location.href = ('index.php');
}
}
}
