Javascript: tabbed table function for document collection

Hej,

I am looking for a JavaScript function that transforms a document collection into a tabbed table construction.

For example tab1 has the first 10 documents, tab2 the next 10 etcetera.

Any help is appreciated!

KR //

Patrick