﻿
function MiniSearchGo()
    {
   /* var  OutboundDeparture = document.getElementById("FlightOnlySearch1_txtFrom").value;*/
   var  OutboundDeparture = document.getElementById("FlightOnlySearch1_ddlDepartureAirport").value;
    var OutboundDestination = document.getElementById("FlightOnlySearch1_txtTo").value;
    var OutboundDepartureDate = document.getElementById("FlightOnlySearch1_txtStartDate").value;
    var JourneyType = "R";
    if(document.getElementById("FlightOnlySearch1_radioBtnOneWay").checked)
    {
        JourneyType = "1";
    }
    var InboundDepartureDate = document.getElementById("FlightOnlySearch1_txtEndDate").value;
    var TotalAdults = document.getElementById("FlightOnlySearch1_cmbRoom1Adult").value;
    var TotalChildren = document.getElementById("FlightOnlySearch1_cmbRoom1Child").value;
    var TotalInfants = document.getElementById("FlightOnlySearch1_cmbRoom1Infant").value;
    var DirectFlight = document.getElementById("FlightOnlySearch1_chkDirectFlights").checked?"1":"0";
    if(document.getElementById("FlightOnlySearch1_chFelxibledates").checked)
    {
    
    window.location = "FlexibleDateCalendar.aspx?OutboundDeparture="+OutboundDeparture+"&&OutboundDestination="+OutboundDestination+"&&"
    +"OutboundDepartureDate="+OutboundDepartureDate+"&&JourneyType="+JourneyType+"&&InboundDepartureDate="+InboundDepartureDate+"&&"
    +"TotalAdults="+TotalAdults+"&&TotalChildren="+TotalChildren+"&&TotalInfants="+TotalInfants+"&&GoSearch=&&Flxdate=true";
    
    
    }
    else{
    window.location = "FlightResults.aspx?OutboundDeparture="+OutboundDeparture+"&&OutboundDestination="+OutboundDestination+"&&"
    +"OutboundDepartureDate="+OutboundDepartureDate+"&&JourneyType="+JourneyType+"&&InboundDepartureDate="+InboundDepartureDate+"&&"
    +"TotalAdults="+TotalAdults+"&&TotalChildren="+TotalChildren+"&&TotalInfants="+TotalInfants+"&&GoSearch=&&DirectFlight="+DirectFlight;
    }
    $( "#dialog-modal" ).dialog( "destroy" );
    return;
    
    }
    
	function MiniSearch() {
		// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
		//document.getElementById("FlightOnlySearch1_AutoCompleteExtender1_completionListElem").style.zIndex=10000;
		document.getElementById("FlightOnlySearch1_AutoCompleteExtender2_completionListElem").style.zIndex=10000;
		
		$( "#dialog:ui-dialog" ).dialog( "destroy" );
	
		$( "#dialog-modal" ).dialog({
			height: 350,
			width:950,
			modal: true
		});
	}
	
		function MiniSearchMultiLeg() {
		// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
		$( "#dialog:ui-dialog" ).dialog( "destroy" );
	
		$( "#dialog-modalMultiLeg" ).dialog({
			height: 350,
			width:540,
			modal: true
		});
	}



function ChooseDiffFlight()
{

window.location = "FlightResults.aspx?Pakage=Up";


}

function GetMasterPriceSearch(strval)
{
 window.location = "eT_FlightResults.aspx?"+strval;
}
/*function changeColor(color, ID,track,defal) 
{
var hotelid ="s_" +ID.toString().split('_')[0];
var flightid = "h_"+ID.toString().split('_')[1];

//if(document.getElementById(hotelid).bgColor != "#fcff00")
document.getElementById(hotelid).bgColor = "#" + color;
//if(document.getElementById(flightid).bgColor != "#fcff00")
document.getElementById(flightid).bgColor = "#" + color;
document.getElementById(ID).bgColor = "#" + color;


/*
if(defal != "")
{
document.getElementById(hotelid).bgColor = "#" + defal;
document.getElementById(flightid).bgColor = "#" + defal;
document.getElementById(ID).bgColor = "#" + defal;
}*/
/*if(track != "0")
document.getElementById(ID).bgColor = track;

}
*/

