Also, I added a variable at the top of the function that determines whether or not TLDs should be checked at all. Changed some of the logic so that the function will work properly with Netscape 6. Fixed a bug where trailing . However, there's still the restriction that an address must end in a two or three letter word. Rewrote most of the function to conform more closely to RFC 822.
Domain is symbolic name.
Check if it's valid.