A somewhat similar problem is discussed in this thread. You may check to see if any of those ideas are acceptable.