Main problem is your confusing everything with node numbers. Because you have dimmed 25 that gives items 0 to 25 (ie 26 items)
Your nodes.dba sets up nodes 1 to 25
Your two text files have names and filenames for 0 to 25 where 1 is supposed to the Elec one.
So if you click on node 1, mouse=1 when going to load page, then you reduce it by 1 to set current node which will now be 0, you then loop through contents of nodefiles from 1 to current node (0) so it never reads file$
So basically you need to rationalise your numbering system
Boo!