Per chiudere una finestra pop-up usa:

codice:
getURL("javascript:window.top.close()");


PS "javascript" si scrive attaccato.