This actually may not be too tough.  Let me play with it over the weekend.