Custom JavaScript controls for webpages