pop up window minimize/maximize works fine, i need help on this

Hello,

This is my code below to minimize and maximize the window

  1. i am looking how to join it to an object so that on click it opens and a cross button to close it and make window dragable.
  2. how to add a image,text in it…

modify this current code below ::

help help help