It's 2:40 am here, so I need to get some sleep, but I'll post up some code later today that will help you out.