How do I detect the browser's Country?

Using the HTTP_USER_AGENT server variable?

I want to achieve a similar effect to the www.Altavista.com site, where they popup relevant content based on the users location.

I only *really* need to know if the browser is in North America or not.

Thanks,
benski