
//	Mark Prokop's JS code for
//	Styling <abbr> in IE
//	http://www.sovavsiti.cz/css/abbr.html
//
//	must run at end of HTML to retain previous onLoad code

function styleAbbr() {
  var oldBodyText, newBodyText, reg
  if (isIE) {
    oldBodyText = document.body.innerHTML;
    reg = /<ABBR([^>]*)>([^<]*)<\/ABBR>/g;
    newBodyText = oldBodyText.replace(reg, '<ABBR $1><SPAN class=\"abbr\" $1>$2</SPAN></ABBR>');
    document.body.innerHTML = newBodyText;
  }
}

// This part from evolt.org!
// http://lists.evolt.org/harvest/detail.cgi?w=20010813&id=3423

/* If an onload handler is already defined, we turn it into a string,
and add a ;. */
if(self.onload != null && self.onload != "undefined")
{
var strOnLoad = self.onload.toString();
var strNewOnLoad = strOnLoad.substring(strOnLoad.indexOf('{')
+1,strOnLoad.length -2) + '; ';
}

/* if not just initialise a empty string variable */
else {
var strNewOnLoad = "";
}

/* now we add in the statements we want to get executed onload */
strNewOnLoad += 'styleAbbr();';

/* Now we compile it all back into a usable function, and assign it to
the windows onload event handler */
self.onload = new Function(strNewOnLoad);

isIE = (document.all) ? true:false;
