function fixMenu() {
  var o = document.getElementById('thetopmenu');
  var lis = o.getElementsByTagName('li');
  var tf = o.getElementsByTagName('ul');
  var w = 0;
  var n = 0;
  var tot = o.clientWidth;

  for(var it = 0;it < lis.length; it++) {
    if(lis[it].className=='top') {
      w += (lis[it].clientWidth + 1);
      n++;
    }
  }
  var pw = Math.floor((tot - w) / (n*2));
  for(var it = 0;it < lis.length; it++) {
    if(lis[it].className=='top') {
      var a = lis[it].getElementsByTagName('a')[0];
      a.style.padding = '0px ' + pw + 'px';
    }
  }  
  
}

document.observe("dom:loaded", function() {fixMenu();});
/*if (window.attachEvent)
  window.attachEvent('onload',fixMenu);
else 
  try {
    window.addEventListener('load',fixMenu, false);
  }
  catch(e){}
*/