So let's assume you have a root folder that contains several sub folders in which web pages reside, and also a sub folder containing the images associated with the pages in the root folder, and this is where you NavBar graphics have been saved to. This would then be the location where your js file is saved.
To link to pages within the root, you would enter /pagename.htm The / will tell the browser to go to the root and find the page at this location. Linking to another sub folder would be achieved by entering /subfolder name/page name.htm
All your pages can also have the NavBar inserted. When inserting a NavBar, you are simply inserting a script element referencing the location of one or more js files. You would therefore simply amend the script element to reference the correct location of the js file relative to the location of the web page in which the menu is inserted resides.
As an example, if the js file is named graphic.js and is located in the /images folder and your web page is located in the /accounts folder, then your script element would read <script src="/images/graphic.js"></script>