function OpenDomesticCalc()
{
   gLastOpenWasDomestic = true;
   var w = window.open('FlightCalc.aspx', null, "height=350,width=600,status=no,toolbar=no,dependent=yes,menubar=no,location=no,resizable=yes");  
   w.focus();
}

function OpenInternationalCalc()
{
   gLastOpenWasDomestic = false;
   var w = window.open('FlightCalc.aspx', null, "height=350,width=600,status=no,toolbar=no,dependent=yes,menubar=no,location=no,resizable=yes");  
   w.focus();
}

function WantedDomestic()
{
   return gLastOpenWasDomestic;
}

function AddDist(to, value)
{
   var input; 
   if (to == 'Domestic')   
      input = $find($DAirInput$);
   else
      input = $find($IAirInput$);

   input.addToValue(value);   
}

function OpenCoachCalc()
{
   OpenDistCalc($CoachInput$);
}

function OpenDistCalc(inputId)
{
   gLastDistCalcInput = $find(inputId);
   var w = window.open('CoachCalc.aspx', null, "height=330,width=457,status=no,toolbar=no,dependent=yes,menubar=no,location=no,resizable=no");  
   w.focus();
}

function AddCoachTrip(value)
{
   gLastDistCalcInput.addToValue(value);   
}
