// JavaScript Document

var isFlightHotel = false;
var isFlightCar = false;
var isFlightHotelCar = false;
var isFlightPlus = false;

function showFrm(currentFrm)
{
	DisableFrms();
	
	if(currentFrm == 1 || currentFrm == 5 || currentFrm == 6 || currentFrm == 7 || currentFrm == 9 || 
	   currentFrm == 10 || currentFrm == 11)
	{
		document.getElementById("frmFlight").style.display = "block";		
	}
	
		
	switch(currentFrm)
	{
		case 1:
			document.getElementById("frmSingleFlight").style.display = "block";
			isFlightPlus = false;
			resetFligtPlus();
			document.aspnetForm.ctl00$contentSection$rdoFliType[0].checked = true;
			break;
		case 2:
			document.getElementById("frmHotel").style.display = "block";
			isFlightPlus = false;
			resetFligtPlus();
			break;
		case 3:
			document.getElementById("frmCar").style.display = "block";
			isFlightPlus = false;
			resetFligtPlus();
			break;
		case 4:
			document.getElementById("frmCruise").style.display = "block";
			isFlightPlus = false;
			resetFligtPlus();
			break;
		case 5:
			document.getElementById("frmSingleFlightHotel").style.display = "block";
			isFlightHotel = true;
			isFlightPlus = true;
			isFlightCar = false;
			isFlightHotelCar = false;
			document.aspnetForm.ctl00$contentSection$rdoFliType[0].checked = true;
			break;
		case 6:
			document.getElementById("frmSingleFlightCar").style.display = "block";
			isFlightCar = true;
			isFlightPlus = true;
			isFlightHotel = false;
			isFlightHotelCar = false;
			document.aspnetForm.ctl00$contentSection$rdoFliType[0].checked = true;
			break;
		case 7:
			document.getElementById("frmSingleFlightHotelCar").style.display = "block";
			isFlightHotelCar = true;
			isFlightPlus = true;
			isFlightCar = false;
			isFlightHotel = false;
			document.aspnetForm.ctl00$contentSection$rdoFliType[0].checked = true;
			break;
		case 8:
			document.getElementById("frmHotelCar").style.display = "block";	
			isFlightCar = false;
			isFlightHotel = false;
			isFlightHotelCar = false;
			isFlightPlus = true;
			break;
		case 9:
			if(isFlightPlus)
			{
				if(isFlightHotel)
				{
					document.getElementById("frmSingleFlightHotel").style.display = "block";										
				}
				else if(isFlightCar)
				{
					document.getElementById("frmSingleFlightCar").style.display = "block";
				}
				else if(isFlightHotelCar)
				{
					document.getElementById("frmSingleFlightHotelCar").style.display = "block";						
				}
			}
			else
				document.getElementById("frmSingleFlight").style.display = "block";
			break;
		case 10:
		    if(isFlightPlus)
			{
				if(isFlightHotel)
				{
					document.getElementById("frmSingleFlightHotel").style.display = "block";	
					document.getElementById("frmFlightRoundTrip2").style.display = "none";
					document.getElementById("frmFlightOneWay2").style.display = "block";
				}
				else if(isFlightCar)
				{
					document.getElementById("frmSingleFlightCar").style.display = "block";
					document.getElementById("frmFlightRoundTrip3").style.display = "none";
					document.getElementById("frmFlightOneWay3").style.display = "block";
				}
				else if(isFlightHotelCar)
				{
					document.getElementById("frmSingleFlightHotelCar").style.display = "block";	
					document.getElementById("frmFlightRoundTrip4").style.display = "none";
					document.getElementById("frmFlightOneWay4").style.display = "block";
				}
			}
			else
			{
				document.getElementById("frmSingleFlight").style.display = "block";
				document.getElementById("frmFlightRoundTrip1").style.display = "none";
				document.getElementById("frmFlightOneWay1").style.display = "block";			
			}
			
			break;
		case 11:
			if(isFlightPlus)
			{
				if(isFlightHotel)
				{
					document.getElementById("frmMultipleFlightsHotel").style.display = "block";
				}
				else if(isFlightCar)
				{
					document.getElementById("frmMultipleFlightsCar").style.display = "block";			
				}
				else if(isFlightHotelCar)
				{
					document.getElementById("frmMultipleFlightsHotelCar").style.display = "block";		
				}
			}
			else
			{
				document.getElementById("frmMultipleFlights").style.display = "block";		
			}			
			break;
	}	
}

function resetFligtPlus()
{
	isFlightHotel = false;
	isFlightCar = false;
	isFlightHotelCar = false;
}