function changeColor(color, ID, track, str, v) {
    var hotelid = "s_" + ID.toString().split('_')[0];
    var flightid = "h_" + ID.toString().split('_')[1];

    if (color == "8BC100") {
        document.getElementById(hotelid).bgColor = "#" + str;
        document.getElementById(flightid).bgColor = "#" + color;
        document.getElementById(ID).bgColor = "#" + color;
    } else {
        document.getElementById(hotelid).bgColor = "#C3DE7F";
        document.getElementById(flightid).bgColor = "#C3DE7F";
        document.getElementById(ID).bgColor = "#" + color;

    }
    if (track != "0")
        document.getElementById(ID).bgColor = track;
    try {
        if (v == "n")
            document.getElementById(flightid).bgColor = "#8BC100";
    } catch (e)
{ }

    if (str == "8BC100") {
        document.getElementById(hotelid).bgColor = "#" + str;

    }


}

function changeColorForDefaultdate(color, ID, track, newcolor) {
    var hotelid = "s_" + ID.toString().split('_')[0];
    var flightid = "h_" + ID.toString().split('_')[1];

    document.getElementById(hotelid).bgColor = "#" + newcolor;
    document.getElementById(flightid).bgColor = "#" + newcolor;
    document.getElementById(ID).bgColor = "#" + color;

    if (track != "0")
        document.getElementById(ID).bgColor = track;

}

function goToNextPackage(selectedPricableUnitID,hotelIndex,val,selectOption)
{    

	if((document.getElementById("hdSearchOption")!= null)&&(document.getElementById("hdOutboundStartIndex")!= null)&&(document.getElementById("hdOutboundEndIndex")!= null)&&(document.getElementById("hdInboundStartIndex")!= null)&&(document.getElementById("hdInboundEndIndex")!= null))
	{
		switch((document.getElementById("hdSearchOption")).value)
		{
			case "1":
			{
				var OutboundStartIndex = Number((document.getElementById("hdOutboundStartIndex")).value);
				var OutboundEndIndex = Number((document.getElementById("hdOutboundEndIndex")).value);
				var InboundStartIndex = Number((document.getElementById("hdInboundStartIndex")).value);
				var InboundEndIndex = Number((document.getElementById("hdInboundEndIndex")).value); 
				
				var selectedOutboundPriceIndex = -3;
				var selectedInboundPriceIndex = -4;
				var lbolStatus = false;
				var outboundRadioBtn; 
				var selectedRadioOutboundBtnIndex = -1;
				var selectedInboundRadioBtnIndex = -1;
				for( var i = OutboundStartIndex; i <= OutboundEndIndex;i++)
				{
					outboundRadioBtn = document.getElementById("radioBtnLeave" + i);
					if((outboundRadioBtn != null)&&(outboundRadioBtn.checked)&&(outboundRadioBtn.value==selectedPricableUnitID))
					{
						selectedOutboundPriceIndex = outboundRadioBtn.value;
						selectedRadioOutboundBtnIndex = "radioBtnLeave" + i;
						break;
					}
				}
				
				var inboundRadioBtn;
				for( var i = InboundStartIndex; i <= InboundEndIndex ; i++)
				{
					inboundRadioBtn = document.getElementById("radioBtnReturn" + i);
					if((inboundRadioBtn != null)&&(inboundRadioBtn.checked)&&(inboundRadioBtn.value==selectedPricableUnitID))
					{
						selectedInboundPriceIndex = inboundRadioBtn.value;
						selectedInboundRadioBtnIndex = "radioBtnReturn" + i;
						break;
					}
				}

			    if(selectedOutboundPriceIndex == selectedInboundPriceIndex)
				{
			        if (document.getElementById("hdHotelRoom")!= null)
			        {var navigatePage = (document.getElementById("hdPageName")).value;
			var roomType0=-1;
			var roomType1=-1;
			
			var roomNo0=0;
			
			var roomNo1=-1;
			if(val != -1)roomNo1 = 0;
			        if(document.getElementById('hdroomType0').value==99 && document.getElementById('hdHotelIndexRtype0').value==hotelIndex)
				{
				roomType0 = document.getElementById('hdHotelIndexRtype0').value;
				roomNo0 = document.getElementById('hdNoroom0').value;
				direc = 1;
				}
				
				
				if(document.getElementById('hdroomType1').value==99 && document.getElementById('hdHotelIndexRtype1').value==hotelIndex)
				{
				roomType1 = document.getElementById('hdHotelIndexRtype1').value;
				roomNo1 = document.getElementById('hdNoroom1').value;
				direc = 1;  
				}
							
				            document.getElementById('hdHotelRoom').value = hotelIndex+"_"+roomNo0+"_"+roomNo1;
			            
			                window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex+"&hotelrooom="+document.getElementById('hdHotelRoom').value;
			                return;
			           
				    }
				    else
				    {
				        
				        var navigatePage = (document.getElementById("hdPageName")).value;
				        
				        if (selectOption != "0")
			            {
				            window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex+"&noHotel=1";
				            return;
				        }
				        else
				        {
				            window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex;
				            return;
				        }
				    }
				}
				else
				{
				    if((InboundStartIndex == -1)&&(InboundEndIndex == -1)&&(selectedOutboundPriceIndex != -3))
					{
					    var navigatePage = (document.getElementById("hdPageName")).value;
					    
					    if (selectOption != "0")
			            {
					        window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=-1&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=-1&noHotel=1";
					        return;
					    }
					    else
					    {
					        window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=-1&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=-1";
					        return;
					    }
					}
					else
					{
					    alert("Please Select the Correct Flight");
					}
				}

				break;
			}
		}
	}
	else
	{
		alert("Error in this page");
	}
}


