//<![CDATA[
// Main Section Title Graphic
if(dir != null){
  document.write('<a href="/'+dir+'/"><img src="/images/leftnav_'+dir+'.gif" width="137" height="33" alt="" border="0" /></a><br />')
} else {
  document.write('<img src="/images/spacer.gif" width="137" height="33" alt="" border="0" class="orange" /><br />')
}


// find Active Section for left nav
  // SET PAGENAME (/DIR/FILENAME.HTML) & DIR IF AVAILABLE
    theURL = window.location.pathname;
    theSearch = window.location.search;
    // Has SUB Dir
    if(theURL.indexOf('/',1) != theURL.lastIndexOf('/')){
      var dirPath = theURL.substring(theURL.indexOf('/',1)+1,theURL.lastIndexOf('/'))
      if(theURL.indexOf('.')!=-1){var pageName = theURL + theSearch
      } else {var pageName = theURL + "index.html" + theSearch}}
    // DOES NOT Have SUB Dir
    else {var dirPath = null; var pageName = theURL + theSearch}

var activeSection = 0; var activeSubSection = 0; var file = pageName;
function theLoop(){
  for(fS=0;fS<eval("snav"+currentNav+".length");fS++){
  val = eval("snav"+currentNav+"[fS+2]")
    if(val == 0){ // Skip this one, as it's a "title"
      fS = fS + 3;
    } else if(file == val.substring(0,val.indexOf("."))){
      activeSection = eval("snav"+currentNav+"[fS]")
      break;
    } else {
      if(eval("snav"+currentNav+"[fS+3]") == 1){ // has subsub nav
        fS = fS + 4;
      } else { // has NO subsub nav
        fS = fS + 3;
      }
    }
  }
}
theLoop();
if(activeSection == 0){
  splitString = file.split('/')
  if((splitString.length -2) == 2){
    file = pageName.substring(0,pageName.lastIndexOf('/')+1) + "index"
  } else if((splitString.length -2) == 3){
    file = pageName.substring(0,pageName.lastIndexOf('/'))
    file = file.substring(0,file.lastIndexOf('/')+1) + "index"
  }
  theLoop()
}


var theArray = "snavAlt"+currentNav+"_"+activeSection

var activeAltSection = 0; var activeAltSubSection = 0;
for(fN=0;fN<eval(theArray+".length");fN++){
  val2 = eval(theArray + "[fN+2]");
  if(val2 == 0){ // Skip this one, as it's a "title"
    fN = fN + 3;
  } else if(pageName == val2){//val2.substring(val2.lastIndexOf('/')+1,val2.indexOf('.'))){
    activeAltSection = eval(theArray + "[fN]")
    break;
  } else {
    if(eval(theArray + "[fN+3]") == 1){ // has subsub nav
    // find Active Sub Section
      for(fsN=0;fsN<eval(theArray + "[fN+4]").length;fsN++){
      subval2 = eval(theArray + "[fN+4][fsN+2]")
        if(pageName == subval2){//subval2.substring(subval2.lastIndexOf('/')+1,subval2.indexOf('.'))){
          activeAltSection = eval(theArray + "[fN]")
          activeAltSubSection = eval(theArray + "[fN+4][fsN]")
          break;
        } else {
          fsN = fsN + +2;
        }
      }
      fN = fN + 4;
    } else { // has NO subsub nav
      fN = fN + 3;
    }
  }
}


