Close window script with alert