You must call the togglePopup function just after declaring it so that it will trigger the popup at page load.
togglePopup