Javascript close doesnt work on MAC

i use javascript close.
it works perfect on IE, Avant Browser or others but doesnt work on MAC browsers.
This code doesnt work on MAC

on (release) {

Try using: parent.close()

thanks… but the code that you sent works when clicked three or four times to button…

I hate MAC problems… ufff