function chooseModule(formname, hiddenname, coId, infoEltName, description, ContextMenuName)
{
    HiddenElt = eval("document." + formname + "." + hiddenname);
    HiddenElt.value = coId;

    InfoElt = document.getElementById(infoEltName);
    InfoElt.firstChild.nodeValue = decodeURI(description);

    hideContextMenu(document.getElementById(ContextMenuName));
}

function insertModuleOnTop(formname, hiddenname, coId)
{
    HiddenElt = eval("document." + formname + "." + hiddenname);
    HiddenElt.value = coId;

    BlockFormular = eval("document." + formname);

    var Input = document.createElement("input");
    Input.setAttribute("type", "hidden");
    Input.setAttribute("name", "position");
    Input.setAttribute("value", "-");
    BlockFormular.appendChild(Input);

    setCmdAndSubmit(formname,'insert_module','');
}


function dim(eltId, overlayMsg)
{
    $('#'+eltId).fadeTo('fast', 0.4);
}
