Here is another suggested code and a link to follow too:
This code should be placed in the onload of the form.
HideButton = function()
{
var ULListItems = document.getElementById(“mnuBar1″).rows[0].cells[0].getElementsByTagName(“UL”)[0].getElementsByTagName(“LI”);
for(var i=0; i -1)
{
ULListItems[i].style.display = “none”;
}
}
}
// Execute the function when loading the form
HideButton();
// Execute the function when the form is resized.
window.onresize = HideButton;
You can also refer to this link as it might also be helpful for you:
social.microsoft.com/.../3b9722d1-866d-4fcc-beff-162e53a93ac4