function goToNext(selectedPricableUnitID, selectOption)
{    

	if((document.getElementById("hdSearchOption")!= null)&&(document.getElementById("hdOutboundStartIndex")!= null)&&(document.getElementById("hdOutboundEndIndex")!= null)&&(document.getElementById("hdInboundStartIndex")!= null)&&(document.getElementById("hdInboundEndIndex")!= null))
	{
		switch((document.getElementById("hdSearchOption")).value)
		{
			case "1":
			{
				var OutboundStartIndex = Number((document.getElementById("hdOutboundStartIndex")).value);
				var OutboundEndIndex = Number((document.getElementById("hdOutboundEndIndex")).value);
				var InboundStartIndex = Number((document.getElementById("hdInboundStartIndex")).value);
				var InboundEndIndex = Number((document.getElementById("hdInboundEndIndex")).value); 
				
				var selectedOutboundPriceIndex = -3;
				var selectedInboundPriceIndex = -4;
				var lbolStatus = false;
				var outboundRadioBtn; 
				var selectedRadioOutboundBtnIndex = -1;
				var selectedInboundRadioBtnIndex = -1;
				for( var i = OutboundStartIndex; i <= OutboundEndIndex;i++)
				{
					outboundRadioBtn = document.getElementById("radioBtnLeave" + i);
					if((outboundRadioBtn != null)&&(outboundRadioBtn.checked)&&(outboundRadioBtn.value==selectedPricableUnitID))
					{
						selectedOutboundPriceIndex = outboundRadioBtn.value;
						selectedRadioOutboundBtnIndex = "radioBtnLeave" + i;
						break;
					}
				}
				
				var inboundRadioBtn;
				for( var i = InboundStartIndex; i <= InboundEndIndex ; i++)
				{
					inboundRadioBtn = document.getElementById("radioBtnReturn" + i);
					if((inboundRadioBtn != null)&&(inboundRadioBtn.checked)&&(inboundRadioBtn.value==selectedPricableUnitID))
					{
						selectedInboundPriceIndex = inboundRadioBtn.value;
						selectedInboundRadioBtnIndex = "radioBtnReturn" + i;
						break;
					}
				}

			    if(selectedOutboundPriceIndex == selectedInboundPriceIndex)
				{
			        if (document.getElementById("hdHotelRoom")!= null)
			        {var navigatePage = (document.getElementById("hdPageName")).value;
			var roomType0=-1;
			var roomType1=-1;
			
			var roomNo0=0;
			
			var roomNo1=-1;
			if(val != -1)roomNo1 = 0;
			        if(document.getElementById('hdroomType0').value==99 && document.getElementById('hdHotelIndexRtype0').value==hotelIndex)
				{
				roomType0 = document.getElementById('hdHotelIndexRtype0').value;
				roomNo0 = document.getElementById('hdNoroom0').value;
				direc = 1;
				}
				
				
				if(document.getElementById('hdroomType1').value==99 && document.getElementById('hdHotelIndexRtype1').value==hotelIndex)
				{
				roomType1 = document.getElementById('hdHotelIndexRtype1').value;
				roomNo1 = document.getElementById('hdNoroom1').value;
				direc = 1;  
				}
				//if(direc == 0){
				//alert('Please select a room');
				//return false;
				//}
				//else 
				//{
				
				document.getElementById('hdHotelRoom').value = hotelIndex+"_"+roomNo0+"_"+roomNo1;
			            if (selectOption != "0")
			            {
			                window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex+"&noHotel=1";
			                return;
			            }
			            else
			            {
			                window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex+"&hotelrooom="+document.getElementById('hdHotelRoom').value;
			                return;
			            }
				    }
				    else
				    {
				        
				        var navigatePage = (document.getElementById("hdPageName")).value;
				        
				        if (selectOption != "0")
			            {
				            window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex+"&noHotel=1";
				            return;
				        }
				        else
				        {
				            window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=" + inboundRadioBtn.title + "&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=" + selectedInboundRadioBtnIndex;
				            return;
				        }
				    }
				}
				else
				{
				    if((InboundStartIndex == -1)&&(InboundEndIndex == -1)&&(selectedOutboundPriceIndex != -3))
					{
					    var navigatePage = (document.getElementById("hdPageName")).value;
					    
					    if (selectOption != "0")
			            {
					        window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=-1&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=-1&noHotel=1";
					        return;
					    }
					    else
					    {
					        window.location = navigatePage + "?FlightResultId=" + selectedOutboundPriceIndex +"&OutboundIndex=" + outboundRadioBtn.title + "&InboundIndex=-1&outboundRadioBtn=" + selectedRadioOutboundBtnIndex + "&inboundRadioBtn=-1";
					        return;
					    }
					}
					else
					{
					    alert("Please Select the Correct Flight");
					}
				}

				break;
			}
		}
	}
	else
	{
		alert("Error in this page");
	}
}



