First, if the navigation script uses arrays then there are no anchor links or “a href” to identify a link. Search engines do not take the time to scan a page for links created by client-side scripting languages.
Second, if the navigation script is a separate file such as menu.js then the search engines ignore those files. Therefore any links in the separate file are totally ignored by the search engines. To prove this point let me point you to this search on Google http://www.google.com/search?hl=en&lr=&q=inurl%3A%22menu.js%22&btnG=Search.
You’ll notice that search specifically requests files with menu.js in the URL to the file.
You can even check this one http://www.google.com/search?hl=en&lr=&q=inurl%3A%22nav.js%22&btnG=Search which request files called nav.js.
There are two solutions to the problem.
The first solution is my chosen method.