JS. Defining all functions for PageElement via prototype