First of all, you have to spell things correctly.
This line is COMPLETELY WRONG:
Code:
documentBygetelementsbyid(id).focus();
It *MUST* be
Code:
document.getElementById(id).focus();
and upper/lower case MATTER with JavaScript!
**********
Because you are using an <A> tag, after the focus is moved, the click on that tag will *STILL* then do the normal action of clicking an <A>...which is to move to the HREF of the tag.
Since all your HREFs are just "#", that means that focus will then go to the top of the page.
There are lots of ways to fix this.
Code:
<a href="#" id="1" onclick="javascript:focusMe('1'); return false;">
Or get rid of the silly <A> tags that are doing *NOTHING* useful:
Code:
<li onclick="this.focus();">menu1</li>
OR or or or...