<!--

// Set the initial state if no current state or length changed
if (current == "" || current.length != (db.length-1)) {
  current = ""
  initState = ""
  for (i = 1; i < db.length; i++) { 
    initState += "0"
    current += "0"
    }
  setCurrState(initState)
  }
var prevIndentDisplayed = 0
var showMyDaughter = 0
// end -->
 
<!--
var Outline=""
// cycle through each entry in the outline array
for (var i = 1; i < db.length; i++) {
  var currIndent = db[i].indent           // get the indent level
  var expanded = current.substring(i-1,i) // current state
///////////////////////////////////////////////////////////////
  var LinkTarget = db[i].top
///////////////////////////////////////////////////////////////

  if (LinkTarget == "") { LinkTarget="_self"; }
//  else { top="_self"; };
  // display entry only if it meets one of three criteria
  if ((currIndent == 0 || currIndent <= prevIndentDisplayed || (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1)))) {
  Outline += pad(currIndent)

  // Insert the appropriate GIF and HREF
  newitem = "";
  Outline +="<nobr>"
  if (currIndent == 1) {Outline += "<IMG SRC=\"http://www.remhouse.spb.ru/menu/1x1.gif\" WIDTH=15 HEIGHT=1 BORDER=0>"}
  if (currIndent == 2) {Outline += "<IMG SRC=\"http://www.remhouse.spb.ru/menu/1x1.gif\" WIDTH=15 HEIGHT=1 BORDER=0>"}
  if (currIndent > 0) {
	if (!(db[i].mother)) {
		Outline += "<IMG SRC=\"http://www.remhouse.spb.ru/menu/join.gif\" WIDTH=16 HEIGHT=16 BORDER=0>" 
    } 
	else { 
		if (current.substring(i-1,i) == 1) {
			Outline += "<A HREF=\"javascript:history.go(0)\" onMouseOver=\"window.parent.status=\'Click to collapse\';return true;\" onClick=\"toggle(" + i + ")\">"
			Outline += "<IMG SRC=\"http://www.remhouse.spb.ru/menu/minus.gif\" WIDTH=16 HEIGHT=16 BORDER=0>"
			Outline += "</A>"
		}
		else {
			Outline += "<A HREF=\"javascript:history.go(0)\" onMouseOver=\"window.parent.status=\'Click to expand\';return true;\" onClick=\"toggle(" + i + ")\">"
			Outline += "<IMG SRC=\"http://www.remhouse.spb.ru/menu/plus.gif\" WIDTH=16 HEIGHT=16 BORDER=0>"
			Outline += "</A>"
		}
    }
 }
    Outline += "&nbsp;";
     
    if (db[i].URL == "" || db[i].URL == null) {
      Outline += " " + db[i].display      // no link, just a listed item  
      }
    else {
    if (currIndent > 0) {
      Outline += " <A class=menu" + currIndent + " HREF=\"" + db[i].URL + "\" TARGET=\"" + LinkTarget + "\"  onClick=\"toggle(" + i + ")\">" + db[i].display + "</A>"
      }
    else {
	  if (db[i].newitem) { 
		Outline += "<A HREF=\"" + db[i].URL + "\" TARGET=\"" + LinkTarget + "\"  onClick=\"contract();toggle(" + i + ")\">"
		Outline += "<IMG SRC=\"http://www.remhouse.spb.ru/menu/" + db[i].newitem + "\" WIDTH=64 HEIGHT=48 BORDER=0></a>"; 
		}
      Outline += " <A class=menu" + currIndent + " HREF=\"" + db[i].URL + "\" TARGET=\"" + LinkTarget + "\"  onClick=\"toggle(" + i + ")\">" + db[i].display + "</A>"
      }
	  }
    Outline += "</nobr><BR>"
    prevIndentDisplayed = currIndent
    showMyDaughter = expanded
    // if (i == 1) { Outline = ""}
    if (db.length > 25) {
      document.write(Outline)
      Outline = ""
      }
    }
  }
document.write(Outline)
// end -->
