function ChooseDestination()
{
document.getElementById("SearchBox_SuggestedDest").style.display = "none";
document.getElementById("SearchBox_ChooseDest").style.display = "block";
}


function AutoCompleteLink()
{
        Month = document.getElementById("MonthName").value;
        DestinationName = document.getElementById("DestinationName").value;
        SetDestinationName = document.getElementById("SetDestination").value;
        
        if (document.getElementById("DestinationName").value.length < 1)
        {
        document.getElementById("FindHotelOnly").innerHTML = "Find a hotel in " + document.getElementById("SetDestination").value;
        document.getElementById("FindFlightHotel").innerHTML = "Find a holiday in " + document.getElementById("SetDestination").value;
        document.getElementById("FindFlightOnly").innerHTML = "Find a flight to " + document.getElementById("SetDestination").value;
        document.getElementById("FindCarHire").innerHTML = "Find car hire in " + document.getElementById("SetDestination").value;
        
        document.getElementById("MoreSearchHotel").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=HOTLAUNCH&cityname="+ document.getElementById("SetDestination").value +"&numadult=2&numroom=1&mcicid=WhereToGo_"+ Month +".Swiz.HOT.Text."+ SetDestinationName +".MoreHotelOptions";
        document.getElementById("MoreSearchFlightHotel").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=PKGLAUNCH&destname="+ document.getElementById("SetDestination").value +"&numadult=2&numroom=1&packagetype=2&mcicid=WhereToGo_"+ Month +".Swiz.PKG.Text."+ SetDestinationName +".MoreFlightHotelOptions";
        document.getElementById("MoreSearchFlight").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=FLIGHTWIZ&numadult=2&triptype=roundtrip&destairpname="+ document.getElementById("SetDestination").value + "&mcicid=WhereToGo_"+ Month +".Swiz.FLT.Text."+ SetDestinationName +".MoreFlightOptions";
        document.getElementById("MoreSearchCarHire").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=CARWIZD&pickuploc="+ document.getElementById("SetDestination").value + "&mcicid=WhereToGo_"+ Month +".Swiz.CAR.Text."+ SetDestinationName +".MoreCarHireOptions";
        }
        else
        {        
        document.getElementById("FindHotelOnly").innerHTML = "Find a hotel in " + document.getElementById("DestinationName").value;
        document.getElementById("FindFlightHotel").innerHTML = "Find a holiday in " + document.getElementById("DestinationName").value;
        document.getElementById("FindFlightOnly").innerHTML = "Find a flight in " + document.getElementById("DestinationName").value;
        document.getElementById("FindCarHire").innerHTML = "Find car hire in " + document.getElementById("DestinationName").value;
        
        document.getElementById("MoreSearchHotel").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=HOTLAUNCH&cityname="+ document.getElementById("DestinationName").value +"&numadult=2&numroom=1&mcicid=WhereToGo_"+ Month +".Swiz.HOT.Text."+ DestinationName +".MoreHotelOptions";
        document.getElementById("MoreSearchFlightHotel").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=PKGLAUNCH&destname="+ document.getElementById("DestinationName").value +"&numadult=2&numroom=1&packagetype=2&mcicid=WhereToGo_"+ Month +".Swiz.PKG.Text."+ DestinationName +".MoreFlightHotelOptions";
        document.getElementById("MoreSearchFlight").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=FLIGHTWIZ&numadult=2&triptype=roundtrip&destairpname="+ document.getElementById("DestinationName").value + "&mcicid=WhereToGo_"+ Month +".Swiz.FLT.Text."+ DestinationName +".MoreFlightOptions";
        document.getElementById("MoreSearchCarHire").href = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=CARWIZD&pickuploc="+ document.getElementById("DestinationName").value + "&mcicid=WhereToGo_"+ Month +".Swiz.CAR.Text."+ DestinationName +".MoreCarHiteOptions";

        }
}


function SearchHotel()
{
        if (document.getElementById("DestinationName").value == "")
        {
        document.getElementById("DestinationName").value = document.getElementById("SetDestination").value;
        }
        
        document.SearchBox.action = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=HOTSEARCH&cityname="+ document.getElementById("DestinationName").value +"&indate="+ document.getElementById("DepDate").value +"&outdate="+ document.getElementById("RetDate").value +"&numadult=2&numroom=1&mcicid=WhereToGo_"+ document.getElementById("MonthName").value +".Swiz.HOT.Text."+ document.getElementById("DestinationName").value +".FindHotel";
        document.SearchBox.submit();
}


function SearchHoliday()
{
        if (document.getElementById("DestinationName").value == "")
        {
        document.getElementById("DestinationName").value = document.getElementById("SetDestination").value;
        }
        
        document.SearchBox.action = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=PACKAGEWIZ&frairport="+ document.getElementById("DepartureAirport").value +"&destname="+ document.getElementById("DestinationName").value +"&fromdate="+ document.getElementById("DepDate").value +"&todate="+ document.getElementById("RetDate").value +"&numadult=2&numroom=1&packagetype=2&mcicid=WhereToGo_"+ document.getElementById("MonthName").value +".Swiz.PKG.Text."+ document.getElementById("DestinationName").value +".FindFlightHotel";
        document.SearchBox.submit();
}

function SearchFlight()
{
        if (document.getElementById("DestinationName").value == "")
        {
        document.getElementById("DestinationName").value = document.getElementById("SetDestination").value;
        }
        
        document.SearchBox.action = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=EXPFLTWIZ&numadult=2&triptype=roundtrip&frairport="+ document.getElementById("DepartureAirport").value +"&toairport="+ document.getElementById("DestinationName").value +"&fromdate="+ document.getElementById("DepDate").value +"&todate="+ document.getElementById("RetDate").value +"&triptype=roundtrip&mcicid=WhereToGo_"+ document.getElementById("MonthName").value +".Swiz.FLT.Text."+ document.getElementById("DestinationName").value +".FindFlight";
        document.SearchBox.submit();
}

function SearchCarHire()
{
        if (document.getElementById("DestinationName").value == "")
        {
        document.getElementById("DestinationName").value = document.getElementById("SetDestination").value;
        }
        
        document.SearchBox.action = "http://www.expedia.co.uk/pubspec/scripts/eap.asp?GOTO=CARSEARCH&pickuploc="+ document.getElementById("DestinationName").value +"&pickuptime=660&dropofftime=660&Class=NOPREFERENCE&fromdate="+ document.getElementById("DepDate").value +"&todate="+ document.getElementById("RetDate").value + "&mcicid=WhereToGo_"+ document.getElementById("MonthName").value +".Swiz.CAR.Text."+ document.getElementById("DestinationName").value +".FindCarHire";
        document.SearchBox.submit();
}