Lets take a step back.
What is it that you are trying to achieve?
Not in terms of implementation, but functionality - what should happen from a user point of view?