I want to be able to emulate the effect that google has used on their search results screen whereby the results are shown on the left and the user can click a button on each result to show a preview of that result on the right.
I found somewhat of a solution in jquery format:-
"The trick is that you have to set it as position:fixed, but only after the user has scrolled past it.
This is done with something like this, attaching a handler to the window.scroll event
// Cache selectors outside callback for performance.
var $window = $(window),
$stickyEl = $('#the-sticky-div');
var elTop = $stickyEl.offset().top;
var windowTop = $window.scrollTop();
$stickyEl.toggleClass('sticky', windowTop > elTop);
This simply adds a sticky CSS class when the page has scrolled past it, and removes the class when it's back up.
And the CSS class looks like this