function chooseCarCountry( currObj )
{    
  var selectPickup  = document.getElementById('PickupCity');
  var selectDropoff = document.getElementById('DropoffCity');
  
  selectPickup.length  = 0;
  selectDropoff.length = 0;

  for( j=1 ; j<=2 ; j++)
  {
    for( i=0 ; i<locations.length-1 ; i++)
    {
      var item = locations[i].split("|");
    
      if (item[2] == currObj.value)
      {
        var newOption = document.createElement('option');
        newOption.text  = item[1];
        newOption.value = item[0];
  
        try 
        {
          if (j==1)
            selectPickup.add(newOption, null);
          else
            selectDropoff.add(newOption, null);
        }
        catch(ex) 
        {
          if (j==1)
            selectPickup.add(newOption);
          else
            selectDropoff.add(newOption);
        }      
      }
    }
  }
}

