﻿//script to open modal window for view map
var daysCount=5;
var passengerCount = 2;
var drdDaysIndex ;
var drdPeopleIndex ;
  
$(document).ready(function() {
    $('.openAirportDiv').dialog({
        bgiframe: true,
        autoOpen: false,
        width: 565,
        height:325,
        modal: true,
        resizable: true,
        position: 'center',
        closeOnEscape: true
    });

    $('.viewAirportModal').click(function() {
    $('.openAirportDiv').dialog('open');
    });
    
    if ($(".modalWindow").length > 0) 
    {
          calculateIframeHeight();
    }
    else 
    {
          // loading iframe in modal window
          $('.iFrameModalQuickPrice').dialog({
              bgiframe: true,
              autoOpen: false,
              width: 700,
              height: 410,
              modal: true,
              resizable: false,
              position: 'center'

          });
          $('.openIFrame').unbind("click").bind("click", function(event) {
              event.preventDefault();
              var urlContent = $(this).attr('href');
              $('#iframeloadQuickPrice').attr('src', urlContent).attr('width', '100%').attr('height', '100%').attr('scrolling', 'no');
              $('.iFrameModalQuickPrice').dialog('open');
              //$('#iframeloadQuickPrice').attr('scrolling','yes');

          });

          function closeModalDialog() 
          {
              $('.iFrameModalQuickPrice').dialog('close');

          }
      }
      
      
});


function SetLabelValue(labelControl, SelectedValue, hdnVariable)
{
    document.getElementById(labelControl).innerHTML = SelectedValue;
    document.getElementById(hdnVariable).value = SelectedValue;
}