You can take the standard Reset button from the library and just modify it slightly. Delete the standard code and use the JavaScript below instead (on the "Click" event). I've done my best to explain each line.
//this variable declares the text that will appear in the Alert Box
var cMsg = "This will permanently clear this form\n\nDo you want to Continue?";
//the declaration below represents the Alert Box type and the
//arguments that will determine appearance and behaviour
var nRtn = app.alert(cMsg,1,2, "Reset Form");
//determine the value of the User's response (i.e. did they
// click "Yes" or "No"?
if(nRtn == 4)
{ // A Yes Answer
// reset data
xfa.host.resetData();
}
endif;