// Original script: Copyright (c) 1996-1997 Tomer Shiran. All rights reserved.
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
// Improvements: Copyright (c) 2008 Ralph Sickinger, WILLCOR, Inc.

var caution = false
var nodecnt = 0
function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "")
  if (!caution || (name + "=" + escape(value)).length <= 4000)
    document.cookie = curCookie
  else
    if (confirm("Cookie exceeds 4KB and will be cut!"))
      document.cookie = curCookie
}
function getCookie(name) {
  var prefix = name + "="
  var cookieStartIndex = document.cookie.indexOf(prefix)
  if (cookieStartIndex == -1)
    return null
  var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
  if (cookieEndIndex == -1)
    cookieEndIndex = document.cookie.length
  return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT"
  }
}
function fixDate(date) {
  var base = new Date(0)
  var skew = base.getTime()
  if (skew > 0)
    date.setTime(date.getTime() - skew)
}
function item(parent, caption, file, id, depth) {
  if (parent) { nodecnt++ }

  this.parent = parent
  this.text = caption
  this.id = id
  this.file = file
  this.depth = depth
}
function makeArray(length) {
  this.length = length
}
function makeDatabase() {
  var ix = 0
  outline = new makeArray(99)

//        outline[0] = new item(false, "<i>Summary</i>","summary","",0)

        outline[ix] = new item(false, "Preface","index","",0)
        ix++
        outline[ix] = new item(false, "Introduction","2","",0)
        ix++
        outline[ix] = new item(false, "Acknowledgements","3","",0)
        ix++
        outline[ix] = new item(true, "1.0  Program Management","4","1",0)
        ix++
        outline[ix] = new item(false, "1.1  COTS/NDI, Modified COTS/NDI, and Custom Power Supplies","41","",1)
        ix++
        outline[ix] = new item(true, "1.2  Power System Development","42","2",1)
        ix++
        outline[ix] = new item(false, "1.2.1  Top-Level System Requirements and Specification Development","421","",2)
        ix++
        outline[ix] = new item(false, "1.2.2  Trade Studies","422","",2)
        ix++
        outline[ix] = new item(false, "1.2.3  Modeling and Simulation","423","",2)
        ix++
        outline[ix] = new item(false, "1.2.4  Design Reviews","424","",2)
        ix++
        outline[ix] = new item(false, "1.2.5  Power System Integration and Test","425","",2)
        ix++
        outline[ix] = new item(false, "1.2.6  System Design and Impact of Power System Components","426","",2)
        ix++
        outline[ix] = new item(false, "1.3  Power Supply Performance Specification","43","",1)
        ix++
        outline[ix] = new item(false, "1.4  Market Research","44","",1)
        ix++
        outline[ix] = new item(false, "1.5  Power Supply Trade-Offs / Selection","45","",1)
        ix++
        outline[ix] = new item(false, "1.6  Teaming","46","",1)
        ix++
        outline[ix] = new item(false, "1.7  Risk Management","47","",1)
        ix++
        outline[ix] = new item(false, "1.8  Watch Out For's","48","",1)
        ix++
        outline[ix] = new item(true, "2.0  Power System Considerations","5","3",0)
        ix++
        outline[ix] = new item(false, "2.1  Power System Architecture","51","",1)
        ix++
        outline[ix] = new item(false, "2.2  Prime Power Source","52","",1)
        ix++
        outline[ix] = new item(false, "2.3  Electromagnetic Compatibility","53","",1)
        ix++
        outline[ix] = new item(false, "2.4  Monitoring and Control","54","",1)
        ix++
        outline[ix] = new item(false, "2.5  Environmental Issues","55","",1)
        ix++
        outline[ix] = new item(false, "2.6  Specifying Load Power","56","",1)
        ix++
        outline[ix] = new item(false, "2.7  Protection","57","",1)
        ix++
        outline[ix] = new item(false, "2.8  Testing","58","",1)
        ix++
        outline[ix] = new item(true, "3.0  Low Voltage Power Supplies","6","4",0)
        ix++
        outline[ix] = new item(true, "3.1  Design Guidelines","61","5",1)
        ix++
        outline[ix] = new item(false, "3.1.1  Circuit Design Topology","611","",2)
        ix++
        outline[ix] = new item(false, "3.1.2  Component Selection","612","",2)
        ix++
        outline[ix] = new item(false, "3.1.3  Reliability","613","",2)
        ix++
        outline[ix] = new item(true, "3.2  Design Analyses/Verification","62","6",1)
        ix++
        outline[ix] = new item(false, "3.2.1  Analyses","621","",2)
        ix++
        outline[ix] = new item(false, "3.2.2  Prototype Evaluation","622","",2)
        ix++
        outline[ix] = new item(false, "3.2.3  Design Reviews","623","",2)
        ix++
        outline[ix] = new item(false, "3.2.4  Design Qualification Testing","624","",2)
        ix++
        outline[ix] = new item(true, "3.3  Manufacturing Considerations","63","7",1)
        ix++
        outline[ix] = new item(false, "3.3.1  Manufacturing Process Considerations","631","",2)
        ix++
        outline[ix] = new item(false, "3.3.2  Environmental Stress Screening","632","",2)
        ix++
        outline[ix] = new item(false, "3.3.3  Acceptance Testing","633","",2)
        ix++
        outline[ix] = new item(false, "3.4  Standard Practices","64","",1)
        ix++
        outline[ix] = new item(true, "4.0  High Voltage Power Supplies","7","8",0)
        ix++
        outline[ix] = new item(true, "4.1  Design Guidelines","71","9",1)
        ix++
        outline[ix] = new item(false, "4.1.1  Corona","711","",2)
        ix++
        outline[ix] = new item(false, "4.1.2  Component Considerations","712","",2)
        ix++
        outline[ix] = new item(false, "4.1.3  Other Design Considerations","713","",2)
        ix++
        outline[ix] = new item(true, "4.2  Design Analyses / Verification","72","@",1)
        ix++
        outline[ix] = new item(false, "4.2.1  Reference Performance Data","721","",2)
        ix++
        outline[ix] = new item(false, "4.2.2  Components","722","",2)
        ix++
        outline[ix] = new item(false, "4.2.3  High Voltage Power Supply Tests","723","",2)
        ix++
        outline[ix] = new item(false, "4.2.4  Design Review Checklist","724","",2)
        ix++
        outline[ix] = new item(true, "4.3  Manufacturing Considerations","73","A",1)
        ix++
        outline[ix] = new item(false, "4.3.1  Dedicated Facilities","731","",2)
        ix++
        outline[ix] = new item(false, "4.3.2  Receiving Test and Inspection","732","",2)
        ix++
        outline[ix] = new item(false, "4.3.3  Detailed Procedures","733","",2)
        ix++
        outline[ix] = new item(false, "4.3.4  Environmental Stress Screening","734","",2)
        ix++
        outline[ix] = new item(false, "4.3.5  Personnel Training","735","",2)
        ix++
        outline[ix] = new item(true, "4.4  Standard Practices","74","B",1)
        ix++
        outline[ix] = new item(false, "4.4.1  Insulation Systems / Encapsulation","741","",2)
        ix++
        outline[ix] = new item(false, "4.4.2  Circuit Partitioning","742","",2)
        ix++
        outline[ix] = new item(false, "4.4.3  Shorted or Open Outputs","743","",2)
        ix++
        outline[ix] = new item(true, "5.0  AC Output Power Supplies - Inverters, Frequency Changers and Uninterruptible Power Supplies","8","C",0)
        ix++
        outline[ix] = new item(false, "5.1  Design Guidelines","81","",1)
        ix++
        outline[ix] = new item(false, "5.2  Design Analyses / Verification","82","",1)
        ix++
        outline[ix] = new item(false, "5.3  Manufacturing Considerations","83","",1)
        ix++
        outline[ix] = new item(true, "5.4  Standard Practices","84","D",1)
        ix++
        outline[ix] = new item(false, "5.4.1  Common Practice for Inverters and Frequency Changers","841","",2)
        ix++
        outline[ix] = new item(false, "5.4.2  Common Practice for UPS","842","",2)
        ix++
        outline[ix] = new item(true, "Appendices","9","E",0)
        ix++
        outline[ix] = new item(false, "Appendix A. Sample Power Supply Performance Specification Checklist","91","",1)
        ix++
        outline[ix] = new item(true, "Appendix B. Design Review Checklists for Power Systems and Power Supplies","92","F",1)
        ix++
        outline[ix] = new item(false, "Electrical Checklist","921","",2)
        ix++
        outline[ix] = new item(false, "Mechanical Checklist","922","",2)
        ix++
        outline[ix] = new item(false, "Reliability Checklist","923","",2)
        ix++
        outline[ix] = new item(false, "Safety Checklist","924","",2)
        ix++
        outline[ix] = new item(false, "Maintainability Checklist","925","",2)
        ix++
        outline[ix] = new item(true, "Appendix C. Modified COTS/NDI and Custom Power Supply Supplier Evaluation","93","G",1)
        ix++
        outline[ix] = new item(false, "A. Parts and Material Selection","931","",2)
        ix++
        outline[ix] = new item(false, "B. Design Reviews","932","",2)
        ix++
        outline[ix] = new item(false, "C. Thermal Analyses","933","",2)
        ix++
        outline[ix] = new item(false, "D. Design Release","934","",2)
        ix++
        outline[ix] = new item(false, "E. Design Limit Qualification Testing","935","",2)
        ix++
        outline[ix] = new item(false, "F. Manufacturing Plan","936","",2)
        ix++
        outline[ix] = new item(false, "G. Manufacturing Process Proofing / Qualification","937","",2)
        ix++
        outline[ix] = new item(false, "H. Subcontractor Control","938","",2)
        ix++
        outline[ix] = new item(false, "I. Manufacturing Screening","939","",2)
        ix++
        outline[ix] = new item(false, "J. Quality","93a","",2)
        ix++
        outline[ix] = new item(true, "Appendix D. Platform Power Characteristics","94","H",1)
        ix++
        outline[ix] = new item(false, "Shipboard","941","",2)
        ix++
        outline[ix] = new item(false, "Aircraft","942","",2)
        ix++
        outline[ix] = new item(false, "Trade-offs","943","",2)
        ix++
        outline[ix] = new item(false, "Appendix E. Parts Derating Tables","95","",1)
        ix++
        outline[ix] = new item(true, "Appendix F. Glossary","96","I",1)
        ix++
        outline[ix] = new item(false, "Appendix F. Glossary (A - C)","961","",2)
        ix++
        outline[ix] = new item(false, "Appendix F. Glossary (D - H)","962","",2)
        ix++
        outline[ix] = new item(false, "Appendix F. Glossary ( I - O)","963","",2)
        ix++
        outline[ix] = new item(false, "Appendix F. Glossary (P - S)","964","",2)
        ix++
        outline[ix] = new item(false, "Appendix F. Glossary (T - Z)","965","",2)
        ix++

  setStates()
  setImages()
}

