// abbr.js
// For the benefit of IE that doesn't support the <abbr> tag
// Inserts a <span class="abbr">...</span> within every <abbr>...</abbr> tag when page loads
// Incorporate <script src="/abbr.js" type="text/javascript"></script> on pages that use the <abbr> tag
// Ack: http://www.sovavsiti.cz/css/abbr.html

function styleAbbr() {
  var oldBodyText, newBodyText, reg
  if (isIE) {
    oldBodyText = document.body.innerHTML;
		// Must be uppercase ABBR for regExp
    reg = /<ABBR([^>]*)>([^<]*)<\/ABBR>/g;
    newBodyText = oldBodyText.replace(reg, '<abbr $1><span class=\"abbr\" $1>$2</span></abbr>');
    document.body.innerHTML = newBodyText;
  }
}

/*
window.onload = function(){
  styleAbbr()
};
*/
window.onload = styleAbbr;

isIE = (document.all) ? true:false;