
    function Initialise() {
        var numModes = 6;
        for (i = 0; i < numModes; i++) {
	        if (document.getElementById("exp_SearchType" + i)!=null) {
		        document.getElementById("exp_SearchType" + i).checked = true;
	            exp_showMode(i);
	            return;
	        }
        }
    }


    function exp_showMode(whichMode) {
	    var numModes = 6;
	    for (i = 0; i < numModes; i++) {
		    if (typeof(document.getElementById("exp-wiz-" + i)=='object'))
		        document.getElementById("exp-wiz-" + i).style.display = (i == whichMode) ? "block" : "none";
	    }
    }

    function exp_showRooms(roomNo) {
        document.getElementById("exp-wiz-room2").style.display = (roomNo == 2) ? "block" : "none";
    }


    function exp_MoreOptions()
    {
        
        //FLIGHT + HOTEL
            if  (document.getElementById("exp_SearchType0").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=PKGLAUNCH&DestName=" + encodeURI(document.getElementById("exp_FH_DestName").value) +"&FrAirport="+ encodeURI(document.getElementById("exp_FH_FrAirport").value) +"&FromDate="+ document.getElementById("exp_FH_FromDate").value +"&ToDate="+ document.getElementById("exp_FH_ToDate").value +"&FromTime="+ document.getElementById("exp_FH_FromTime").value +"&ToTime="+ document.getElementById("exp_FH_ToTime").value +"&NumAdult="+ document.getElementById("exp_FH_NumAdult").value +"&NumChild="+ document.getElementById("exp_FH_NumChild").value +"&NumSenior="+ document.getElementById("exp_FH_NumSenior").value +"&NumRoom=1");
            }
        	
        //FLIGHTS
            if  (document.getElementById("exp_SearchType1").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=FLIGHTWIZ&eapid=0-3&langid=2057" + "&DepAirpName=" + encodeURI(document.getElementById("exp_F_FrAirport").value) + "&DestAirpName=" + encodeURI(document.getElementById("exp_F_ToAirport").value) + "&DepDate=" + document.getElementById("exp_F_FromDate").value  + "&DepTime=" + document.getElementById("exp_F_FromTime").value + "&ReturnDate=" + document.getElementById("exp_F_ToDate").value + "&ReturnTime=" + document.getElementById("exp_F_ToTime").value +"&NumAdult="+ document.getElementById("exp_F_NumAdult").value +"&NumChild="+ document.getElementById("exp_F_NumChild").value +"&NumSenior="+ document.getElementById("exp_F_NumSenior").value);
            }
        
        //HOTEL
            if  (document.getElementById("exp_SearchType2").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=HOTWIZ&MoreOptions=1&cityname=" + encodeURI(document.getElementById("exp_H_CityName").value) + "&indate=" + document.getElementById("exp_H_InDate").value +"&outdate="+ document.getElementById("exp_H_OutDate").value +"&numadult="+ document.getElementById("exp_H_NumAdult").value +"&numchild="+ document.getElementById("exp_H_NumChild").value +"&numroom="+ document.getElementById("exp_H_NumRoom").value);
            }
        
        //CARS
            if  (document.getElementById("exp_SearchType3").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=CARWIZD&Equipment=1&pickuploc=" + encodeURI(document.getElementById("exp_C_PickupLoc").value) +"&PickUpDate="+ document.getElementById("exp_C_FromDate").value +"&DropOffDate="+ document.getElementById("exp_C_ToDate").value +"&PIckUpTime="+ document.getElementById("exp_C_FromTime").value +"&DropOffTime="+ document.getElementById("exp_C_ToTime").value +"&CarClass=" + document.getElementById("exp_C_CarClass").value);
            }
        
        //ACTIVITIES
            if  (document.getElementById("exp_SearchType4").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=TSHOPSSEARCH&LocationName=" + encodeURI(document.getElementById("exp_A_LocationName").value) +"&StartDate="+ document.getElementById("exp_A_StartDate").value +"&EndDate="+ document.getElementById("exp_A_EndDate").value);
            }
        
        //3PP
            if  (document.getElementById("exp_SearchType5").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?http://booking.expedia.co.uk");
            }
        
    }
    
    function exp_SubmitWiz()
    {
        //FLIGHT + HOTEL
        
            if  (document.getElementById("exp_SearchType0").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=PACKAGEWIZ&DestName=" + encodeURI(document.getElementById("exp_FH_DestName").value) +"&FrAirport="+ encodeURI(document.getElementById("exp_FH_FrAirport").value) +"&FromDate="+ document.getElementById("exp_FH_FromDate").value +"&ToDate="+ document.getElementById("exp_FH_ToDate").value +"&FromTime="+ document.getElementById("exp_FH_FromTime").value +"&ToTime="+ document.getElementById("exp_FH_ToTime").value +"&NumAdult="+ document.getElementById("exp_FH_NumAdult").value +"&NumChild="+ document.getElementById("exp_FH_NumChild").value +"&NumSenior="+ document.getElementById("exp_FH_NumSenior").value +"&NumRoom=1");
            }
        

        //FLIGHT
        	
            if  (document.getElementById("exp_SearchType1").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=EXPFLTWIZ&FrAirport=" + encodeURI(document.getElementById("exp_F_FrAirport").value) +"&ToAirport="+ encodeURI(document.getElementById("exp_F_ToAirport").value) +"&FromDate="+ document.getElementById("exp_F_FromDate").value +"&ToDate="+ document.getElementById("exp_F_ToDate").value +"&FromTime="+ document.getElementById("exp_F_FromTime").value +"&ToTime="+ document.getElementById("exp_F_ToTime").value +"&NumAdult="+ document.getElementById("exp_F_NumAdult").value +"&NumChild="+ document.getElementById("exp_F_NumChild").value +"&NumSenior="+ document.getElementById("exp_F_NumSenior").value);
            }
        
        //HOTEL
            if  (document.getElementById("exp_SearchType2").checked == true)
            {
                var redirectURL;
                redirectURL = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=HOTSEARCH&cityname=" + encodeURI(document.getElementById("exp_H_CityName").value) + "&indate=" + document.getElementById("exp_H_InDate").value +"&outdate="+ document.getElementById("exp_H_OutDate").value +"&numadult="+ document.getElementById("exp_H_NumAdult").value +"&numchild="+ document.getElementById("exp_H_NumChild").value +"&numroom="+ document.getElementById("exp_H_NumRoom").value);
                if ( document.getElementById("exp_H_NumRoom").value == 2 ) {
                    redirectURL = redirectURL + escape("&numadult2="+ document.getElementById("exp_H_NumAdult2").value +"&numchild2="+ document.getElementById("exp_H_NumChild2").value);
                }
                document.location = redirectURL;
            }
        
        //CAR
            if  (document.getElementById("exp_SearchType3").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=CARSEARCH&pickuploc=" + encodeURI(document.getElementById("exp_C_PickupLoc").value) +"&FromDate="+ document.getElementById("exp_C_FromDate").value +"&ToDate="+ document.getElementById("exp_C_ToDate").value +"&FromTime="+ document.getElementById("exp_C_FromTime").value +"&ToTime="+ document.getElementById("exp_C_ToTime").value +"&Class=" + document.getElementById("exp_C_CarClass").value);
            }
        
        //ACTIVITES
            if  (document.getElementById("exp_SearchType4").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=/pubspec/scripts/eap.asp" + escape("?GOTO=TSHOPSSEARCH&LocationName=" + encodeURI(document.getElementById("exp_A_LocationName").value) +"&StartDate="+ document.getElementById("exp_A_StartDate").value +"&EndDate="+ document.getElementById("exp_A_EndDate").value);
            }
        
        //3PP
        //UK 3

            if  (document.getElementById("exp_SearchType5").checked == true)
            {
                document.location = "http://holidaydestinations.at/turkey4travel?DURL=http://www.expedia.co.uk/daily/shared/common/tracking/trackingredirect.aspx?AFFCID=turkey4travel&URL=http://booking.expedia.co.uk/tt.aspx?" + escape("Departure=" + encodeURI(document.getElementById("exp_UK3PP_LeavingFrom").value) +"&Region="+ encodeURI(document.getElementById("exp_UK3PP_GoingTo").value) +"&Duration="+ document.getElementById("exp_UK3PP_Duration").value +"&FromDate="+ document.getElementById("exp_UK3PP_FromDate").value +"&ToDate="+ document.getElementById("exp_UK3PP_ToDate").value +"&NumAdults="+ document.getElementById("exp_UK3PP_NumAdults").value +"&Child1="+ document.getElementById("exp_UK3PP_Child1").value +"&Child2="+ document.getElementById("exp_UK3PP_Child2").value);
            }
        
    }
    
    Initialise();

