/*
 * Filename:    ForSubmitter.js
 * Author:      Nikolaj Boel Jensen
 * Description: Functions to submit a form without the use of submit buttons
 */

// Submits a specific form
function SubmitForm(formId)
{
    // Get form from document
    var form = document.getElementById(formId);
    
    // HACK: Check if the function formCheck exist, if it does, call it before submitting.
    if(typeof(formCheck) == "function" && form.id == "WhereToForm")
    {
        if(formCheck())
            form.submit();
    }
    else
        form.submit();
}




