// ============================================================================
// brdcast.submitURL
// ============================================================================
brdcast.submitURL = function()
{
    // init vars
    var button = document.getElementById('submitButton');
    var ref    = this;
    
    // set the onclick
    button.onclick = function() {ref.ajaxSubmit(); return false};
}

// submit to ajax
brdcast.submitURL.prototype.ajaxSubmit = function()
{
    // init vars
    var ajax  = new buffalo.utils.ajax('submit.php');
    var url   = document.getElementById('submitURL');
    
    // make sure data exists
    if (!url.value) return;
    
    // send the data via ajax
    ajax.setData('url='+url.value);
    
    // fade out the box after the ajax send
    sHoney.changeFade({initial:100, alter:-10, max:0, after: "document.getElementById('submitWrapper').innerHTML = 'Thanks for the URL.'; sHoney.changeFade({initial:0, alter:10, max:100});"});    
}
