Javascript Print Tab

I created the tabs using the docs in the KB - How do I assign the Print function directly to the tab instead of having to click PRINT then click the PRINT button?