/**
 * method trim for IE
 */
if (!String.trim) {
 String.prototype.trim=
  function() {return this.replace(/^\s*/, "").replace(/\s*$/, "");};
 }

/**
 * browser-independent event-function attachment
 */
function myEventAttacher(elmt, evt, actn){
 if (document.addEventListener){
  elmt.addEventListener(evt, actn, false);
 }
 else if (document.attachEvent){
  elmt.attachEvent("on"+ evt, actn);
 }
}

