function CONFIRM_DELETE(this_button){
	if(confirm("Are you sure you wish to delete this entry")) DELETE(this_button);
}

function DELETE(this_button){
	var this_entry = this_button.id;
		
	if (NOT_EMPTY_BLANK(this_entry)){	
	var delete_url=location.href.replace(location.search,"");
	//Gets the full URL(location.href) and removes the query string (location.search)
	delete_url+="?delete="+this_entry;
	alert(delete_url);
	location = delete_url; 
	}
}

function NOT_EMPTY_BLANK(str) {
	if (str.length != 0){
		for (i = 0; i < str.length; i++) {
			if (str.charAt(i) != " "){
					return true;
			}
		}
	}
	else{
		return false;
	}
}