function DisableFrms()
{
	document.getElementById("frmFlight").style.display = "none";
	document.getElementById("frmSingleFlight").style.display = "none";
	document.getElementById("frmMultipleFlights").style.display = "none";
	document.getElementById("frmSingleFlightHotel").style.display = "none";
	document.getElementById("frmSingleFlightHotel").style.display = "none";
	document.getElementById("frmMultipleFlightsHotel").style.display = "none";
	document.getElementById("frmSingleFlightCar").style.display = "none";
	document.getElementById("frmMultipleFlightsCar").style.display = "none";
	document.getElementById("frmSingleFlightHotelCar").style.display = "none";	
	document.getElementById("frmMultipleFlightsHotelCar").style.display = "none";
	document.getElementById("frmHotel").style.display = "none";
	document.getElementById("frmHotelCar").style.display = "none";
	document.getElementById("frmCar").style.display = "none";	
	document.getElementById("frmCruise").style.display = "none";
	document.getElementById("frmFlightOneWay1").style.display = "none";
	document.getElementById("frmFlightOneWay2").style.display = "none";
	document.getElementById("frmFlightOneWay3").style.display = "none";
	document.getElementById("frmFlightOneWay4").style.display = "none";
	document.getElementById("frmFlightRoundTrip1").style.display = "block";
	document.getElementById("frmFlightRoundTrip2").style.display = "block";
	document.getElementById("frmFlightRoundTrip3").style.display = "block";
	document.getElementById("frmFlightRoundTrip4").style.display = "block";
}

