var imgSwap = {
  addEvents : function(oEl) {
    oEl.onmouseover = function()
      {
        if (this.img1.parentNode)
          this.img1.parentNode.replaceChild(this.img2, this.img1);
      };
    oEl.onmouseout = function()
      {
        if (this.img2.parentNode)
          this.img2.parentNode.replaceChild(this.img1, this.img2);
      };  
  },
	register : function(oImg1, img2Src, oEl)	{
    oEl.img1 = oImg1;
    var oImg2 = oImg1.cloneNode(false);
    oEl.img2 = oImg2;
    oImg2.el = oEl;
    oImg2.onload = function () {
      imgSwap.addEvents(this.el);
    }
    oImg2.src = img2Src;
	}
}

