home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------------------
-
- // global variables.
- var gCurrPage;
- var gFirstPage;
- var gLastPage;
- var gsFName;
- var gsExtName;
-
- var gUSECACHE=true;
-
- //-------------------------------------------------------------------------------
-
- function OpenIndex()
- {
- // Swap Index.htm with IndexWithCache to enable/disable cache!!
-
- if (gUSECACHE)
- parent.contents.location = "IndexWithCache.htm";
- else
- parent.contents.location = "Index.htm";
- }
-
- //-------------------------------------------------------------------------------
-
- function OpenContents()
- {
- parent.contents.location = "Contents.htm";
- }
-
- //-------------------------------------------------------------------------------
- function OpenSearch()
- {
- parent.contents.location = "Search.htm";
- }
-
- //-------------------------------------------------------------------------------
- function OpenHome()
- {
- //parent.main.location = "Home.htm";
- parent.main.location = "ContactDeneba.htm"
- }
-
- //-------------------------------------------------------------------------------
-
- function updateBar(pageNum)
- {
- var prevIcon = 0;
- var nextIcon = 0;
-
- if(gFirstPage != gLastPage)
- {
- if(pageNum == gFirstPage)
- nextIcon = 1;
- else if(pageNum == gLastPage)
- prevIcon = 1;
- else if(pageNum > gFirstPage || pageNum < gLastPage)
- {
- prevIcon = 1;
- nextIcon = 1;
- }
- }
-
- // PLTODO: fix
- //document.next.src = gNextImg[nextIcon].src;
- //document.prev.src = gPrevImg[prevIcon].src;
- }
-
-
- //-------------------------------------------------------------------------------
-
- function goFirstPage()
- {
- openPageAbs(gFirstPage);
- }
-
- //-------------------------------------------------------------------------------
-
- function goLastPage()
- {
- openPageAbs(gLastPage);
- }
-
- //-------------------------------------------------------------------------------
-
- function goPrevPage()
- {
- var pageNum = gCurrPage - 1;
-
- if(pageNum < gFirstPage)
- return;
-
- openPageAbs(pageNum);
- }
-
- //-------------------------------------------------------------------------------
-
- function goNextPage()
- {
- var pageNum = gCurrPage + 1;
-
- if(pageNum > gLastPage)
- return;
-
- openPageAbs(pageNum);
- }
-
- //-------------------------------------------------------------------------------
- // opens page if you are currenlty viewing a page in same directory...
- // PLNOTE: only used in links within actuall content pages to link
- // to other pages...
- function openPage(pageNum)
- {
- if(pageNum >= gFirstPage && pageNum <= gLastPage)
- {
- parent.main.location = gsRelFName + "_" + pageNum + gsExtName;
- updateContents(pageNum);
- updateBar(pageNum);
- gCurrPage = pageNum;
- }
- }
-
-
- //-------------------------------------------------------------------------------
- function openPageAbs(pageNum) // uses an absolute path from engine dir to navigate to page...
- {
- if(pageNum >= gFirstPage && pageNum <= gLastPage)
- {
- parent.main.location = gsFName + "_" + pageNum + gsExtName;
- updateContents(pageNum);
- updateBar(pageNum);
- gCurrPage = pageNum;
- }
- }
-
- //-------------------------------------------------------------------------------
- function openPageAbsNoUpdateContents(pageNum) // uses an absolute path from engine dir to navigate to page...
- {
- if(pageNum >= gFirstPage && pageNum <= gLastPage)
- {
- parent.main.location = gsFName + "_" + pageNum + gsExtName;
- updateBar(pageNum);
- gCurrPage = pageNum;
- }
- }
-
-
-
- //-------------------------------------------------------------------------------
-
- function updateContents(pageNum)
- {
- if(parent.contents.gsName == "bookmark")
- parent.contents.updateTree(pageNum);
- }
-
-