function frmSingleFlight_Validate(frmType)
{    
    var from, to, roundTripDep, roundTripDepTime, roundTripArr, roundTripArrTime;
    var oneWayDep, oneWayDepTime, divfrmFlightRoundTrip, divfrmFlightOneWay;
    var TripInfo, CarMakeModel, isFlightCar, txtEmailAddress;
                      
    txtEmailAddress = document.aspnetForm.ctl00$contentSection$txtEmailAddress;
    isFlightCar = false;
    
    switch(frmType)
    {   
        case "frmSingleFlight":                             
            from = document.aspnetForm.ctl00$contentSection$frmSingleFlight_From;
            to = document.aspnetForm.ctl00$contentSection$frmSingleFlight_To;
            
            roundTripDep = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip1_Departure;
            roundTripDepTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip1_DepTime;
            
            roundTripArr = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip1_Arrival;
            roundTripArrTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip1_ArrTime;
            
            oneWayDep = document.aspnetForm.ctl00$contentSection$frmFlightOneWay1_Departure;
            oneWayDepTime = document.aspnetForm.ctl00$contentSection$frmFlightOneWay1_DepTime;
            
            divfrmFlightRoundTrip = "frmFlightRoundTrip1";
            divfrmFlightOneWay = "frmFlightOneWay1";            
            break;            
        case "frmSingleFlightHotel":
            from = document.aspnetForm.ctl00$contentSection$frmSingleFlightHotel_From;
            to = document.aspnetForm.ctl00$contentSection$frmSingleFlightHotel_To;
            
            roundTripDep = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip2_Departure;
            roundTripDepTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip2_DepTime;
            
            roundTripArr = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip2_Arrival;
            roundTripArrTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip2_ArrTime;
            
            oneWayDep = document.aspnetForm.ctl00$contentSection$frmFlightOneWay2_Departure;
            oneWayDepTime = document.aspnetForm.ctl00$contentSection$frmFlightOneWay2_DepTime;
            
            divfrmFlightRoundTrip = "frmFlightRoundTrip2";
            divfrmFlightOneWay = "frmFlightOneWay2";
            
            break;
       case "frmSingleFlightCar":
            from = document.aspnetForm.ctl00$contentSection$frmSingleFlightCar_From;
            to = document.aspnetForm.ctl00$contentSection$frmSingleFlightCar_To;
            
            roundTripDep = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip3_Departure;
            roundTripDepTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip3_DepTime;
            
            roundTripArr = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip3_Arrival;
            roundTripArrTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip3_ArrTime;
            
            oneWayDep = document.aspnetForm.ctl00$contentSection$frmFlightOneWay3_Departure;
            oneWayDepTime = document.aspnetForm.ctl00$contentSection$frmFlightOneWay3_DepTime;
            
            divfrmFlightRoundTrip = "frmFlightRoundTrip3";
            divfrmFlightOneWay = "frmFlightOneWay3";
            
            TripInfo = document.aspnetForm.ctl00$contentSection$frmSingleFlightCar_TripInfo;
            CarMakeModel = document.aspnetForm.ctl00$contentSection$frmSingleFlightCar_CarMakeModel;
            isFlightCar = true;
            break;
       case "frmSingleFlightHotelCar":
            from = document.aspnetForm.ctl00$contentSection$frmSingleFlightHotelCar_From;
            to = document.aspnetForm.ctl00$contentSection$frmSingleFlightHotelCar_To;
            
            roundTripDep = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip4_Departure;
            roundTripDepTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip4_DepTime;
            
            roundTripArr = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip4_Arrival;
            roundTripArrTime = document.aspnetForm.ctl00$contentSection$frmFlightRoundTrip4_ArrTime;
            
            oneWayDep = document.aspnetForm.ctl00$contentSection$frmFlightOneWay4_Departure;
            oneWayDepTime = document.aspnetForm.ctl00$contentSection$frmFlightOneWay4_DepTime;
            
            divfrmFlightRoundTrip = "frmFlightRoundTrip4";
            divfrmFlightOneWay = "frmFlightOneWay4";
            
            TripInfo = document.aspnetForm.ctl00$contentSection$frmSingleFlightHotelCar_TripInfo;
            CarMakeModel = document.aspnetForm.ctl00$contentSection$frmSingleFlightHotelCar_CarMakeModel;
            isFlightCar = true;
            break;
       
    }
    
    if(txtEmailAddress.value == "")
    {
        alert("Email address cannot be empty");
        txtEmailAddress.focus();
        return false;
    }
    else if(txtEmailAddress.value != "" && !validateEmail(txtEmailAddress.value))
    {
        alert("Email address is not valid must of the form : email@mail.com");
        txtEmailAddress.focus();
        return false;
    }
    else if(from.value == "")
    {
        alert("Leaving From cannot be empty");
        from.focus();
        return false;
    }else if(to.value == "")
    {
        alert("Going To cannot be empty");
        to.focus();
        return false;
    }
    else if(document.getElementById(divfrmFlightRoundTrip).style.display == "block")
    {
        if(roundTripDep.value == "")
        {
            alert("Departure date cannot be empty");
            roundTripDep.focus();
            return false;
        }else if(roundTripDepTime.selectedIndex == 0)
        {
            alert("Select departure time");
            roundTripDepTime.focus();
            return false;
        }else if(roundTripArr.value == "" )
        {
            alert("Arrival date cannot be empty");
            roundTripArr.focus();
            return false;
        }else if(roundTripArrTime.selectedIndex == 0)
        {
            alert("Select arrival time");
            roundTripArrTime.focus();
            return false;
        }
        else if(isFlightCar == true)
        {
            if(TripInfo.value == "")
            {
                alert("Trip Info cannot be empty");
                TripInfo.focus();
                return false;            
            }
            else if(CarMakeModel.value == "")
            {
                alert("Car make and model cannot empty")
                CarMakeModel.focus();
                return false;
            }
        }
    }
    else if(document.getElementById(divfrmFlightOneWay).style.display == "block")
    {
        if(oneWayDep.value == "")
        {
            alert("Departure date cannot be empty");
            oneWayDep.focus();
            return false;
        }else if(oneWayDepTime.selectedIndex == 0)
        {
            alert("Select departure time");
            oneWayDepTime.focus();
            return false;
        }
        else if(isFlightCar == true)
        {
            if(TripInfo.value == "")
            {
                alert("Trip Info cannot be empty");
                TripInfo.focus();
                return false;            
            }
            else if(CarMakeModel.value == "")
            {
                alert("Car make and model cannot empty")
                CarMakeModel.focus();
                return false;
            }
        }
    }
    
    
    return true;
}

