function DHfootNote(containerID, targetID, classID, format, sub, addTitle) {
return
  // Por defecto, si no nos dan un container, buscamos los links de todo el documento
  var c = document.getElementById(containerID) || document;
  // Por defecto, si no nos dan un id de destino, creamos un div al final del documento
  var t = document.getElementById(targetID) || document.appendChild(document.createElement('div'));
  // la clase por defecto es "print"
  classID = classID || 'print';
  // el formato por defecto es poner un numero
  format = format || '%0';

  var l = c.getElementsByTagName('a');
  var ol = document.createElement('ol');
  var ar = []
  var ref = 1;

  // recorremos la lista de todos los links del container
  for(var x = 0; x < l.length; x++) {
    var lx = l[x];

    // solo lo aņadimos a la lista si no ha salido antes
    if (ar[lx.href] == undefined) {

      //creamos un nuevo elemento para la lista
      var li = document.createElement('li');

      // Aņadimos los titulos si nos los piden
      if (addTitle && lx.title) {
        li.appendChild(document.createTextNode(lx.title));
        li.appendChild(document.createElement('br'));
      }

      // finalmente aņadimos el vinculo a la lista
      li.appendChild(document.createTextNode(lx.href));
      ol.appendChild(li);

      ar[lx.href] = ref++;
    }

    // creamos el elemento sup
    var sup = document.createElement(sub? 'sub' : 'sup');
    sup.className = classID;
    sup.appendChild(document.createTextNode(format.replace('%0', ar[lx.href])));
    lx.appendChild(sup);
  }

  // aņadimos la lista al container
  t.appendChild(ol);
}

function DHfootNote_onLoad() {
  DHfootNote('main','footer-bar');
  //DHfootNote('main','footer-bar', null, '(%0)', false, true);
}

if (window.attachEvent) window.attachEvent('onload', DHfootNote_onLoad);
else window.addEventListener("load", DHfootNote_onLoad, true)
