
function sendMessage() { 
    Form.disable('contact');
    original = $('submit').value
    $('submit').value = "Sending...";
    Element.show('progress');     
    new Ajax.Updater(
        'messages', 
        '/index.php',
        {
            method: 'post', 
            parameters: Form.serialize('contact'), 
            onComplete: function(){ 
                Form.enable('contact');
                Element.hide('progress');
                $('submit').value = original;
                },
            onFailure: reportError,
            asynchronous: true, 
            evalScripts: true
        }
        );    
        
}
function reportError(request) {
    alert('Sorry. There was an error.');
}

