I'm just learning the basics at the moment and alot of its going over my head.

What I was wondering, I have two sets of prompts called via a class

<a href="index.html" class="Delete"/class="Remove"

Each one has a seperate pop up message (Are you sure you want to remove this, Are you sure you want to delete this from the database entirely)

To accomplish this I made two sets of functions, however Im confident it can be done in one, but I'm too new to figure out the precise workings...so

Code:
function confirmDelete(event){

if(confirm("Are you sure you want to delete this from the database entirely?")){
	element = event.target;
	deleteUrl = element.href;
	window.location = deleteUrl;
  }
}


function bindDeleteConfs(){
  var els = $ES('a.Delete');

for(var i=0;i<els.length;i++){
   els[i].addEvent('click', function(event){confirmDelete(event); event.preventDefault();}.bindWithEvent(els[i]));
  }
 }

window.addEvent('domready', function(){ bindDeleteConfs() });



function confirmRemove(event){

if(confirm("Are you sure you want to remove this item from this?")){
	element = event.target;
	removeUrl = element.href;
	window.location = removeUrl;
  }
}


function bindRemoveConfs(){
  var els = $ES('a.Remove');

for(var i=0;i<els.length;i++){
   els[i].addEvent('click', function(event){confirmRemove(event); event.preventDefault();}.bindWithEvent(els[i]));
  }
 }

window.addEvent('domready', function(){ bindRemoveConfs() });
Help?