Hi, well as far as i know and have studied, to find the shortest or optimal path you need to use an A(star) algorithm which is basically a Artificial Intelligence technique to search between nodes. you can google out A (star) algorithm, there is a lot of stuff on it.
Hello i can take a look at it and provide solution for free but i would need to see the site files. Contact me at
marvidude [at] hotmail .com