How to write onblur into openWinCentre

I use this code all the time, I think I got here and it works great:

on (release) {
    //customize the window that gets opened
    // 0 equals NO.
    // 1 equals YES.
    address = "http://www.amazon.com";
    target_winName = "amazonWindow";
    width = 987;
    height = 787;
    toolbar = 0;
   etc, etc.
    //sends data back to the function
    openWinCentre(address, target_winName, width, height, toolbar, etc, etc.);

This has an attendant function on the first frame.

Since I have four such windows–none of my own making, I need to add onblur to this coding somehow, so each one will close when another needs to open. I think something like this would go in the function:

('<onblur="window.close();">');

and something like this:

onblur = 1;

would go in the on (release) list.

But I don’t how to write them or where they go.

Thanks.