function frmMultipleFlights_Validate(frmType)
{
    var form1, to1, Dep1, DepTime1;     
    var form2, to2, Dep2, DepTime2;  
    var TripInfo, CarMakeModel, isFlightCar = false;
    
    var txtEmailAddress = document.aspnetForm.ctl00$contentSection$txtEmailAddress;
    
    switch(frmType)
    { 
        case "frmMultipleFlights":                           
            form1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_From1;
            to1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_To1;
            
            Dep1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_Departure1;
            DepTime1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_DepTime1;
            
            form2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_From2;
            to2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_To2;
            
            Dep2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_Departure2;
            DepTime2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlights_DepTime2;
            break;
        case "frmMultipleFlightsHotel":                           
            form1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_From1;
            to1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_To1;
            
            Dep1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_Departure1;
            DepTime1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_DepTime1;
            
            form2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_From2;
            to2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_To2;
            
            Dep2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_Departure2;
            DepTime2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotel_DepTime2;
            break;
       case "frmMultipleFlightsCar":                           
            form1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_From1;
            to1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_To1;
            
            Dep1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_Departure1;
            DepTime1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_DepTime1;
            
            form2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_From2;
            to2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_To2;
            
            Dep2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_Departure2;
            DepTime2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_DepTime2;
            
            TripInfo = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_TripInfo;
            CarMakeModel = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsCar_CarMakeModel;
            isFlightCar = true;
            
            break;
        case "frmMultipleFlightsHotelCar":                           
            form1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_From1;
            to1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_To1;
            
            Dep1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_Departure1;
            DepTime1 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_DepTime1;
            
            form2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_From2;
            to2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_To2;
            
            Dep2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_Departure2;
            DepTime2 = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_DepTime2;
            
            TripInfo = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_TripInfo;
            CarMakeModel = document.aspnetForm.ctl00$contentSection$frmMultipleFlightsHotelCar_CarMakeModel;
            isFlightCar = true;
            break;
    }
    
    if(txtEmailAddress.value == "")
    {
        alert("Email address cannot be empty");
        txtEmailAddress.focus();
        return false;
    }
    else if(txtEmailAddress.value != "" && !validateEmail(txtEmailAddress.value))
    {
        alert("Email address is not valid must of the form : email@mail.com");
        txtEmailAddress.focus();
        return false;
    }
    else if(form1.value == "")
    {
        alert("Flight 1: Leaving From cannot be empty");
        form1.focus();
        return false;
    }
    else if(to1.value == "")
    {
        alert("Flight 1: Going to cannot be empty");
        to1.focus();
        return false;
    }
    else if(Dep1.value == "")
    {
        alert("Flight 1: Departure date cannot be empty");
        Dep1.focus();
        return false;
    }
    else if(DepTime1.selectedIndex == 0)
    {
        alert("Flight 1: Departure time cannot be empty");
        DepTime1.focus();
        return false;
    }
    else if(form2.value == "")
    {
        alert("Flight 2: Leaving From cannot be empty");
        form2.focus();
        return false;
    }
    else if(to2.value == "")
    {
        alert("Flight 2: Going to cannot be empty");
        to2.focus();
        return false;
    }
    else if(Dep2.value == "")
    {
        alert("Flight 2: Departure date cannot be empty");
        Dep2.focus();
        return false;
    }
    else if(DepTime2.selectedIndex == 0)
    {
        alert("Flight 2: Departure time cannot be empty");
        DepTime2.focus();
        return false;
    }
    else if(isFlightCar)
    {
        if(TripInfo.value == "")
        {
            alert("Trip Info cannot be empty");
            TripInfo.focus();
            return false;            
        }
        else if(CarMakeModel.value == "")
        {
            alert("Car make and model cannot empty")
            CarMakeModel.focus();
            return false;
        }
    }
    
    return true;
}

