To be honest, this is rather involved. I'll take a look, if I have time, and of course someone else may jump in. Check back in a few hours.