var saveLink;
var fallback;

function LoadHiddenForm()
{
    var saveDestination = document.createElement("input");
    saveDestination.type = "hidden";
    saveDestination.name = "saveDestination";
    saveDestination.id = "saveDestination";
    if ( !saveLink || saveLink.length == 0 )
        saveLink = '/save.php';
    saveDestination.value = saveLink;
    document.getElementById('sub').appendChild(saveDestination);
    var returnPath = document.createElement("input");
    returnPath.type = "hidden";
    returnPath.name = "returnPath";
    returnPath.id = "returnPath";
    returnPath.value = fallback;
    document.getElementById('sub').appendChild(returnPath);
}
function _VerifyForm(form_handle)
{
    if (document.sub.saveDestination.value != '/save.php') {
        alert('ST: Invalid Location::'+document.sub.saveDestination.value);
        return false;
    }
    form_handle.action = document.sub.saveDestination.value;
    var returnPath = document.createElement("input");
    returnPath.type = "hidden";
    returnPath.name = "returnPath"
    returnPath.value = document.sub.returnPath.value;
    form_handle.appendChild(returnPath);
    return true;
}
