How the script work, first the parent object is passed to the second window by the function you declare in the second window. The parent object will contain all the variant you declare and functions you declare thus enabling you to call on previous window variant and functions. Also you can control the previous window anyway you like.