// Copyright (c) 2002-2004 AquaMinds Software Corporation. All rights reserved. var sectionPageNumber = 1; var pageNumber = (location.search.indexOf("?") == 0) ? location.search.substring(1, location.search.length) : 0; var selectedEntryId = (location.hash.length > 1) ? location.hash.substring(1, location.hash.length) : -1; var notebookPageCount = 1; var notebookTitle = ""; var notebookTitleHeight = 55; var titleColor = ""; // Title frame background color var sectionName = ""; // Section name of current page var pageName = ""; // Name of current page var titleStyles = new Array(); // Array of style definitions for title frame var entryStyles = new Array(); // Array of style definitions for page frame var hasCoverPage = 0; var contentsValid = 0; var showControls = 1; var showCoverTitle = 1; var showCoverRevision = 0; var showCoverBadge = 0; var revision = ""; var isIE = (window.navigator.appName.toUpperCase().indexOf("EXPLORER") >= 0); var isNetscape = !isIE && (window.navigator.appName.toUpperCase().indexOf("NETSCAPE") >= 0) && ((window.navigator.vendor.toUpperCase().indexOf("NETSCAPE") >= 0) || (window.navigator.vendor.toUpperCase().indexOf("CAMINO") >= 0) || (window.navigator.vendor.toUpperCase().indexOf("FIREFOX") >= 0)); // Following functions emulate the new encodeURI(), for use in older browsers function utf8(wide) { var c, s; var enc = ""; var i = 0; while(i=0xDC00 && c<0xE000) continue; if (c>=0xD800 && c<0xDC00) { if (i>=wide.length) continue; s= wide.charCodeAt(i++); if (s<0xDC00 || c>=0xDE00) continue; c= ((c-0xD800)<<10)+(s-0xDC00)+0x10000; } // output value if (c<0x80) enc += String.fromCharCode(c); else if (c<0x800) enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F)); else if (c<0x10000) enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F)); else enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F)); } return enc; } var hexchars = "0123456789ABCDEF"; function toHex(n) { return hexchars.charAt(n>>4)+hexchars.charAt(n & 0xF); } var okURIchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~*'();/?:@&=+$,%"; function encodeURINew(s) { var s = utf8(s); var c; var enc = ""; for (var i= 0; i notebookPageCount) { pageNum = notebookPageCount; } // remember the previous page parent.document.cookie = "previousPageNumber=" + parent.pageNumber; // Set vars to new page and selected entry id doPageReload = (parent.pageNumber == pageNum) && (parent.selectedEntryId != entryId) && (entryId > 0); parent.pageNumber = pageNum; parent.selectedEntryId = entryId; // Change the window location to the new page i = location.href.indexOf("?"); if (!isNetscape) { location.href = ntEncodeURI((i >= 0) ? location.href.substring(0, i) : location.href) + "?" + pageNum + ((entryId < 0) ? "" : ("#" + entryId)); } else { location.href = ((i >= 0) ? location.href.substring(0, i) : location.href) + "?" + pageNum + ((entryId < 0) ? "" : ("#" + entryId)); } if (doPageReload) // Force page to refresh so that selection rectangle changes frames[0].location.reload(); } function prevPage() { gotoPage((pageNumber == (hasCoverPage ? 0 : 1)) ? notebookPageCount : (pageNumber - 1), -1); } function nextPage() { gotoPage((pageNumber == notebookPageCount) ? 1 : (pageNumber + 1), -1); } function go(pn, en) { parent.gotoPage(pn, en); } function writePage(doc) { // Make sure the new page number is within bounds if (pageNumber < 0) { pageNumber = hasCoverPage ? 0 : 1; } else if ((pageNumber == 0) && !hasCoverPage) { pageNumber = 1; } else if (pageNumber > notebookPageCount) { pageNumber = notebookPageCount; } doc.write(""); doc.write(''); doc.write(''); doc.write(""); var NS4 = (window.navigator.appName.toUpperCase().indexOf("NETSCAPE") >= 0) && (parseInt(window.navigator.appVersion) < 5); var titleHeight = notebookTitleHeight + (NS4 ? 5 : 0); doc.write(" 0) ? titleHeight : 2) + ", *\" BORDER=\"0\">"); doc.write(""); doc.write("\n"); } // Global function which generates the BODY HTML for the title frame function writeTitle(doc) { doc.write(""); doc.write(''); for (var i = 0; i < titleStyles.length; i++) doc.write(titleStyles[i]); doc.write(""); if (hasCoverPage) { doc.write(""); } else { doc.write(""); } doc.write(""); doc.write(""); doc.write(""); doc.write("
"); if (pageNumber > 0) { doc.write("Page " + pageNumber + " of " + notebookPageCount + " "); } doc.write(""); if (pageNumber > 0) { doc.write("
  "); } else { doc.write("
  "); } doc.write(sectionName); doc.write("
       "); doc.write(pageName); doc.write("\n
"); doc.write("\n"); doc.write(""); doc.write(""); doc.write(""); doc.write("\n\n"); } // First set all the tabs to their lowered image. Then, if the current page has a tab, set its // image to the raised image. If the current page has no tab image, use the current section's tab. function updateTabs(document) { var i; var n = document.images.length; for (i = 2; i < n; i++) { document.images[i].src = document.images[i].name + "/tabL.png"; document.images[i].border=0; } if (document.images["notebook_pages/" + pageNumber]) { document.images["notebook_pages/" + pageNumber].src = "notebook_pages/" + pageNumber + "/tabH.png"; } else if (document.images["notebook_pages/" + sectionPageNumber]) { document.images["notebook_pages/" + sectionPageNumber].src = "notebook_pages/" + sectionPageNumber + "/tabH.png"; } }