function omdown() {
  this.hideFocus=false;
}

function omout() {
  this.hideFocus=true;
}

function focu(a) {
  for (var x=0;x<document.links.length;x++) {
    document.links[x].hideFocus=a;
    document.links[x].onmousedown=omdown;
    document.links[x].onmouseup=omout;
    document.links[x].onmouseout=omout;
  }
}
focu(true);

function keerooteen() {
  if (window.event.keyCode==9 && document.links[0].hideFocus) focu(false);
}
document.onkeydown=keerooteen;
