diff --git a/mail/base/content/utilityOverlay.js b/mail/base/content/utilityOverlay.js index 6f726876a53d..30f615e59e72 100644 --- a/mail/base/content/utilityOverlay.js +++ b/mail/base/content/utilityOverlay.js @@ -188,3 +188,18 @@ function validateFileName(aFileName) return aFileName.replace(re, "_"); } + +function goToggleToolbar( id, elementID ) +{ + var toolbar = document.getElementById( id ); + var element = document.getElementById( elementID ); + if ( toolbar ) + { + var isHidden = toolbar.getAttribute("hidden") == "true"; + toolbar.setAttribute("hidden", !isHidden); + if ( element ) + element.setAttribute("checked", isHidden) + document.persist(id, 'hidden'); + document.persist(elementID, 'checked'); + } +}