// {{{ addEvent

/**
 * Add event handler works x-browser but fails
 * silently in IE5 Mac.
 * Devised by Scott Andrew with commentary at
 * http://www.scottandrew.com/weblog/articles/cbs-events
 *
 * Note, the IE Mac issue has been resolved by Simon W.
 * http://simon.incutio.com/archive/2004/05/26/addLoadEvent
 */

function addEvent(obj, evType, fn){
 if (obj.addEventListener){
    obj.addEventListener(evType, fn, true);
    return true;
 } else if (obj.attachEvent){ 
    var r = obj.attachEvent("on"+evType, fn);
    return r;
 } else {
    return false;
 }
} 

// }}}