Here is one way.
Add this to your code:
var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");
polygonLayer.events.on({
featuresadded: function (event) {
var confirmPolygon = function () { return confirm("Do you want to keep this polygon?") };
if (!confirmPolygon()) {
polygonLayer.removeFeatures(event.features);
}
}
});
I'll post an update for the radio button comment/suggestion.