function restoreframes(ss) {
  var sisu = ss + '.html';
  var i = ss.search(/^[^a-z]/);
  if (i >= 0) {
    sisu = ss.slice (0,i-1) + '/' + ss + '.html';
  }
  var sisukord_synkroonis = 0;
  var correct_frame = 0 + (top.header ? 1 : 0);

  if (self == top || !correct_frame) {
    correct_frame = true;
    document.write('<FRAMESET ROWS="36,*" FRAMESPACING=0>');
      document.write('<FRAME NAME="header" MARGINWIDTH=6 MARGINHEIGHT=6 SCROLLING="no" NORESIZE FRAMEBORDER="no" SRC="header.html">');
      document.write('<FRAMESET COLS="300,*">');
        document.write('<FRAME SRC="blank.html" NAME="sisukord">');
        document.write('<FRAME SRC="blank.html" NAME="sisu" u="' + sisu + '">');
      document.write('<\/FRAMESET>');
    document.write('<NOFRAMES>Alustage failist <a href="sisukord.html">sisukord.html<\/a><\/NOFRAMES>');
    document.write('<\/FRAMESET>');
    document.write('<\/HTML>');
    top.sisu.window.location.href = 'sisukord.html#' . sisu;
    top.sisukord.window.location.href = 'sisukord.html#' + ss;
  }
  else {
    if (sisukord_synkroonis) top.sisukord.window.location.hash = ss;
  }
}

