Page offset generator and tests
Fixing IE/W3C eventlistener