/* FOOTNOTES
   * CSS classes, minimum properties:
        .luFootnote { display: none; }
        .luFootnoteBacklink { float: right; }
        div.lutextFootnotes {}
        ol.lutextFootnotes {}
        li.lutextFootnotes {}
   * Footnote in main text (inside comment code):
        <cite class="luFootnote"><!-- FOOTNOTE TEXT/HTML --></cite>
   * Generate footnotes with this script at the place all of them should
     appear below the last <cite>.
*/
backlinkText = '&nbsp;BACK&nbsp;';
preOL = '<table width="1" height="1" cellpadding="0" cellspacing="0" border="0" style="clear: both; width: 1px; height: 1px;"><tr><td></td></tr></table>';
m = /(^| )lufootnote( |$)/i;
n = "";
f = 0;
t = document.getElementsByTagName("cite");
for ( var i = 0; i < t.length; i++ ) {
   if ( t[i].className ) {
      if ( t[i].className.match(m) ) {
         ++f;
	 h = t[i].innerHTML;
         if ( h.indexOf("<!--") != -1 ) {
            h = h.replace(/<!--([\r\n\t\s]*<br(|\s?\/)>)*[\r\n\t\s]*/g, "<!--");
            h = h.replace(/([\r\n\t\s]*<br(|\s?\/)>)*[\r\n\t\s]*--\>/g, "--\>");
            h = h.replace(/^[\s\S]*?<!--/, "");
            h = h.replace(/--\>[\s\S]*?<!--/g, " ");
            h = h.replace(/--\>[\s\S]*?$/, "");
            h = h.replace(/\n\s*/g, "\n");
            c1 = ( f > 1 ) ? '' : ' lutextFootnote1';
            n += '<li class="lutextFootnotes' + c1 + '"><span class="luFootnoteBacklink"><a href="#backtoFootnote' + f + '" title="back to main text at footnote ' + f + '">' + backlinkText + '</a></span><a name="seeFootnote' + f + '"></a>' + h + '</li>';
            t[i].innerHTML = '<a href="#seeFootnote' + f + '" name="backtoFootnote' + f + '" title="see footnote ' + f + '">' + f + '</a>';
         }
      }
   }
}
if ( n != "" ) {
   n = '<br /><br /><div class="lutextFootnotes">Notes</div>' + preOL + '<ol class="lutextFootnotes">' + n + '</ol><br /><br />';
   document.write(n);
}
