Hi,To follow up on my previous post on this topic i made a couple code changes and here it is.Hope you find it helpful. please modify use at your own risk
Happy Scripting!Nate