function postMailSupport(url, type, usertype, userid, companyname, username, mailaddress, phoneno, productcode) {
    var newFormName = "Form2";
    var elm = document.createElement("FORM");
    elm.setAttribute("name", newFormName);
    elm.setAttribute("id", newFormName);
    elm.setAttribute("method", "post");
    elm.setAttribute("action", url);
    elm.setAttribute("target", "_blank");

    document.body.appendChild(elm);
    document.getElementById(newFormName).appendChild(createInputElement('supporttype', type));
    document.getElementById(newFormName).appendChild(createInputElement('usertype', usertype));
    document.getElementById(newFormName).appendChild(createInputElement('userid', userid));
    document.getElementById(newFormName).appendChild(createInputElement('companyname', companyname));
    document.getElementById(newFormName).appendChild(createInputElement('username', username));
    document.getElementById(newFormName).appendChild(createInputElement('mailaddress', mailaddress));
    document.getElementById(newFormName).appendChild(createInputElement('phoneno', phoneno));
    document.getElementById(newFormName).appendChild(createInputElement('productcode', productcode));
    document.getElementById(newFormName).submit();
}

function createInputElement(name, value) {
    var elm;
    elm = document.createElement("INPUT");
    elm.setAttribute("type", "hidden");
    elm.setAttribute("name", name);
    elm.setAttribute("value", value);
    return elm;
}

function jumpMailSupport(type) {
    var newFormName = "Form2";
    var elm = document.createElement("FORM");
    elm.setAttribute("name", newFormName);
    elm.setAttribute("id", newFormName);
    elm.setAttribute("method", "post");
    elm.setAttribute("action", document.getElementById('HomeForm').url.value);
    elm.setAttribute("target", "_blank");

    location.reload();
    /*location.replace(location);*/

    document.body.appendChild(elm);
    document.getElementById(newFormName).appendChild(createInputElement('supporttype', type));
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').usertype);
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').userid);
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').companyname);
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').username);
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').mailaddress);
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').phoneno);
    document.getElementById(newFormName).appendChild(document.getElementById('HomeForm').productcode);
    document.getElementById(newFormName).submit();
}

