/*  Random number generator. If max=3 then function returns 1,2 or 3
===================================================================*/
function getRandom(max) {return (Math.floor(Math.random()*max))+1;}



/*  Determine depth
===================================================================*/
     if (DepthOfPage == 0) { depth = ""; }
else if (DepthOfPage == 1) { depth = "../"; }
else if (DepthOfPage == 2) { depth = "../../"; }
else if (DepthOfPage == 3) { depth = "../../../"; }
else if (DepthOfPage == 4) { depth = "../../../../"; }
else if (DepthOfPage == 5) { depth = "../../../../../"; }
else if (DepthOfPage == 6) { depth = "../../../../../../"; }



/*  Bookmarker
===================================================================*/
if (navigator.appName == "Microsoft Internet Explorer") {
   bookmarkline = "<A CLASS=\"sidebarb\" HREF=\"javascript:window.external.AddFavorite(location.href,'PageTutor.com')\">Add this page to your Favorites</A>";
} else {
   bookmarkline = "<A CLASS=\"sidebarb\" HREF=\"javascript:alert('Press CTRL+D to bookmark this page.')\">Bookmark this page</A>";
}

