You could add the script using xml. Then you could use the layout update xml tab within the admin for the CMS page you want to remove script from the page. e.g:
1. Add JS to all pages:
This could be added to your local.xml file within your theme and will apply to all pages then due to being within default node.
2. Remove JS from a CMS Page:
This can be added to that CMS pages layout update xml field within admin so is just applied to that page. Navigate to CMS -> Pages -> Design. Then paste above into the layout update xml field.
3. Add JS file to filesystem.
The popup.js file should then be placed within the themes's JS folder: