function Options()
{
    this.init = function()
    {
        if (tree.isNodeSelected())
        {
            toggleOn('options');

            // bookmarks
            if (Bookmarks.bookmarkExists(tree.getActiveNodeId())) {
                $('bookmark-page').className = 'bookmarked';
            } else {
                $('bookmark-page').className = '';
            }

            // permanent link
            $('permanent-link').href = Action_permanentLink.replace('%s', tree.getActiveNodeId());

            // printable version
            $('printable-version').href = Action_printableVersion.replace('%s', tree.getActiveNodeId());
        }
        else
        {
            toggleOff('options');
        }
    }
}
var Options = new Options();
