/*
AddEvent Manager (c) 2005 Angus Turnbull http://www.twinhelix.com
Free usage permitted as long as this credit notice remains intact.
*/
if (!window.aeOL) {
   window.aeOL = [];
   window.addEvent = function(o, n, f, l) {
      var d = 'addEventListener', h = 'on' + n, t, a;
      if (o[d] && !l) return o[d](n, f, false);
      if (!o.aE) { o.aE = aeOL.length || 1; aeOL[o.aE] = { o:o } }
      t = aeOL[o.aE][n] || (aeOL[o.aE][n] = []);
      for (var i = 0; i < t.length; i++)
         for (var j = 0; j < t[i].length; j++)
            if (t[i][j] == f) return;
      if (o[h] && o[h]._ae) {
         a = t[t.length - 1];
         a[a.length] = f;
      }			
      else {
         t[t.length] = o[h] ? [o[h], f] : [f];
         o[h] = new Function('e', 'var r = true, i = 0, x = aeOL[' + o.aE + '],' +
         'o = x.o, a = x["' + n + '"][' + (t.length - 1) + '];' +
         'for (; i < a.length; i++) {' +
             'o._f = a[i]; r = o._f(e||window.event) != false && r; o._f = null;' +
         '} return r');
         o[h]._ae = 1;
      }
   };

   window.removeEvent = function(o, n, f, l) {
      var d = 'removeEventListener', t, a;
      if (o[d] && !l) return o[d](n, f, false);
      if (!o.aE || !aeOL[o.aE]) return;
      t = aeOL[o.aE][n];
      for (var i = 0; i < t.length; i++) {
         a = t[i], s = 0;
         for (var j = 0; j < a.length; j++) {
            if (a[j] == f) s = 1;
            if (s) a[j] = a[j + 1];
         }
         if (s) { a.length--; return }
      }
   };
}

// Optional cancelEvent() function you can call within your event handlers to
// stop them performing the normal browser action or kill the event entirely.
// Pass an event object, and the second "c" parameter cancels event bubbling.
function cancelEvent(e, c) {
   e.returnValue = false;
   if (e.preventDefault) e.preventDefault();
   if (c) {
      e.cancelBubble = true;
      if (e.stopPropagation) e.stopPropagation();
   }
};

// Initialize function for any scripts to be run on all pages, browsers.
function footnoteLinksInit() {
   footnoteLinks('pagetext','footnotes');
}
function P7_TMclassInit() {
   P7_TMclass();
}
function P7_TMopenInit() {
   P7_TMopen();
}
addEvent(window, 'load', footnoteLinksInit);
addEvent(window, 'load', P7_TMclassInit);
addEvent(window, 'load', P7_TMopenInit);







