Since confirm returns true or false, returning the value will allow further actions to stop or continue (just as when you'd do a "return false;" in a function for example).
return confirm("You are about to delete "+$v("P8_CUST_ID")+" ?");
and this in your link attributes
The correct value is put in P8_CUST_ID because the value is taken from the ID attribute on the anchor tag. You could in this case remove the appname attribute on the link text IMG tag.