﻿
function CreateBookingForm(id, method, url) {
    var form = document.createElement("form");
    if (form) {
        form.id = id;
        form.name = id;
        form.method = method;
        form.action = url;
        document.documentElement.appendChild(form);
    }

    return form;
}

function CreateInputControl(id, type, value) {
    var ctl = document.createElement("input");
    if (ctl) {
        ctl.id = id;
        ctl.name = id;
        ctl.type = type;
        ctl.value = value;
    }

    return ctl;
}

function AddControlToForm(form, control) {
    if (form && control) { form.appendChild(control); }
}
