Check out the Source Code, compile and try it out. It’s wired to get data from a separate list. Fields and lists to get the data from are parameters to the function, the comments and parameters are self-explained. To get it working jQuery UI needs to be loaded.
av Tim Scharinger