function abbrToSpan(){
 var newSourceCode;
  if(isIE){
    newSourceCode           = document.body.innerHTML;
    newSourceCode           = newSourceCode.replace('<ABBR','<SPAN class=\"abbr\"');
    newSourceCode           = newSourceCode.replace('</ABBR>','</SPAN>');
    document.body.innerHTML = newSourceCode;
  }
}

function imagePopup(){
  if (!document.getElementById) return;

  var a = document.getElementsByTagName("a");
  for(var i = 0; i < a.length; i++){
    if(a[i].getAttribute("rel") == "screenshot"){
     a[i].onclick = function(){
      var file       = "/image.php?img="+this.getAttribute('href')+"&alt="+this.firstChild.getAttribute('alt')+"&title="+this.getAttribute('title');
      var name       = "screenshot";
      var properties = "directories=no,menubar=no,resizable=yes,scrollbars=no,toolbar=no,status=no";

      window.open(file,name,properties);
      return false;
     }
    }
  }
}

window.onload = function(){
 abbrToSpan();
 imagePopup();
}

isIE = (document.all) ? true:false;