// get domain TLD from country code
var strCountry = google.loader.ClientLocation.address.country_code;
var strCountryName = google.loader.ClientLocation.address.country;

switch ( strCountry ) {
	case 'GB':
	case 'IE':
		strTld = 'co.uk';
		break;
	case 'AT':
		strTld = 'de';
	default:
		// by default, TLD is lowercase of country code. if no associate, then use .com
		strTld = ( arrAffiliates[strCountry.toLowerCase()] ? strCountry.toLowerCase() : 'com' );
		break;
}

document.getElementById( 'suggest' ).style.display = 'block';
document.getElementById( 'all_scripts' ).style.display = 'none';

if ( strCountryName == 'USA' || strCountryName == 'United Kingdom' ) {
	strCountryName = 'the ' + strCountryName;
}

document.getElementById( 'country' ).innerHTML = strCountryName;
document.getElementById( 'tld' ).innerHTML = strTld;
document.getElementById( 'tld2' ).innerHTML = strTld;
document.getElementById( 'tld3' ).innerHTML = strTld;

document.getElementById( 'download' ).href = '/files/gm/amazon.' + strTld + '.user.js';

if ( strTld == 'co.uk' ) {
	document.getElementById( 'tldNot' ).innerHTML = 'com';
}


function showOptions() {
	document.getElementById( 'all_scripts' ).style.display  = 'block';
	document.getElementById( 'suggest' ).style.display  = 'none';
	
	return false;
}