function frmHotel_Validate(frmType)
{

    var City, Star, Budget, Rooms, CheckIn, CheckInTime, CheckOut, CheckOutTime, Interest;
    var Airport, TripInfo, CarMakeModel;
    var isHotelCar = false;
    
    var txtEmailAddress = document.aspnetForm.ctl00$contentSection$txtEmailAddress;
    
    switch(frmType)
    {
        case "frmHotel":
            City = document.aspnetForm.ctl00$contentSection$frmHotel_City;
            Budget = document.aspnetForm.ctl00$contentSection$frmHotel_Budget;
            CheckIn = document.aspnetForm.ctl00$contentSection$frmHotel_CheckIn;
            CheckInTime = document.aspnetForm.ctl00$contentSection$frmHotel_CheckInTime;
            CheckOut = document.aspnetForm.ctl00$contentSection$frmHotel_CheckOut;
            CheckOutTime = document.aspnetForm.ctl00$contentSection$frmHotel_CheckOutTime;            
        break;
        case "frmHotelCar":
            City = document.aspnetForm.ctl00$contentSection$frmHotelCar_City;
            Budget = document.aspnetForm.ctl00$contentSection$frmHotelCar_Budget;
            CheckIn = document.aspnetForm.ctl00$contentSection$frmHotelCar_CheckIn;
            CheckInTime = document.aspnetForm.ctl00$contentSection$frmHotelCar_CheckInTime;
            CheckOut = document.aspnetForm.ctl00$contentSection$frmHotelCar_CheckOut;
            CheckOutTime = document.aspnetForm.ctl00$contentSection$frmHotelCar_CheckOutTime; 
            Airport = document.aspnetForm.ctl00$contentSection$frmHotelCar_Airport;
            TripInfo = document.aspnetForm.ctl00$contentSection$frmHotelCar_TripInfo;
            CarMakeModel = document.aspnetForm.ctl00$contentSection$frmHotelCar_CarMakeModel; 
            isHotelCar = true;          
        break;
        
    }
    
    if(txtEmailAddress.value == "")
    {
        alert("Email address cannot be empty");
        txtEmailAddress.focus();
        return false;
    }
    else if(txtEmailAddress.value != "" && !validateEmail(txtEmailAddress.value))
    {
        alert("Email address is not valid must of the form : email@mail.com");
        txtEmailAddress.focus();
        return false;
    }
    else if(City.value == "")
    {
        alert("Enter city name");
        City.focus();
        return false;
    }
    else if(Budget.value == "")
    {
        alert("Enter your budget");
        Budget.focus();
        return false;
    }
    else if(CheckIn.value == "")
    {
        alert("Checkin date cannot be empty");
        CheckIn.focus();
        return false;
    }
    else if(CheckInTime.selectedIndex == 0)
    {
        alert("Choose checkin time ");
        CheckInTime.focus();
        return false;
    }
    else if(CheckOut.value == "")
    {
        alert("Checkout date cannot be empty");
        CheckOut.focus();
        return false;
    }
    else if(CheckOutTime.selectedIndex == 0)
    {
        alert("Choose checkout time ");
        CheckOutTime.focus();
        return false;
    }
    else if(isHotelCar)
    {
        if(Airport.value == "")
        {
            alert("Aiport cannot be empty");
            Airport.focus();
            return false;
        }
        else if(TripInfo.value == "")
        {
            alert("Trip information cannot be empty");
            TripInfo.focus();
            return false;
        }
        else if(CarMakeModel.value == "")
        {
            alert("Car make and model cannot be empty");
            CarMakeModel.focus();
            return false;
        }
    }
    
    return true;
}

function frmCar_Validate()
{
    var Airport, TripInfo, CarMakeModel, PickUpDestination, PickUpTime, DropOffDestination, DropOffTime;
    var txtEmailAddress = document.aspnetForm.ctl00$contentSection$txtEmailAddress;
    
    Airport = document.aspnetForm.ctl00$contentSection$frmCar_Airport; 
    TripInfo = document.aspnetForm.ctl00$contentSection$frmCar_TripInfo; 
    CarMakeModel = document.aspnetForm.ctl00$contentSection$frmCar_CarMakeModel; 
    PickUpDestination = document.aspnetForm.ctl00$contentSection$frmCar_PickUpDestination; 
    PickUpTime = document.aspnetForm.ctl00$contentSection$frmCar_PickUpTime; 
    DropOffDestination = document.aspnetForm.ctl00$contentSection$frmCar_DropOffDestination; 
    DropOffTime = document.aspnetForm.ctl00$contentSection$frmCar_DropOffTime; 
    
    if(txtEmailAddress.value == "")
    {
        alert("Email address cannot be empty");
        txtEmailAddress.focus();
        return false;
    }
    else if(txtEmailAddress.value != "" && !validateEmail(txtEmailAddress.value))
    {
        alert("Email address is not valid must of the form : email@mail.com");
        txtEmailAddress.focus();
        return false;
    }
    else if(Airport.value == "")
    {
        alert("Airport cannot be empty");
        Airport.focus();
        return false;
    }
    else if(TripInfo.value == "")
    {
        alert("Trip information cannot be empty");
        TripInfo.focus();
        return false;
    }
    else if(CarMakeModel.value == "")
    {
        alert("Car make and model cannot be empty");
        CarMakeModel.focus();
        return false;
    }
    else if(PickUpDestination.value == "")
    {
        alert("Pick up destination cannot be empty");
        PickUpDestination.focus();
        return false;
    }
    else if(PickUpTime.selectedIndex == 0)
    {
        alert("Select a pick up time");
        PickUpTime.focus();
        return false;
    }
    else if(DropOffDestination.value == "")
    {
        alert("Drop off destination cannot be empty");
        DropOffDestination.focus();
        return false;
    }
    else if(DropOffTime.selectedIndex == 0)
    {
        alert("Select a drop off time");
        DropOffTime.focus();
        return false;
    }
    
}



function validateEmail(strEmail) 
{
	 var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
	 var regex = new RegExp(emailReg);
	 return regex.test(strEmail);
}

