The usual rule for accessability purposes is to not open links in a new window - it's confusing for users, breaks the "back" functionality and is unescessary - users can explicitly choose to open a link in a new window by holding down the shift (or apple) key while clicking, but cannot choose not to open a new window for links with a target attribute. So specifiying target attributes is generally a bad thing.
The only thing left to do is to add the checkbox to let users select whether they want new windows enabled. In the place on you r page where you would like the control to appear, put the following HTML:
<form onsubmit="return false;"> <input type="checkbox" name="new_window_checkbox" id="new_window_checkbox" onclick="set_link_targets(this.checked);"> <label for="new_window_checkbox">open all links in new windows</label> </form>
The script is pretty intelligent too - it users cookies to remember users' settings, so if a user checks the checkbox, it will remain checked when they come back to your site next time.