//
// Title:        XAJAX PAF javascripts
// Description:  Utility functions to allow XAJAX to communicate.
// Copyright:    Copyright (c) Vision with Technology Ltd 1997-2006. All rights reserved
// Company:      Vision with Technology Ltd
// Author:       Paul Forsyth
// Version:      $Id: xajax_paf_address_selection.js 859 2006-08-21 17:03:06Z paulf $
// Licence:
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//

function addOption(selectId, txt, val)
{
    var objOption = new Option(txt, val);
    document.getElementById(selectId).options.add(objOption);
}

function getFullAddress()
{
    var selection = document.getElementById('paf_address_selection');
    var selectedIndex = selection.selectedIndex;
    var selectedText = selection.options[selectedIndex].value;

    return xajax_pafLookupFullAddress( selectedText );
}
