
AddEvent(window,"load",FixTopLinks);


function FixTopLinks() {
  var TL = document.getElementById("TopLinks");
  if (TL == null) return;

  aCollection = TL.getElementsByTagName("a");

  var len = 0;
  for (i=0; i<aCollection.length; i++) { 
    text = aCollection[i].innerHTML.toLowerCase();

    text = text.replace("&nbsp;"," ");
    text = text.replace(/<img .*>/g," ");
    if (text.indexOf("<br") > -1) text = text.substring(0,text.indexOf("<br"));
    

    if (len<text.length) len = text.length;
  }
  len = len + 3;
  for (i=0; i<aCollection.length; i++){ 
    aCollection[i].parentNode.style.width = len.toString() + "ex";
  }

}