Selecting the first product on a page

There is no "one size fits all" solution for how to select the first product on a page, even when the page content changes. This would obviously be different for each wesite; however, the methodology used should always be the same.

A script that illustrates how to do this is available here: FirstProductOnThePage.gsl.