I thought of this last night when I was trying to fall asleep. I saw an article about something similiar to this recently but I'm not sure if it was dynamic. This is what's going on...
The linked page is a simple proof-of-concept. I was thinking of writing some sort of project management and I thought it'd be nice to have an option to open links in tabs. I know, Firefox has tabs (and I use them religiously) but when I have four tabs open just trying to navigate through a project, along with the 5 other tabs for my shoutcast station, digg, the site I'm working on, etc., it's a bit cumbersome to find my way around. About an hour later, I had this.
The script uses an unordered list for the tabs and div's to contain content. Both have a little CSS to make them do what I want'm to. Next phase: closing tabs.
View Demo (right click and 'Save As...' to download)