It sounds like this may all be possible in a single template, in which case it makes "passing" variables quite easy. You can just create some temp variables in your data source that you can key off of to query your right details section based on what was selected on the left.
If these are indeed separate templates, web parts in SharePoint are useful. You can pass variables between web parts using part to part connections and then query the second form.