function commonSubmit(method, action, params, target, data) {

    f = document.createElement('form');
    f.method = method;
    f.action = action;

    for (key in params) {
        el = document.createElement('input');
        el.type = 'hidden';
        el.name = key;
        el.value = params[key];
        f.appendChild(el);
    }

    for (key in data) {
        el = document.createElement('input');
        el.type = 'hidden';
        el.name = key;
        //el.value = params[key];
        f.appendChild(el);
    }

    if (target != null) {
        f.target = target;
    }

    document.body.appendChild(f);
    f.submit();
}
