function hideNimbleWidget() { var els = document.body.getElementsByTagName("DIV"); var pattern = new RegExp("(^|\\s)nimbleBuyWidget([0-9]*)(\\s|$)"); for (var i = 0; i < els.length; i++) { if (pattern.test(els[i].id)) { els[i].style.display = "none"; } } } hideNimbleWidget();