Thanks Arnel. This is a big help! But there should not be square parentheses around the True / False condition, after the function name. It should be like this:
now on your macro->New Action
choose RunCode
function name: fnShowHideNavigationPane(False/True)