function requestTellAFriend ()
{
    var query = 'action=TellAFriend'+ ajaxObj.getForm('tell_a_friend_form');
    document.getElementsByClassName('message', 'tell')[0].innerHTML = 
        '<img src="./style/DSala/images/progress.gif';
    ajaxObj.call(query, handleTellAFriend);
}

function handleTellAFriend (response)
{
    var message = '';
    if (! response) { alert('ajax error'); return; }
    if (response.isError) {
        message += '<span style="color: #C30; background-color: #FF9;">';
        for (var i=0; i<response.data.length; i++) {
            message += response.data[i] + '<br>';
        }
        message += '</span>';
    } else {
        message = '<span style="color: #390; background-color: #CFC;">Your message '+
            'has been sent.<\/span><br><a href="#" '+
            'onclick="resetTellAFriend(); return false;">Click to send another.<\/a>';
        $('tell').getElementsByTagName('table')[0].style.display = 'none';
    }
    document.getElementsByClassName('message', 'tell')[0].innerHTML = message;
}

function resetTellAFriend ()
{
    windowClose('tell', 450);
    windowAppear('tell', 450);
}
