I had a request recently for a script which moves from input to input using the up and down arrows.
It should skip buttons and password fields, and it should loop from the first element to the last.

What i produced may be of interest to people here:
Code:
var i = document.getElementsByTagName('INPUT');
var ia = new Array;
var c=0;
for (o=0;o<i.length;o++){
        if (i[o].type=='text'){
                i[o].idref=c;
                ia[c++]=i[o];
                }
        }
il = ia.length-1;
function Khandler(){
        e=event;
        k=e.keyCode;
        s=e.srcElement
        if (k==40||k==38){
                if (s.tagName=='INPUT' && s.type=='text'){
                        var m = (k==40)?+1:-1;
                        m=(k==38&&s.idref==0)?+(il):((k==40&&s.idref==(il))?-(il):m);
                        alert('the giraffe\'s can\'t get me now -> '+s.idref+' | '+m+' gives: '+ia[s.idref+m].name);
                        ia[s.idref+m].focus();
                        }
                }
As you can see - this uses an object reference array to handle the mechanism of referencing the desired objects.

An example of the use of it:
http://develop.thermeoneurope.com/scroll.html

Well - that's all.
Questions / Comments / Suggestions welcome.

( the script was for ie5.5+ envs - btw )

Flawless