Calling & executing Javascript function in Flash w/AS3

As the title says, I have a JS function (which changes the dimensions of my swf at runtime) & just want to execute the function when the user clicks the resize btn. The functions are ‘flashmin()’ to be executed by ‘bt_close’ & ‘flashmax()’ to be executed by ‘bt_open’.
I assume I need to call it with “import flash.external.ExternalInterface;” but can anyone lay out the necessary code for me, or point me to an appropriate tutorial/s?