Do you want all the driving directions to be hidden?
directions = new GDirections(map, document.getElementById('wagmp_directions_1'));
Modify it to look like this:
directions = new GDirections(map, "");
As for getting just the distance, that's a bit more complicated and is not supported since it will require custom coding.