isIE = (document.all) ? true:false;
window.onload = global_init;

function global_init() 
{
	setLastModifiedDate();
	styleAbbr(); //Works around bug in IE that doesn't support XHTML tag <abbr>
}

function launchPopUp(Width, Height, WindowName, Url)
{
  var leftoffset = (screen.width - Width - 10)/2;
  var topoffset = (screen.height - Height - 40)/2;
  var mywindow = window.open(Url,WindowName,'resizable=yes,scrollbars=yes,width=' + Width + ',height=' + Height + ',left=' + leftoffset + ',top=' + topoffset);
  mywindow.focus();
}

function setLastModifiedDate()
{
	var m = "Last updated " + document.lastModified;
	document.getElementById('lastModified').innerHTML = m;
}

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;
  }
}