function OnPageLoad()
{
	var OutboundIndex = document.getElementById("outboundSelected");
	var OutboundValues = null;
	if(OutboundIndex != null)
	{
		OutboundValues = OutboundIndex.value.split(',');
	}
	
	var InboundIndex = document.getElementById("inboundSelected");
	var InboundValue = "";
	if(InboundIndex != null)
	{
		InboundValue = InboundIndex.value;
	}
	
	if(OutboundValues != null)
	{
		var OutboundValue;
	
		for( var i = 0; i <= OutboundValues.length;i++)
		{
			OutboundValue = OutboundValues[i];
			if((OutboundValue != null)&&(document.getElementById(OutboundValue) != null))
			{
				document.getElementById(OutboundValue).checked = true;
			}
		}
	}
	
	if((InboundValue != "")&&(document.getElementById(InboundValue) != null))
	{
		document.getElementById(InboundValue).checked = true;
	}
}

function OpenFareRules(url)
{
window.open(url,"objWin","menubar=0,toolbar=0,resizable=1,width=950,height=500,scrollbars=1,left=100,top=100");
}


function ShowMoreFlightOptions(i,Options,direction,location)
{  
    //debugger;  
    var legInt;var optionInt;
    legInt = parseInt(location,10);
    legInt = legInt + 1;
    
    for( var j = legInt; j < Options;j++)
    {
        var index = j;
        if (legInt.toString().length == 1)
        {
            index = "0" + j;
        }
        var flight = document.getElementById("ucFlightOuterBox"+i+"_ctl"+index+"_tblFlightResults");
      
        if (flight != null)
        {
            //Effect.toggle((flight),'blind');
            (flight).style.display ='block';
        }
        else
        {
        flight = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+index+"_tblFlightResults");
        if (flight != null)
        {
            //Effect.toggle((flight),'blind');
            (flight).style.display ='block';
        }
        
        }
    }
    
    try{
    var link = document.getElementById("ucFlightOuterBox"+i+"_ctl"+location+"_trMoreFlightOptions");
    (link).style.display = 'none';
    }catch(e)
    {
    var link = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptions");
    (link).style.display = 'none';
    
    }
    try{
    var hideLink = document.getElementById("ucFlightOuterBox"+i+"_ctl"+location+"_trMoreFlightOptionsHide");
    (hideLink).style.display = 'inline';
    }catch(e)
    {
    var hideLink = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptionsHide");
    (hideLink).style.display = 'inline';
    
    }
      
}