if(currentNav != null){

document.write('<table width="137" cellspacing="0" cellpadding="0" border="0">')

// Section Title
for(t=0;t<eval("snav"+currentNav+".length");t++){
  if(activeSection == eval("snav"+currentNav+"[t]")){
    sectionTitle = eval("snav"+currentNav+"[t+1]");
    sectionLink = eval("snav"+currentNav+"[t+2]")
    break;
  }
  if(eval("snav"+currentNav+"[t+3]") == 0){
    t = t + 3;
    } else {
    t = t + 4;
  }
}
document.write('<tr><td colspan="2" valign="middle" align="right" class="leftnavTitle" style="cursor:pointer; cursor:hand;" onclick="window.location.href=\''+ sectionLink +'\'"><a href="'+sectionLink+'">'+ sectionTitle +'</a></td></tr>')

  for(x=0;x<eval(theArray+".length");x++){
  // Section Active
    if(activeAltSection == eval(theArray+"[x]") && activeSubSection == 0){
      document.write('<tr><td colspan="2" valign="middle" align="right" class="leftnavActive" onclick="window.location.href=\''+ eval(theArray+"[x+2]") +'\'"><a href="'+ eval(theArray+"[x+2]") +'">'+ eval(theArray+"[x+1]") +'</a></td></tr>')
    }
  // Section Active with SubSection
    else if(activeAltSection == eval(theArray+"[x]")){
      document.write('<tr><td colspan="2" valign="middle" align="right" class="leftnavOn" onclick="window.location.href=\''+ eval(theArray+"[x+2]") +'\'"><a href="'+ eval(theArray+"[x+2]") +'">'+ eval(theArray+"[x+1]") +'</a></td></tr>')
    }
  // Section NOT active
    else {
      thisLink = eval(theArray+"[x+2]")
      if(thisLink.indexOf("?")!=-1 && thisLink.indexOf("newwin")!=-1){ // Open in new window
        thisLink = thisLink.substring(0,thisLink.indexOf("?"))
        document.write('<tr><td colspan="2" valign="middle" align="right" onmouseover="this.className=\'leftnavOv\'" onmouseout="this.className=\'leftnav\'" class="leftnav" onclick="window.open(\''+ thisLink +'\',\'_blank\')"><a href="javascript:void(0);">'+ eval(theArray+"[x+1]") +'</a></td></tr>')
      } else { // Open in Same Window
        document.write('<tr><td colspan="2" valign="middle" align="right" onmouseover="this.className=\'leftnavOv\'" onmouseout="this.className=\'leftnav\'" class="leftnav" onclick="window.location.href=\''+ eval(theArray+"[x+2]") +'\'"><a href="'+ eval(theArray+"[x+2]") +'">'+ eval(theArray+"[x+1]") +'</a></td></tr>')
      }
    }

  // Dividing Lines
    if(activeAltSection - 1 == eval(theArray+"[x]")){ // TOP Line above Active Section
      document.write('<tr><td colspan="2" class="leftnavOnBorderSolid"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>')
    } else if(activeAltSection == eval(theArray+"[x]") && eval(theArray+"[x+3]") == 0){ // BOTTOM line below Active Section
      document.write('<tr><td colspan="2" class="leftnavOnBorderSolid"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>')
    } else if(activeAltSection == eval(theArray+"[x]") && eval(theArray+"[x+3]") == 1){ // BOTTOM line below Active Section /w Sub
      document.write('<tr><td colspan="2" class="leftnavOnBorder"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>')
    } else { // Normal Grey Line
      document.write('<tr><td colspan="2" class="leftnavBorder"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>')
    }

    if(eval(theArray+"[x+3]") == 0){// Section has no sub nav
      x = x + 3
    }

  // Section is active AND has sub nav
    else if(activeAltSection == eval(theArray+"[x]")){
      for(s=0;s<eval(theArray+"[x+4].length");s++){
        if(activeAltSubSection == eval(theArray+"[x+4][s]")) {
          document.write('<tr><td valign="middle" align="right" class="leftsubnavActive" onclick="window.location.href=\''+ eval(theArray+"[x+4][s+2]") +'\'"><a href="'+ eval(theArray+"[x+4][s+2]") +'">'+ eval(theArray+"[x+4][s+1]") +'</a></td><td class="leftsubnavArrowOn"><img src="/images/leftnav_bullet.gif" width="3" height="5" alt="" border="0" /></td></tr>')
        } else {
          sLink = eval(theArray+"[x+4][s+2]")
          if(sLink.indexOf("?")!=-1 && sLink.indexOf("newwin")!=-1){ // Open in new window
            sLink = sLink.substring(0,sLink.indexOf("?"))
            document.write('<tr><td valign="middle" align="right" class="leftsubnav" onclick="window.open(\''+ sLink +'\',\'_blank\')"><a href="javascript:void(0);">'+ eval(theArray+"[x+4][s+1]") +'</a></td><td class="leftsubnavArrowOff"><img src="/images/leftnav_bullet.gif" width="3" height="5" alt="" border="0" /></td></tr>')
          } else { // Open in Same Window
            document.write('<tr><td valign="middle" align="right" class="leftsubnav" onclick="window.location.href=\''+ sLink +'\'"><a href="'+ sLink +'">'+ eval(theArray+"[x+4][s+1]") +'</a></td><td class="leftsubnavArrowOff"><img src="/images/leftnav_bullet.gif" width="3" height="5" alt="" border="0" /></td></tr>')
          }
        }
        s = s + 2;
      }
      document.write('<tr><td colspan="2" class="leftnavOnBorder"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>')
      document.write('<tr><td colspan="2" class="leftnavOnBottom"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>')

      x = x + 4
    } else {x = x + 4}
  }
document.write('</table>')
document.write('<img src="/images/leftnav_bottom.gif" width="137" height="11" alt="" border="0" />')
}


//]]>