Topic: Bookmarklet Code

I am working on an intranet that will allow clients to research and share bookmarks (i can already hear the groans)

I know, I know

they can probably just use delicious but this app will be a custom fit and..wait why am I explaining all this?

My real question is, how can I create my own booklmarklet code so people can easily add and tag links to their colleciton?