Set current page based on Global variables