function resetStates() {
  setCookie("navso p-3641a_outline", "-")
}

function setStates() {
  var storedValue = getCookie("navso p-3641a_outline")
  var parentExpanded = true
  var lastExp = 0
  var text = ""
  var k = 0

  storedValue += "-"
  for (var i = 0; i < outline.length; ++i) {
    if (outline[i].parent) {
      text = "-" + outline[i].id + "-"
      if (storedValue.indexOf(text) != -1)
        outline[i].state = true
      else
        outline[i].state = false
    }
  }

  for (var i = 0; i < outline.length; ++i) {
    if (outline[i].parent) {
      if ((outline[i].depth == 0) || (outline[i].depth <= lastExp) || (parentExpanded)) {
        outline[i].visible = true
        if (outline[i].state)
          lastExp = outline[i].depth + 1
        else
          if (outline[i].depth < lastExp)
            lastExp = outline[i].depth
      } else
        outline[i].visible = false
      parentExpanded = (outline[i].state && outline[i].visible)
    } else {
      if (parentExpanded)
        outline[i].visible = true
      else
        outline[i].visible = false
    }
  }
}
function setImages() {
  for (var i = 0; i < outline.length; ++i) {
    if (outline[i].visible)
      if (outline[i].parent)
        if (((outline[i+1].parent) && (outline[i+1].depth <= outline[i].depth)))
          outline[i].pic = '<IMG SRC="../../minus.gif" BORDER=0>'
        else
          if (outline[i].state)
            outline[i].pic = '<A HREF="javascript:toggle(' + i + ')"><IMG SRC="../../minus.gif" BORDER=0></A>'
          else
            outline[i].pic = '<A HREF="javascript:toggle(' + i + ')"><IMG SRC="../../plus.gif" BORDER=0></A>'
      else
        outline[i].pic = '<IMG SRC="../../leaf.gif" BORDER=0>'
  }
}
function toggle(num) {
  outline[num].state = !outline[num].state

  setStorage()
  history.go(0)
}
function setStorage() {
  var text = "-"
  for (var i = 0; i < outline.length; ++i) {
    if ((outline[i].parent) && (outline[i].state)) {
      text += (outline[i].id)
      text += '-'
    }
  }

  setCookie("navso p-3641a_outline", text)
}
function drawTree(myname) {
  document.write('<table>');
  for (var i = 0; i < outline.length; ++i) {
    if (outline[i].visible) {
      document.write('<tr><td align=right valign=top colspan=',(outline[i].depth + 1),'>')
      document.write(outline[i].pic, ' ')
      document.write('</td><td colspan=',(3-outline[i].depth))
      if (myname == outline[i].file)
        document.write(' class="boldredtxt"><b>', outline[i].text, '</b>')
      else
        document.write('><a href="',outline[i].file,'.html">', outline[i].text, '</a>')
      document.write('</td></tr>')
    } else {
      var previous = i
      for (var k = i + 1; k < outline.length && outline[k].depth >= outline[previous].depth; ++k) {
        ++i
      }
    }
  }
  document.write('<tr>');
  for (var j = 0; j < 12; ++j) { document.write('<td width=12>&nbsp;</td>') }
  document.write('</tr></table>');
}
makeDatabase()

