js document get element a code example
Example: javascript getelementbyid parametrized
function arata_formular(formular) {
var el = document.getElementById( formular );
el.style.visibility = "visible";
el.style.display = el.style.display === "none" ? "inline" : "visible";
}