you may wish to checkout this for inspiration
what you are attempting to do is fairly specialized so anticipate doing most of the gruntwork yourself...