You need to download the "md5.asp" file from the author's page, and then, in your "template_permalink.asp" page, you must include the code:
<!--#include file="md5.asp"-->
<%
'create an instance of our MD5 class
set h = new MD5
'hash the email address we want the gravatar for
hash = h.hash("someemail@somehost.com")
'provide an alternative image if no gravatar is available
noPicUrl = server.urlEncode("http://yourhost.com/no_gravatar.gif")
%>
<img src="http://www.gravatar.com/avatar.php?gravatar_id=<%= hash %>&default=<%= noPicUrl %>" />
And there you have it... it will show the gravatars, and if the user has no gravatar, it will show the default one.
Regards.