function HideMoreFlightOptions(i,Options,direction,location)
{    
  // debugger;
    var legInt;var optionInt;
    legInt = parseInt(location,10);
    legInt = legInt + 1;
    
    for( var j = legInt; j < Options;j++)
    {
        var index = j;
        if (legInt.toString().length == 1)
        {
            index = "0" + j;
        }
        var flight = document.getElementById("ucFlightOuterBox"+i+"_ctl"+index+"_tblFlightResults");
      
        if (flight != null)
        {
            //Effect.toggle((flight),'blind');
            (flight).style.display ='none';
        }
        else
        {
        flight = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+index+"_tblFlightResults");
        if (flight != null)
        {
            //Effect.toggle((flight),'blind');
            (flight).style.display ='none';
        }
        
        }
    }
    
    try{
    var link = document.getElementById("ucFlightOuterBox"+i+"_ctl"+location+"_trMoreFlightOptions");
    (link).style.display = 'inline';
    }catch(e)
    {
    var link = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptions");
    (link).style.display = 'inline';
    
    }
    
    try{
    var hideLink = document.getElementById("ucFlightOuterBox"+i+"_ctl"+location+"_trMoreFlightOptionsHide");
    (hideLink).style.display = 'none';
    }catch(e)
    {
     var hideLink = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptionsHide");
    (hideLink).style.display = 'none';
    }
      
}

	function OpenFlightDetails(pintPriceIndex,pintFlightDirection,pintGDSIndex)
	{
		var lstrURL = "FlightDetails.aspx?FlightIndex=" + pintPriceIndex + "&FlightDerection=" +  pintFlightDirection + "&GDSIndex=" + pintGDSIndex ;
		window.open(lstrURL , 'FlightDetails', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=592,height=340,left = 240,top = 240');	
	}
		

	function Show(id,myEvent)
	{
		x = myEvent.clientX + document.documentElement.scrollLeft - 400; // get the mouse left position
		y = myEvent.clientY + document.documentElement.scrollTop - 50; // get the mouse top position 
		document.getElementById(id).style.display="block"; // display the pop-up
		document.getElementById(id).style.left = "100px"; // set the pop-up's left
		document.getElementById(id).style.top = y; // set the pop-up's top
	}
	// this function hides the pop-up when user moves the mouse out of the link
	function Hide(id)
	{	    
	  document.getElementById(id).style.display="none"; // hide the pop-up
	}
	
	function ShowForCalender(id,myEvent)
	{
		x = myEvent.clientX + document.documentElement.scrollLeft - 400; // get the mouse left position
		y = myEvent.clientY + document.documentElement.scrollTop - 50; // get the mouse top position 
		document.getElementById(id).style.display="block"; // display the pop-up
		document.getElementById(id).style.left = x + 50; // set the pop-up's left
		document.getElementById(id).style.top = y + 80; // set the pop-up's top
	}
	
	function ShowForCalenderNew(id,myEvent)
	{
		//x = myEvent.clientX + document.documentElement.scrollLeft - 400; // get the mouse left position
		//y = myEvent.clientY + document.documentElement.scrollTop - 50; // get the mouse top position 
		document.getElementById(id).style.display="block"; // display the pop-up
		//document.getElementById(id).style.left = x + 50; // set the pop-up's left
		//document.getElementById(id).style.top = y + 80; // set the pop-up's top
	}
	// this function hides the pop-up when user moves the mouse out of the link
	function Hide(id)
	{
	    document.getElementById(id).style.display = "none"; // hide the pop-up
	}


	//--------------Added by thilina
	
	function ShowMoreFlightOptionsPackage(i,Options,direction,location)
{  
    //debugger;  
    var legInt;var optionInt;
    legInt = parseInt(location,10);
    legInt = legInt + 1;
    
    for( var j = legInt; j < Options;j++)
    {
        var index = j;
        if (legInt.toString().length == 1)
        {
            index = "0" + j;
        }
        var flight = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+index+"_tblFlightResults");
      
        if (flight != null)
        {
            //Effect.toggle((flight),'blind');
            (flight).style.display ='block';
        }
    }
    
    var link = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptions");
    (link).style.display = 'none';
    
    var hideLink = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptionsHide");
    (hideLink).style.display = 'inline';
      
}

function HideMoreFlightOptionsPackage(i,Options,direction,location)
{    
  // debugger;
    var legInt;var optionInt;
    legInt = parseInt(location,10);
    legInt = legInt + 1;
    
    for( var j = legInt; j < Options;j++)
    {
        var index = j;
        if (legInt.toString().length == 1)
        {
            index = "0" + j;
        }
        var flight = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+index+"_tblFlightResults");
      
        if (flight != null)
        {
            //Effect.toggle((flight),'blind');
            (flight).style.display ='none';
        }
    }
    
    var link = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptions");
    (link).style.display = 'inline';
    
    var hideLink = document.getElementById("ucFlightOuterBox0#"+i+"_ctl"+location+"_trMoreFlightOptionsHide");
    (hideLink).style.display = 'none';
      
}
	
	
	//-----------

	 		
