Help with writing Javascript within an HTML document

Using the comments within the HTML Code write the necassary missing Javascript: