document.observe('dom:loaded', init);

function init(event) {
    $('signupform').observe('submit', DoSignup);
}

function DoSignup(event) {
    var TheForm = event.element();
    var TheParameters = TheForm.serialize();
    
    //Stop the default submit on the form.
    //This prevents the page from re-loading.
    event.stop(); 
    
    //Setup the AJAX Call
    new Ajax.Updater('SignupPanel', '/aboutkidpace/DoSignup.php', 
    {   
        method: 'post', 
        parameters: TheParameters,
        onCreate: function(transport) {
            $('SignupLoader').show();
        }
    });
    
}