//---------------------------------------------------------------------------
// 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", "Able Staff Scheduler", "ablestaffscheduler5docs.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("2", "Introduction", "introduction.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("2.1", "What's New", "what'snew.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.2", "Overview", "overview.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.3", "Starting Menu", "starting_menu.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.4", "Easy Setup Wizard", "easy_setup_wizard.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.5", "Bookings and Shifts", "shifts.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.6", "Staff and Personnel", "staff.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.7", "Schedule Actions", "toolsforscheduling.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.7.1", "Action Copy Move Save Delete", "actionmovecopysavedelete.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("2.7.2", "Save Patterns", "savepatterns.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("3", "Setup Able Scheduler", "able_setup.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("3.1", "General Setup", "generalsetup.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("3.2", "Dates - Seed and Report", "dates_seedandreport.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("3.3", "Data and Payroll", "dataandpayroll.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("3.4", "Email Setup and Test", "emailsetupandtest.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("3.5", "Copy Web Pages", "copywebpages.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("3.6", "Unit Forecast", "unitforecast.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4", "Using Scheduler", "usingscheduler.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("4.1", "Key Concepts", "keyconcepts.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("4.1.1", "Rubber Band", "rubberbandeffect.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.1.2", "Email Setup", "emailsetup.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.1.3", "Booking a Shift", "bookingashift.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.1.4", "Seed Dates", "seed_dates.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.1.5", "User Setup", "user_setup.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.1.6", "Net Pages", "net_pages.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.2", "Tips on Using", "abletips.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.3", "Popup Menus", "popupmenus.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.4", "Schedules", "schedules.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.5", "Bulk - Move and Copy", "bulk_change.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.6", "Bulk - Save and Delete", "bulkdelete.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.7", "Edit Booked Shifts", "edit_shifts.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.8", "Rotation Schedule", "rotation_schedule_1.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.9", "Move or Copy Bookings", "moving_or_copying_shifts.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.10", "Payroll Schedule", "payroll_schedule.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.11", "Reports Menu", "reports_menu.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.12", "Main Schedule Report", "mainschedulereport.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.13", "User Schedule Report", "userschedulereport.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.14", "Report Dialog", "reportdialog.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.15", "Backup and Restore Data", "backupandrestoredata.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16", "Browse Tables", "browsetables.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("4.16.1", "Work Areas", "workareas.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.2", "Patterns of Shifts", "patterns.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.3", "Job Types or Kinds", "job_types.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.4", "Crews, Groups or Teams", "groupsorteams.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.5", "Holidays", "holidays.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.6", "Special Days", "special_days.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.7", "Vacations or Away Days", "vacationsorawaydays.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.8", "Unavailable Days and Times", "unavailabledaysandtimes.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.9", "Needed Shifts", "neededshifts.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.10", "Schedule Rules", "rules.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.16.11", "Check Schedule", "checkschedule.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.17", "Access and Control", "accessandcontrol.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("4.17.1", "Login and Passwords", "login_and_passwords.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.17.2", "Security Error Messages", "security_error_messages.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.17.3", "Operators", "operators.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.17.4", "User Groups", "user_groups.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("4.17.5", "Screen Security", "screen_security.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("5", "Orders and Updates", "ordersandupdates.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("5.1", "How to Order", "howtobuy.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("5.2", "Trial Version", "trial_version.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("5.3", "Update Policy", "update.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("5.4", "Trust in Source", "codesigning.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("6", "Legal Information", "legalinformation.htm", "", "cicon1.gif", "cicon2.gif");
tocTab[ir++] = new Array ("6.1", "Uninstall", "remove_able_staff_scheduler.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("6.2", "License Agreement", "licenseagreement.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("6.3", "Copyright Information", "copyrightinformation.htm", "", "cicon11.gif", "cicon11.gif");
tocTab[ir++] = new Array ("6.4", "System Requirements", "systemrequirements.htm", "", "cicon11.gif", "cicon11.gif");
isContent = true,
isIndex = false,
showNumbers = true,
textSizes = new Array(1, 1, 0.7, 0.7),
tocBehaviour = new Array(1,1),
tocScroll=true,
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) != "able500_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 = 0;
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 = "able500_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: Arial,Helvetica; font-weight: normal; font-size: 10pt; color: #000000; text-decoration: none }\n\r       SPAN.heading2 { font-family: Arial,Helvetica; font-weight: normal; font-size: 9pt; color: #000000; text-decoration: none }\n\r       SPAN.heading3 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading4 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading5 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r       SPAN.heading6 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #000000; text-decoration: none }\n\r\n\r       SPAN.hilight1 { font-family: Arial,Helvetica; font-weight: normal; font-size: 10pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight2 { font-family: Arial,Helvetica; font-weight: normal; font-size: 9pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight3 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight4 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight5 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r       SPAN.hilight6 { font-family: Arial,Helvetica; font-weight: normal; font-size: 8pt; color: #FFFFFF; background: #002682; text-decoration: none }\n\r</style>\n\r<body bgcolor=\"#FFFFFF\">\n\r<font face=\"Arial,Helvetica\" size=\"4\"><b>Able Staff Scheduler</b></font><br>\n\r<font face=\"Arial,Helvetica\" size=\"2\">\n\r<a href=\"javaScript:parent.reDisplay(\'navIndex\',0,0);\">Keyword Index</a>\n\r</font><br><br><br>\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<hr /><font face=\"Arial,Helvetica\" size=\"2\">\n\r<p>&copy; George Riddell 2010</p>\n\r<p>Able Staff Scheduler</p>\n\r\n\r</font>\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;
}

