//---------------------------------------------------------------------------
// This script is based on the work of Dieter Bungers - http://www.infovation.de
// The original example for the "Cross Browser Expanding and Collapsing TOC"
// was published on http://www.siteexperts.com/tips/techniques/ts03/index.htm
//---------------------------------------------------------------------------

var tocTab = new Array();var ir=0;
tocTab[ir++] = new Array ("1", "Getting started", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("1.1", "Installation", "installation.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("1.2", "Quick start", "quickstart.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("1.3", "Troubleshooting", "troubleshooting.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("1.4", "System Requirements", "systemrequirements.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("2", "Overview", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("2.1", "Programs and programmers", "programs.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("2.2", "Program attitude", "attitude.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("2.3", "Program goals", "programgoals.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("2.4", "Capabilities and limitations", "capabilitiesandlimitations.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("3", "Program concepts", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("3.1", "Frames and movies", "frames.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("3.2", "Folders", "folders.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("3.3", "Navigation ", "navigation_1.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("3.4", "Editing", "editing.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("4", "Using StopMotion Station", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("4.1", "Setting up", "settingup.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("4.2", "The animation stand", "setups.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("4.3", "On the tabletop", "setups2.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("4.4", "Shooting with DV cameras", "dvcameras.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("4.5", "Advanced setups", "performmovies.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("4.6", "And everywhere", "world.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5", "Reference", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("5.1", "Modes", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("5.1.1", "Shoot mode", "shootmode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.1.2", "View mode", "viewmode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.1.3", "Play mode", "playmode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.1.4", "Compare mode", "fluttermode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.1.5", "Timelapse mode", "timelapsemode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2", "Setup dialog", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("5.2.1", "Overview", "setupoverview.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2.2", "Camera and path tab", "tabcameras.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2.3", "Capture options tab", "tabcapture.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2.4", "Size and Crop", "sizecrop.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2.5", "Other options tab", "tabother.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2.6", "Timelapse / TWAIN tab", "tabtwains.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.2.7", "Setup dialog menus", "mnumenus.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.3", "Keyboard map", "keyboardmap.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4", "Keyboard", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("5.4.1", "Enter key", "keyenter.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.2", "Spacebar", "keyspacebar.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.3", "Function key play (F7 - F8)", "keyfplay.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.4", "Up, Down Arrow keys", "keyarrowud.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.5", "B key", "keyb.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.6", "Escape (Esc) key", "keyescape.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.7", "Mode keys (F1 - F4)", "keyfmode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.8", "Tab key", "keytab.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.9", "Q (Quit) key", "keyq.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.10", "I (Information) key", "keyi.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.11", "H (Help) key", "keyh.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.12", "N (New folder) key", "keyn.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.13", "Ctrl, Alt, Shift (modifier) keys", "keyshift.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.14", "X, C, V (edit) keys", "keyedit.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.15", "Subtract key", "keysubtract.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.16", "Delete key", "keydelete.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.17", "Left, Right Arrow keys", "keyarrowlr.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.18", "Home, End keys", "keyhomeend.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.19", "Page Up, Down keys", "keypageud.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.20", "Jump (1-0) keys", "keyjump.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.21", "Add key", "keyadd.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.22", "Decimal key", "keydecimal.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.23", "D key", "keyd.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.24", "F12 key", "keyf12.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.4.25", "Compare Mode keys", "keycomparemode.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.5", "Mouse", "mouse.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.6", "Mode/Play dialog", "modeplaydialog.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.7", "When the program starts", "whentheprogramstarts.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.8", "Command line settings", "commandlineswitches.htm", "", "cicon9.gif", "cicon9.gif");
tocTab[ir++] = new Array ("5.9", "Appendix", "", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("5.9.1", "Software License", "softwarelicense.htm", "", "cicon9.gif", "cicon9.gif");
isContent = true,
isIndex = false,
showNumbers = false,
textSizes = new Array(1, 1, 0.7, 0.7),
tocBehaviour = new Array(1,1),
tocScroll=false,
tocLinks = new Array(1,0);
var isIE = navigator.appName.toLowerCase().indexOf("explorer") > -1;
var mdi = (isIE) ? textSizes[1]:textSizes[3];
var sml = (isIE) ? textSizes[2]:textSizes[4];
var oldCurrentNumber = "", oldLastVisitNumber = "";
var toDisplay = new Array();
for (ir=0; ir<tocTab.length; ir++) {
toDisplay[ir] = tocTab[ir][0].split(".").length==1;
}
function reDisplay(currentNumber,tocChange,noLink,e) {
if (isIndex && (toc.location.href.substring(toc.location.href.lastIndexOf("/")+1,toc.location.href.length) != "station1.3_kwindex.htm")) { isIndex=false; isContent=true; }
if (currentNumber == "navIndex") { isContent=false; }
if (currentNumber == "navContent") { isIndex=false; isContent=true; }
if (e) {
ctrlKeyDown = (isIE) ? e.ctrlKey : (e.modifiers==2);
if (tocChange && ctrlKeyDown) tocChange = 2;
}
var currentNumArray = currentNumber.split(".");
var currentLevel = currentNumArray.length-1;
var currentIndex = 2;
var scrollY=0, addScroll=tocScroll;
if (currentNumber == "") currentNumber = top.location.href.substring(top.location.href.lastIndexOf("?")+1,top.location.href.length);
for (i=0; i<tocTab.length; i++) {
if ((tocTab[i][0] == currentNumber) || (tocTab[i][2] == currentNumber && tocTab[i][2] != "")) {
currentIndex = i;
currentNumber = tocTab[i][0];
currentNumArray = currentNumber.split(".");
currentLevel = currentNumArray.length-1;
break;
}
}
if (currentIndex < tocTab.length-1) {
nextLevel = tocTab[currentIndex+1][0].split(".").length-1;
currentIsExpanded = nextLevel > currentLevel && toDisplay[currentIndex+1];
}
else currentIsExpanded = false;
theHref = (noLink) ? "" : tocTab[currentIndex][2];
theTarget = tocTab[currentIndex][3];
for (i=1; i<tocTab.length; i++) {
if (tocChange) {
thisNumber = tocTab[i][0];
thisNumArray = thisNumber.split(".");
thisLevel = thisNumArray.length-1;
isOnPath = true;
if (thisLevel > 0) {
for (j=0; j<thisLevel; j++) {
isOnPath = (j>currentLevel) ? false : isOnPath && (thisNumArray[j] == currentNumArray[j]);
}
}
toDisplay[i] = (tocChange == 1) ? isOnPath : (isOnPath || toDisplay[i]);
if (thisNumber.indexOf(currentNumber+".")==0 && thisLevel > currentLevel) {
if (currentIsExpanded) toDisplay[i] = false;
else toDisplay[i] = (thisLevel == currentLevel+1);
}
}
}
if (!isContent && !isIndex) {
toc.location.href = "station1.3_kwindex.htm";
isIndex = true;
}
if (isContent) {
toc.document.write("<html>\n\r<head></head>\n\r<style type=\"text/css\">\n\r       SPAN.heading1 { font-family: Helvetica,Arial; font-weight: normal; font-size: 11pt; color: #000000; text-decoration: none }\n\r       SPAN.heading2 { font-family: Helvetica,Arial; font-weight: normal; font-size: 10pt; color: #000000; text-decoration: none }\n\r       SPAN.heading3 { font-family: Helvetica,Arial; font-weight: normal; font-size: 9pt; color: #000000; text-decoration: none }\n\r       SPAN.heading4 { font-family: Helvetica,Arial; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading5 { font-family: Helvetica,Arial; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading6 { font-family: Helvetica,Arial; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r\n\r       SPAN.hilight1 { font-family: Helvetica,Arial; font-weight: normal; font-size: 11pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight2 { font-family: Helvetica,Arial; font-weight: normal; font-size: 10pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight3 { font-family: Helvetica,Arial; font-weight: normal; font-size: 9pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight4 { font-family: Helvetica,Arial; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight5 { font-family: Helvetica,Arial; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight6 { font-family: Helvetica,Arial; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r</style>\n\r<body bgcolor=\"#FFFFFF\">\n\r<p style=\"font-family:Helvetica,Arial; font-size:10pt; color:#000000\">\n\r<a href=\"http://www.stopmotion-software.com/\" target=\"_blank\"><b>StopMotion Station</b>\n\r </a>home page\n\r<br /><br />Stop Motion Station 1.3 Help</p>\n\r\n\r  <!-- Place holder for the TOC, do not delete the line below -->\n\r  ");}
for (i=0; i<tocTab.length; i++) {
if (toDisplay[i]) {
thisNumber = tocTab[i][0];
thisNumArray = thisNumber.split(".");
thisLevel = thisNumArray.length-1;
isCurrent = (i == currentIndex);
if (i < tocTab.length-1) {
nextLevel = tocTab[i+1][0].split(".").length-1;
img = (thisLevel >= nextLevel) ? tocTab[i][4] : ((toDisplay[i+1]) ? tocTab[i][5] : tocTab[i][4]);
}
else img = tocTab[i][4];
if (isContent) {
thisTextClass = ((thisNumber==currentNumber)?("hilight"):("heading"));
if (addScroll) scrollY+=((thisLevel<2)?mdi:sml)*25;
if (isCurrent) addScroll=false;
toc.document.write("<table border=0 cellspacing=0 cellpadding=2>");
toc.document.write("<tr><td width=" + ((thisLevel+1) * 20) + " align=right valign=top>");
toc.document.write("<a href=\"javaScript:history.go(0)\" onMouseDown=\"parent.reDisplay('" + thisNumber + "'," + tocBehaviour[0] + "," + tocLinks[0] + ",event)\">");
toc.document.write("<img src=\"" + img + "\" border=0></a>");
toc.document.write("</td><td align=left>");
toc.document.write("<a href=\"javaScript:history.go(0)\" onMouseDown=\"parent.reDisplay('" + thisNumber + "'," + tocBehaviour[1] + "," + tocLinks[1] + ",event)\">");
toc.document.write("<span class=\""  + thisTextClass + ((thisLevel>5) ? 6 : thisLevel+1) + "\">");
toc.document.write( ((showNumbers)?(thisNumber+" "):"") + tocTab[i][1]);
toc.document.write("</span></a>");
toc.document.writeln("</td></tr></table>");
} //isContent
}
}
if (!noLink) {
oldLastVisitNumber = oldCurrentNumber;
oldCurrentNumber = currentNumber;
}
if (isContent) {
toc.document.write("\n\r\n\r<br /><p style=\"font-family:Helvetica,Arial; font-size:10pt; color:#000000\">\n\r© 2001- 2005 Andrew Jaremko<br /><br />\n\r<a href=\"http://www.stopmotion-software.com/\" target=\"_blank\"><b>StopMotion Station</b>\n\r </a>home page</p>\n\r</body>\n\r</html>\n\r");
toc.document.close();
if (tocScroll) toc.scroll(0,scrollY);
}
if (theHref)
if (theTarget=="top") top.location.href = theHref;
else if (theTarget=="parent") parent.location.href = theHref;
else if (theTarget=="blank") open(theHref,"");
else content.location.href = theHref;
}
