// Language strings etc.

var reasons=[];
var invalidResponse = null;
var noResponse = null;
var langstrBestTransmitter = null;

function disclaimerClick()
{
    window.open('../html/disclaimer_iframe.html','name','location=no,address=no,height=500,width=500,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
    return false;
}

function configureLanguageData(language)
{
    if (language == 'danish')  {
	
	// ====== Array for decoding the failure codes ======
	// Error strings in Danish 
	reasons[G_GEO_SUCCESS] =
	    'Success';
	reasons[G_GEO_MISSING_ADDRESS] =
	    'Adressen mangler.';             
	reasons[G_GEO_UNKNOWN_ADDRESS] =
	    'Ukendt adresse: adressen kunne ikke findes.';
	reasons[G_GEO_UNAVAILABLE_ADDRESS] =
	    'Adressen er ikke tilgængelig.';
	reasons[G_GEO_BAD_KEY] =
	    'Forkert nøgle: API-nøglen er enten forkert eller ikke i ' +
	    'overensstemmelse med det domænet';
	reasons[G_GEO_TOO_MANY_QUERIES] =
	    'Kvorten for indtastninger er overskredet';
	reasons[G_GEO_SERVER_ERROR] =
		'Serverfejl: anmodningen kunne ikke gennemføres';

	invalidResponse = 'Serverfejl, forkert svar!';
	noResponse = 'Mangler svar';

	// Now, stuff for the infowindow overlays

	lsBestTransmitter = 'Bedste sender';
	lsAlternativeTransmitter = 'Alternativ sender'; 
	lsCompassDirection = 'kompasretning';
	lsCompassDirection2 = 'Kompasretning';
	lsDistance = 'afstand';
	lsBest = 'bedst';
	lsAlternative = 'alternativ';
	lsRegion = 'Region';
	lsDegrees = 'grader';
	lsDidYouMean = 'Mente du';
	lsCouldNotFind = 'Kunne ikke finde';
	lsErrorCode = 'Fejlkode';
	lsReceiverRegion = 'Modtagerens region';

	lsDisclaimerAndLink = "<div class='bulk'>Den viste dækning er baseret på statistiske beregninger og kan variere afhængigt af lokale forhold<br><br><a href='../html/disclaimer_iframe.html' target='name' onclick='disclaimerClick()'>Læs mere >></a></div>";
	lsNoJavascriptInBrowser =
	    "Din browser kan ikke bruges til denne applikation ";
    } else {
        // default to English
	
	// ====== Array for decoding the failure codes ======
	// Error strings in English
	reasons[G_GEO_SUCCESS] =
	    'Success';
	reasons[G_GEO_MISSING_ADDRESS] =
	    'Missing Address: The address was either missing or had no value.';
	reasons[G_GEO_UNKNOWN_ADDRESS] =
	    'Unknown Address:  No corresponding geographic location could ' +
	    'be found for the specified address.';
	reasons[G_GEO_UNAVAILABLE_ADDRESS] =
	    'Unavailable Address:  The geocode for the given address cannot ' +
	    'be returned due to legal or contractual reasons.';
	reasons[G_GEO_BAD_KEY] =
	    'Bad Key: The API key is either invalid or does not match the ' +
	    'domain for which it was given';
	reasons[G_GEO_TOO_MANY_QUERIES] =
	    'Too Many Queries: The daily geocoding quota for this site has ' +
	    'been exceeded.';
	reasons[G_GEO_SERVER_ERROR] =
	    'Server error: The geocoding request could not be successfully ' +
	    'processed.';
	
	invalidResponse = 'Got invalid response from server!';
	noResponse = 'No response';

	// Now, stuff for the info divs
	
	lsBestTransmitter = 'Best transmitter';
	lsAlternativeTransmitter = 'Alternative transmitter'; 
	lsCompassDirection = 'compass direction';
	lsCompassDirection2 = 'Compass direction';
	lsDistance = 'distance';
	lsBest = 'best';
	lsAlternative = 'altern.';
	lsRegion = 'Region';
	lsDegrees = 'degrees';
	lsDidYouMean = 'Did you mean';
	lsCouldNotFind = 'Could not find';
	lsErrorCode = 'Error code';
	lsReceiverRegion = 'Receiver region';
	
	lsDisclaimerAndLink =
	    "<div class='bulk'>The shown coverage is based on statistical " +
	    "computations and is only an estimate.</div>";

	lsNoJavascriptInBrowser =
	    "Your browser cannot be used for this application.";
    }
}
