home *** CD-ROM | disk | FTP | other *** search
- //Save off the initial hRef before we redirect to the anchor.
- var strOriginalURL = location.href;
- //function onLoad()
- {
- //Find the anchor in the URL and redirect to it. This does not cause the page
- //to load again, just scrolls the page until the anchor is visible.
- var temp = location.href;
- var index = temp.indexOf("#");
- if (index != -1)
- {
- temp = temp.substring(index + 1, temp.length);
-
- index = temp.indexOf("#");
- if (index != -1)
- {
- temp = temp.substring(0, index);
- location.href = "#" + temp;
- }
- }
- }
-
- function BackToAlert()
- {
- //history.go(-1);
- var temp = strOriginalURL;
- var index = temp.indexOf("#");
- if (index != -1)
- {
- temp = temp.substring(index + 1, temp.length);
-
- index = temp.indexOf("#");
- if (index != -1)
- {
- temp = temp.substring(index + 1, temp.length);
- location.href = temp;
- }
- }
- }
-