Crosing neetwork domains

I have just had a request for a database that needs to be available across three network domains. The companies network is split into three parts “company name” Europe, “company name” north America and “company name” Japan. Using the normal @servername function when building the URL the database doesn’t work as it isn’t explicit enough . It has been tested and when using the full network/servername and not the local server name the database is accessible. Can any one suggest a way of picking up the full network/server name using formula or script.Thanks