apologies, the above javascript requires registration. The non-registered version is:
<script language="JavaScript" src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
then the rest is the same.
That javascript gives pretty much all maxmind's functionality and then some currency conversion things as well
see
http://www.geoplugin.com/