se non ho capito male, document.getElementById(str).style.display = "block";