    function standardizeEvent(event) { /* {{{ */
        if (!event.stopPropagation) { 
            event.stopPropagation = new Function('this.cancelBubble = true'); 
        }; 
    }; /* }}} */
    function addEvent(source, type, callback) { /* {{{ */
      if (source.addEventListener) {
        source.addEventListener(type, callback, false);
        return true;
      } 
      else if (source.attachEvent) {   // code MSIE
        var r = source.attachEvent("on"+type, callback);
        return r;
      } 
      else {          // code navigateur sans support DOM-event
        eval('source.on' + type + '= callback');
      };
      return true;
    }; /* }}} */
    function getStandardEvent(e) { /* {{{ */
        if (e == null && window.event) {
            e = window.event ;
        }
        if (e.target == null && e.srcElement) {
            e.target = e.srcElement ;
        }
        if (!e.preventDefault){
            e.preventDefault = function () { this.returnValue = false ; } ;
        }
        return e;
    }; /* }}} */
function getWinHeight() { /* {{{ */
  var myHeight = 0;
  if (typeof(window.innerHeight) == 'number') {
    myHeight = window.innerHeight;
  } 
  else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
    myHeight = document.documentElement.clientHeight;
  } 
  else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
    myHeight = document.body.clientHeight;
  }
  return myHeight - 16;
}; /* }}} */
function resizeWindow(e) { /* {{{ */
    document.getElementById('threadtree').style.height = getWinHeight() + 'px';
}; /* }}} */
function manageBlockquotes() { /* {{{ */
    // stub
    //var collection = document.getElementsByTagName('blockquote');
    //var l = collection.length;
    //var i;
    //for (i = 0; i < l; i++) {
    //    collection[i].style.display = 'none';
    //};
}; /* }}} */
function my_onload(evt) { /* {{{ */
    /* resize navigation size */
    resizeWindow();
    /* make sure resize is re-called on window resize */
    window.onresize = resizeWindow;
    /* hide blockquotes */
    manageBlockquotes();
    /* call old handler */
    if (old_onload) {   
        old_onload(evt);
    };
}; /* }}} */

/* Fix scrollbar height */
var old_onload = window.onload;
// window.onload = my_onload;

// make threading highlights
var e = document.getElementsByTagName('div');
var i, j;
for (i = 0; i < e.length; i++) {
    if (e[i].className == 'singlemessage') {
//        addEvent(e[i], 'mouseover', my_hover);
    };
};

function my_hover(e) {
    e = getStandardEvent(e);
    standardizeEvent(e);
    e.stopPropagation();
    var dethis;
    if (e.target) { dethis = e.target; } else { dethis = this; };
    var id = dethis.id;
    var my_href;
    var link;
    var t = document.getElementsByTagName('a');
    for (i = 0; i < t.length; i++) {
        if ((t[i].className == 'singlelink') || (t[i].className == 'singlelinkon')) {
            my_href = t[i].href;
            my_href = my_href.replace(/.*#(.*)/, "$1");
            if (id == my_href) {
                t[i].className = "singlelinkon";
            } 
            else {
                t[i].className = "singlelink";
            };

        };
    };
};



