// This JavaScript script file is used to get user language and list all languages.
// By; Mark A. Agius, (c)  8/10/2009 -  5:00pm bst (Email; MarkAgius@markagius.co.uk)
// Major code edit on     13/04/2010 -  5:45pm bst
// Last updated on        13/04/2010 -  6:00pm bst
// Code version; 0.03

/*
  To use this code add the following code.
  <SCRIPT language="JavaScript" src="LanguageInfo.js"></SCRIPT>
  <SCRIPT LANGUAGE="JavaScript"><!--
  this.document.write("Language; "+getLanguage(true)+"<BR>\n");
  //--></SCRIPT>

  Syntax;
    getLanguage()                = "en-us"
    getLanguage(false)           = "en-us"
    getLanguage(false,false)     = "en-us"
    getLanguage(false,true)      = "en-us"
    getLanguage(true)            = "English"
    getLanguage(true,false)      = "English"
    getLanguage(true,true)       = "English (en-US)"
    getLanguage("Country")       = "USA" (as en-US and not en-GB)
    getLanguage("Country",false) = "USA"
    getLanguage("Country",true)  = "USA (en-US)"
    getLanguage("Country",true)  = "England (en-GB)"

  This code works with the following browsers;
    Internet Explorer             Yes, but England is en-us so getLanguage("Country") returns 'USA' for England.
    Netscape Communicator (4.6)   No yet working
    Netscape (7.1)                Yes
    Netscape Navigator (9.0)      Yes
    32bit Web Browser             Yes
    AOL                           Yes
    Apple Safari                  Yes
    Google Chrome                 Yes
    Mozilla Firefox               Yes
    NeoPlanet                     Yes
    Opera (8.01) IE/Mozilla/Opera Yes
    Opera (9.02) IE/Firefox/Opera Yes
    SeaMonkey                     Yes
    Visual Explorer               Yes
    WebWindow                     Yes

*/

 var YourLanguage = getLanguage(true, false);


function getLanguage(fullName, andShortN){
  // Get the current language.
  // Eg. getLanguage()                = "en-us"
  //     getLanguage(false)           = "en-us"
  //     getLanguage(false,false)     = "en-us"
  //     getLanguage(false,true)      = "en-us"
  //     getLanguage(true)            = "English"
  //     getLanguage(true,false)      = "English"
  //     getLanguage(true,true)       = "English (en-US)"
  //     getLanguage("Country")       = "USA" (as en-US and not en-GB)
  //     getLanguage("Country",false) = "USA"
  //     getLanguage("Country",true)  = "USA (en-US)"
  // First 2 or 3 letters upto '-' = The language.
  // Last  2 or 3 digits from  '-' = The country (Language only if no '-' in string)
  var returnThis;
  returnThis = navigator.browserLanguage;                   // Internet Explorer and I.E. clones code.
  if(returnThis==undefined) {returnThis=navigator.language} // Netscape and Netscape clones code.
  if(fullName==undefined) {fullName = false;}
  CountryName = false;
  if(isNaN(fullName)){
    if(fullName.toLowerCase()=="country"){
      fullName = true;
      CountryName = true;
    }
  }
  if(fullName==true){
    if(CountryName){
      // - New code, get the country name fron the short language ID.
      var FName = getCountryName(returnThis);
    } else {
      // - Old code, get the full language name.
      var FName = getLanguageName(returnThis);
    }
    if(FName!="" && FName!=undefined){
      if(andShortN==true){
        returnThis = FName+" ("+returnThis+")";
      } else {
        returnThis = FName;
      }
    }
  }
  return returnThis;
}  

function getLanguageName(Index){
  // Get and return the full language name from the language short name or index number.
  // Eg. 'EN'     = 'English'
  //     'en-US'  = 'English'
  //     'en-GB'  = 'English'
  //     Index 30 = 'English'
  var retThis = "";
  if(CountryName==undefined) {CountryName=false;}
  if(isNaN(Index)){
    // Get from short name.
    // Convert string upto '-' to lower case and string from '-' to upper case. (Eg. en-US)
    // This will stop a search for 'ar' (Arabic) finding a match at 'es-AR' (Argentina)
    Index = Index.toLowerCase().substring(0,(Index+"-").indexOf("-"))+Index.substring((Index+"-").indexOf("-")).toUpperCase();
    // If there is no '-' in the string, then add one to the end,
    // so that 'en' will be found as well as 'en-us', 'en-uk' etc...
    if(Index.indexOf("-")<0) {Index=Index+"-"}
  } else {
    // Get from index number.
    // Convert this number into a string, else Index.substring() will cause an error.
    Index = Index.toString();
  }
  // For list of country IDs see; http://www.smartertools.com/forums/t/12593.aspx
  // or                           http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.71).aspx
  // or                           http://msdn.microsoft.com/en-us/library/cc230847(PROT.13).aspx
  // or                           http://www.mathguide.de/info/tools/languagecode.html
  // Some countries added. Eg. 'mt' or 'mt-MT' = Maltese etc.

  // Start of list.
  // Use ' if(Index==...) {retThis="*SKIP*"} ' to remove item without renumbering the full list.
  // You may need to reload the page and not just refresh it, if you add or remove a "*SKIP*"
  // if(Index== 0) {retThis="*SKIP*"}
  // Start of list.

if((Index==0) && (Index!="0"))                 {Index=-1;}
if(Index==  0 || Index.substring(0,3)=="ab-")  {retThis="Abkhazian";}
if(Index==  1 || Index.substring(0,3)=="aa-")  {retThis="Afar";}
if(Index==  2 || Index.substring(0,3)=="af-")  {retThis="Afrikaans";}
if(Index==  3 || Index.substring(0,3)=="sq-")  {retThis="Albania";}
if(Index==  4 || Index.substring(0,3)=="am-")  {retThis="Amharic";}
if(Index==  5 || Index.substring(0,3)=="ar-")  {retThis="Arabic";}
if(Index==  6 || Index.substring(0,3)=="hy-")  {retThis="Armenian";}
if(Index==  7 || Index.substring(0,3)=="as-")  {retThis="Assamese";}
if(Index==  8 || Index.substring(0,3)=="ay-")  {retThis="Aymara";}
if(Index==  9 || Index.substring(0,3)=="az-")  {retThis="Azerbaijani";}
if(Index== 10 || Index.substring(0,3)=="ba-")  {retThis="Bashkir";}
if(Index== 11 || Index.substring(0,3)=="eu-")  {retThis="Basque";}
if(Index== 12 || Index.substring(0,3)=="be-")  {retThis="Belarusian";}
if(Index== 13 || Index.substring(0,3)=="bn-")  {retThis="Bengali";}
if(Index== 14 || Index.substring(0,3)=="dz-")  {retThis="Bhutani";}
if(Index== 15 || Index.substring(0,3)=="bh-")  {retThis="Bihari";}
if(Index== 16 || Index.substring(0,3)=="bi-")  {retThis="Bislama";}
if(Index== 17 || Index.substring(0,3)=="br-")  {retThis="Breton";}
if(Index== 18 || Index.substring(0,3)=="bg-")  {retThis="Bulgarian";}
if(Index== 19 || Index.substring(0,3)=="my-")  {retThis="Burmese";}
if(Index== 20 || Index.substring(0,3)=="be-")  {retThis="Byelorussian";}
if(Index== 21 || Index.substring(0,3)=="km-")  {retThis="Cambodian";}
if(Index== 22 || Index.substring(0,3)=="ca-")  {retThis="Catalan";}
if(Index== 23 || Index.substring(0,3)=="zh-")  {retThis="Chinese";}
if(Index== 24 || Index.substring(0,3)=="co-")  {retThis="Corsican";}
if(Index== 25 || Index.substring(0,3)=="hr-")  {retThis="Croatian";}
if(Index== 26 || Index.substring(0,3)=="cs-")  {retThis="Czech";}
if(Index== 27 || Index.substring(0,3)=="da-")  {retThis="Danish";}
if(Index== 28 || Index.substring(0,4)=="div-") {retThis="Dhivehi";}
if(Index== 29 || Index.substring(0,3)=="nl-")  {retThis="Dutch";}
if(Index== 30 || Index.substring(0,3)=="en-")  {retThis="English";}
if(Index== 31 || Index.substring(0,3)=="eo-")  {retThis="Esperanto";}
if(Index== 32 || Index.substring(0,3)=="et-")  {retThis="Estonian";}
if(Index== 33 || Index.substring(0,3)=="fo-")  {retThis="Faeroese";}
if(Index== 34 || Index.substring(0,3)=="fa-")  {retThis="Farsi";}
if(Index== 35 || Index.substring(0,4)=="fil-") {retThis="Filipino";}
if(Index== 36 || Index.substring(0,3)=="fj-")  {retThis="Fiji";}
if(Index== 37 || Index.substring(0,3)=="fi-")  {retThis="Finnish";}
if(Index== 38 || Index.substring(0,3)=="fr-")  {retThis="French";}
if(Index== 39 || Index.substring(0,3)=="fy-")  {retThis="Frisian";}
if(Index== 40)                                 {retThis="Gaelic (Irish or Scottish)";}
// Note;  ga-IE (Irish) and  gd-?? (Scotish).
if(Index== 41 || Index.substring(0,3)=="gl-")  {retThis="Galician";}
if(Index== 42 || Index.substring(0,3)=="ka-")  {retThis="Georgian";}
if(Index== 43 || Index.substring(0,3)=="de-")  {retThis="German";}
if(Index== 44 || Index.substring(0,3)=="el-")  {retThis="Greek";}
if(Index== 45 || Index.substring(0,3)=="kl-")  {retThis="Greenlandic";}
if(Index== 46 || Index.substring(0,3)=="gn-")  {retThis="Guarani";}
if(Index== 47 || Index.substring(0,3)=="gu-")  {retThis="Gujarati";}
if(Index== 48 || Index.substring(0,3)=="ha-")  {retThis="Hausa";}
if(Index== 49 || Index.substring(0,3)=="he-")  {retThis="Hebrew";}
if(Index== 50 || Index.substring(0,3)=="hi-")  {retThis="Hindi";}
if(Index== 51 || Index.substring(0,3)=="hu-")  {retThis="Hungarian";}
if(Index== 52 || Index.substring(0,3)=="is-")  {retThis="Icelandic";}
if(Index== 53 || Index.substring(0,3)=="id-")  {retThis="Indonesian";}
if(Index== 54 || Index.substring(0,3)=="ia-")  {retThis="Interlingua";}
if(Index== 55 || Index.substring(0,3)=="ie-")  {retThis="Interlingue";}
if(Index== 56 || Index.substring(0,3)=="ik-")  {retThis="Inupiak";}
if(Index== 57 || Index.substring(0,3)=="iu-")  {retThis="Inuktitut (Eskimo)";}
if(Index== 58 || Index.substring(0,3)=="ga-" || Index.substring(0,4)=="gle-")  {retThis="Irish ~ Gaelic";}
if(Index== 59 || Index.substring(0,3)=="it-")  {retThis="Italian";}
if(Index== 60 || Index.substring(0,3)=="ja-")  {retThis="Japanese";}
if(Index== 61 || Index.substring(0,3)=="jw-")  {retThis="Javanese";}
if(Index== 62)                                 {retThis="Jewish";}
if(Index== 63 || Index.substring(0,3)=="kn-")  {retThis="Kannada";}
if(Index== 64 || Index.substring(0,3)=="ks-")  {retThis="Kashmiri";}
if(Index== 65 || Index.substring(0,3)=="kk-")  {retThis="Kazakh";}
if(Index== 66 || Index.substring(0,3)=="rw-")  {retThis="Kinyarwanda";}
if(Index== 67 || Index.substring(0,3)=="ky-")  {retThis="Kirghiz";}
if(Index== 68 || Index.substring(0,3)=="rn-")  {retThis="Kirundi";}
if(Index== 69 || Index.substring(0,4)=="kok-") {retThis="Konkani";}
if(Index== 70 || Index.substring(0,3)=="ko-")  {retThis="Korean";}
if(Index== 71 || Index.substring(0,3)=="ku-")  {retThis="Kurdish";}
if(Index== 72 || Index.substring(0,3)=="ky-")  {retThis="Kyrgyz";}
if(Index== 73 || Index.substring(0,3)=="lo-")  {retThis="Laothian";}
if(Index== 74 || Index.substring(0,3)=="la-")  {retThis="Latin";}
if(Index== 75 || Index.substring(0,3)=="lv-")  {retThis="Latvian / Lettish";}
if(Index== 76 || Index.substring(0,3)=="ln-")  {retThis="Lingala";}
if(Index== 77 || Index.substring(0,3)=="lt-")  {retThis="Lithuanian";}
if(Index== 78 || Index.substring(0,3)=="mk-")  {retThis="Macedonian";}
if(Index== 79 || Index.substring(0,3)=="mg-")  {retThis="Malagasy";}
if(Index== 80 || Index.substring(0,3)=="ms-")  {retThis="Malay";}
if(Index== 81 || Index.substring(0,3)=="mt-")  {retThis="Maltese";}
if(Index== 82 || Index.substring(0,3)=="mi-")  {retThis="Maori";}
if(Index== 83 || Index.substring(0,3)=="mr-")  {retThis="Marathi";}
if(Index== 84 || Index.substring(0,3)=="mo-")  {retThis="Moldavian";}
if(Index== 85 || Index.substring(0,3)=="mn-")  {retThis="Mongolian";}
if(Index== 86 || Index.substring(0,3)=="na-")  {retThis="Mongolian";}
if(Index== 87 || Index.substring(0,3)=="ne-")  {retThis="Nepali";}
if(Index== 88 || Index.substring(0,3)=="no-")  {retThis="Norwegian";}
if(Index== 89 || Index.substring(0,3)=="oc-")  {retThis="Occitan";}
if(Index== 90 || Index.substring(0,3)=="or-")  {retThis="Oriya";}
if(Index== 91 || Index.substring(0,3)=="ps-")  {retThis="Pashto / Pushto";}
if(Index== 92 || Index.substring(0,3)=="fa-")  {retThis="Persian";}
if(Index== 93 || Index.substring(0,3)=="pl-")  {retThis="Polish";}
if(Index== 94 || Index.substring(0,3)=="pt-")  {retThis="Portuguese";}
if(Index== 95 || Index.substring(0,3)=="pa-")  {retThis="Punjabi";}
if(Index== 96 || Index.substring(0,3)=="qu-")  {retThis="Quechua";}
if(Index== 97 || Index.substring(0,3)=="rm-")  {retThis="Rhaeto-Romance";}
if(Index== 98 || Index.substring(0,3)=="ro-")  {retThis="Romanian";}
if(Index== 99 || Index.substring(0,3)=="ru-")  {retThis="Russian";}
if(Index==100 || Index.substring(0,3)=="sm-")  {retThis="Samoan";}
if(Index==101 || Index.substring(0,3)=="sg-")  {retThis="Sangro";}
if(Index==102 || Index.substring(0,3)=="sa-")  {retThis="Sanskrit";}
if(Index==103 || Index.substring(0,3)=="gd-" || Index.substring(0,4)=="gla-")  {retThis="Scottish ~ Gaelic";}
if(Index==104 || Index.substring(0,3)=="sr-")  {retThis="Serbian";}
if(Index==105 || Index.substring(0,3)=="sh-")  {retThis="Serbo-Croatian";}
if(Index==106 || Index.substring(0,3)=="st-")  {retThis="Sesotho";}
if(Index==107 || Index.substring(0,3)=="tn-")  {retThis="Setswana";}
if(Index==108 || Index.substring(0,3)=="sn-")  {retThis="Shona";}
if(Index==109 || Index.substring(0,3)=="sd-")  {retThis="Sindhi";}
if(Index==110 || Index.substring(0,3)=="si-")  {retThis="Singhalese";}
if(Index==111 || Index.substring(0,3)=="ss-")  {retThis="Siswati";}
if(Index==112 || Index.substring(0,3)=="sk-")  {retThis="Slovak";}
if(Index==113 || Index.substring(0,3)=="sl-")  {retThis="Slovenian";}
if(Index==114 || Index.substring(0,3)=="so-")  {retThis="Somali";}
if(Index==115 || Index.substring(0,3)=="es-")  {retThis="Spanish";}
if(Index==116 || Index.substring(0,3)=="sw-")  {retThis="Swahili";}
if(Index==117 || Index.substring(0,3)=="sv-")  {retThis="Swedish ";}
if(Index==118 || Index.substring(0,4)=="syr-") {retThis="Syriac";}
if(Index==119 || Index.substring(0,3)=="tl-")  {retThis="Tagalog";}
if(Index==120 || Index.substring(0,3)=="tg-")  {retThis="Tajik";}
if(Index==121 || Index.substring(0,3)=="ta-")  {retThis="Tamil";}
if(Index==122 || Index.substring(0,3)=="tt-")  {retThis="Tatar";}
if(Index==123 || Index.substring(0,3)=="te-")  {retThis="Tegulu";}
if(Index==124 || Index.substring(0,3)=="th-")  {retThis="Thai";}
if(Index==125 || Index.substring(0,3)=="bo-")  {retThis="Tibetan";}
if(Index==126 || Index.substring(0,3)=="ti-")  {retThis="Tigrinya";}
if(Index==127 || Index.substring(0,3)=="to-")  {retThis="Tonga";}
if(Index==128 || Index.substring(0,3)=="ts-")  {retThis="Tsonga";}
if(Index==129 || Index.substring(0,3)=="tr-")  {retThis="Turkish";}
if(Index==130 || Index.substring(0,3)=="tk-")  {retThis="Turkmen";}
if(Index==131 || Index.substring(0,3)=="tw-")  {retThis="Twi";}
if(Index==132 || Index.substring(0,3)=="ug-")  {retThis="Uigur";}
if(Index==131 || Index.substring(0,3)=="uk-")  {retThis="Ukrainian";}
if(Index==132 || Index.substring(0,3)=="ur-")  {retThis="Urdu";}
if(Index==133 || Index.substring(0,3)=="uz-")  {retThis="Uzbek";}
if(Index==134 || Index.substring(0,3)=="vi-")  {retThis="Vietnamese";}
if(Index==135 || Index.substring(0,3)=="vo-")  {retThis="Volapuk";}
if(Index==136 || Index.substring(0,3)=="cy-")  {retThis="Welsh / Cymraeg";}
//                cy or cy-?? = Welsh in Wales
//                      en-?? = English in Wales
if(Index==137 || Index.substring(0,3)=="wo-")  {retThis="Wolof";}
if(Index==138 || Index.substring(0,3)=="xh-")  {retThis="Xhosa";}
if(Index==139 || Index.substring(0,3)=="yi-" || Index.substring(0,4)=="yid-")  {retThis="Yiddish";}
if(Index==140 || Index.substring(0,3)=="yo-")  {retThis="Yoruba";}
if(Index==141 || Index.substring(0,3)=="za-")  {retThis="Zhuang";}
if(Index==142 || Index.substring(0,3)=="zu-")  {retThis="Zulu";}

// if(Index==143 || Index.substring(0,3)=="**-")  {retThis="***********";}

/*
if(Index==155 || Index.substring(0,3)=="")     {retThis="";}
if(Index==1?? || Index.substring(0,3)=="**-")  {retThis="***********";}
if(Index==1?? || Index.substring(0,3)=="**-")  {retThis="***********";}
if(Index==1?? || Index.substring(0,3)=="**-")  {retThis="***********";}
if(Index==1?? || Index.substring(0,3)=="**-")  {retThis="***********";}
*/



  // End of list.
  
  return retThis;
}
function getCountryName(Index){
  // Get and return the country name from the language short name or index number.
  // This function was added on 13/04/2010 - 4:45pm bst
  // Eg. 'EN'     = 'England' (and not English)
  //     'en-US'  = 'USA      (and not English)
  //     'en-GB'  = 'England' (and not English)
  //     Index 30 = 'England'
  var retThis = "";
  if(Index==undefined) {Index="??";}
  if(isNaN(Index)){
    // Get from short name.
    // Format is 'll-cc' when 'll' = the language and 'cc' = the country.
    // If there is no 'cc' then get it from 'll'
    // Eg 'en'    = English so = England (but could be USA, Austrila etc.)
    //    'en-GB' = England
    //    'en-US' = USA
    // First get the language name as the country name may not be listed or found here.
    retThis = getLanguageName(Index);
    // If language was not found then
    if(retThis==""){
      // Convert string upto '-' to lower case and string from '-' to upper case. (Eg. en-US)
      // This will stop a search for 'ar' (Arabic) finding a match at 'es-AR' (Argentina)
      Index = Index.toLowerCase().substring(0,(Index+"-").indexOf("-"))+Index.substring((Index+"-").indexOf("-")).toUpperCase();
      retThis = Index;
    }
    Index = Index.substring((Index+"-").indexOf("-")+1).toUpperCase();
  } else {
    // Get from index number.
    // Convert this number into a string, else Index.substring() will cause an error.
    Index = Index.toString();
    lngID = "";
    conID = "";
  }
  // For list of country IDs see; http://www.smartertools.com/forums/t/12593.aspx
  // or                           http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.71).aspx
  // or                           http://msdn.microsoft.com/en-us/library/cc230847(PROT.13).aspx
  // or                           http://www.mathguide.de/info/tools/languagecode.html
// http://www.theodora.com/country_digraphs.html
  // Some countries added. Eg. 'mt' or 'mt-MT' = Maltese etc.

  // Start of list.
  // Use ' if(Index==...) {retThis="*SKIP*"} ' to remove item without renumbering the full list.
  // You may need to reload the page and not just refresh it, if you add or remove a "*SKIP*"
  // if(Index== 0) {retThis="*SKIP*"}
  // Start of list.

if((Index==0) && (Index!="0"))  {Index=-1;}
if(Index==  0 || Index=="AC")   {retThis="Ascension Island";}
if(Index==  1 || Index=="AD")   {retThis="Andorra";}
if(Index==  2 || Index=="AE")   {retThis="United Arab Emirates";}
if(Index==  3 || Index=="AF")   {retThis="Afghanistan";}
if(Index==  4 || Index=="AG")   {retThis="Antigua and Barbuda";}
if(Index==  5 || Index=="AI")   {retThis="Anguilla";}
if(Index==  6 || Index=="AL")   {retThis="Albania";}
if(Index==  7 || Index=="AM")   {retThis="Armenia";}
if(Index==  8 || Index=="AN")   {retThis="Netherlands Antilles";}
if(Index==  9 || Index=="AO")   {retThis="Angola";}
if(Index== 10 || Index=="AQ")   {retThis="Antarctica";}
if(Index== 11 || Index=="AR")   {retThis="Argentina ";}
if(Index== 12 || Index=="AS")   {retThis="American Samoa";}
if(Index== 13 || Index=="AT")   {retThis="Austria";}
if(Index== 14 || Index=="AU")   {retThis="Australia";}
if(Index== 15 || Index=="AW")   {retThis="Aruba";}
if(Index== 16 || Index=="AX")   {retThis="Aland Islands";}
if(Index== 17 || Index=="AZ")   {retThis="Azerbaijan";}
if(Index== 18 || Index=="BA")   {retThis="Bosnia and Herzegovina";}
if(Index== 19 || Index=="BB")   {retThis="Barbados";}
if(Index== 20 || Index=="BD")   {retThis="Bangladesh";}
if(Index== 21 || Index=="BE")   {retThis="Belgium";}
if(Index== 22 || Index=="BF")   {retThis="Burkina Faso";}
if(Index== 23 || Index=="BG")   {retThis="Bulgaria";}
if(Index== 24 || Index=="BH")   {retThis="Bahrain";}
if(Index== 25 || Index=="BI")   {retThis="Burundi";}
if(Index== 26 || Index=="BJ")   {retThis="Benin";}
if(Index== 27 || Index=="BM")   {retThis="Bermuda";}
if(Index== 28 || Index=="BN")   {retThis="Brunei Darussalam";}
if(Index== 29 || Index=="BO")   {retThis="Bolivia";}
if(Index== 30 || Index=="BR")   {retThis="Brazil";}
if(Index== 31 || Index=="BS")   {retThis="Bahamas";}
if(Index== 32 || Index=="BT")   {retThis="Bhutan";}
if(Index== 33 || Index=="BV")   {retThis="Bouvet Island";}
if(Index== 34 || Index=="BW")   {retThis="Botswana";}
if(Index== 35 || Index=="BY")   {retThis="Belarus";}
if(Index== 36 || Index=="BZ")   {retThis="Belize";}
if(Index== 37 || Index=="CA")   {retThis="Canada";}
if(Index== 38 || Index=="CC")   {retThis="Cocos (Keeling) Islands";}
if(Index== 39 || Index=="CD")   {retThis="Congo, Democratic Republic";}
if(Index== 40 || Index=="CF")   {retThis="Central African Republic";}
if(Index== 41 || Index=="CG")   {retThis="Congo";}
if(Index== 42 || Index=="CH")   {retThis="Switzerland";}
if(Index== 43 || Index=="CI")   {retThis="Cote D'Ivoire (Ivory Coast)";}
if(Index== 44 || Index=="CK")   {retThis="Cook Islands";}
if(Index== 45 || Index=="CL")   {retThis="Chile";}
if(Index== 46 || Index=="CM")   {retThis="Cameroon";}
if(Index== 47 || Index=="CN")   {retThis="China";}
if(Index== 48 || Index=="CO")   {retThis="Colombia";}
if(Index== 49 || Index=="CR")   {retThis="Costa Rica";}
if(Index== 50 || Index=="CS")   {retThis="Czechoslovakia (former)";}
if(Index== 51 || Index=="CU")   {retThis="Cuba";}
if(Index== 52 || Index=="CV")   {retThis="Cape Verde";}
if(Index== 53 || Index=="CX")   {retThis="Christmas Island";}
if(Index== 54 || Index=="CY")   {retThis="Cyprus";}
if(Index== 55 || Index=="CZ")   {retThis="Czech Republic";}
if(Index== 56 || Index=="DE")   {retThis="Germany";}
if(Index== 57 || Index=="DJ")   {retThis="Djibouti";}
if(Index== 58 || Index=="DK")   {retThis="Denmark";}
if(Index== 59 || Index=="DM")   {retThis="Dominica";}
if(Index== 60 || Index=="DO")   {retThis="Dominican Republic";}
if(Index== 61 || Index=="DZ")   {retThis="Algeria";}
if(Index== 62 || Index=="EC")   {retThis="Ecuador";}
if(Index== 63 || Index=="EE")   {retThis="Estonia";}
if(Index== 64 || Index=="EG")   {retThis="Egypt";}
if(Index== 65 || Index=="EH")   {retThis="Western Sahara";}
if(Index== 66 || Index=="ER")   {retThis="Eritrea";}
if(Index== 67 || Index=="ES")   {retThis="Spain";}
if(Index== 68 || Index=="ET")   {retThis="Ethiopia";}
if(Index== 69 || Index=="FI")   {retThis="Finland";}
if(Index== 70 || Index=="FJ")   {retThis="Fiji";}
if(Index== 71 || Index=="FK")   {retThis="Falkland Islands (Malvinas)";}
if(Index== 72 || Index=="FM")   {retThis="Micronesia";}
if(Index== 73 || Index=="FO")   {retThis="Faroe Islands";}
if(Index== 74 || Index=="FR")   {retThis="France";}
if(Index== 75 || Index=="FX")   {retThis="France, Metropolitan";}
if(Index== 76 || Index=="GA")   {retThis="Gabon";}
if(Index== 77 || Index=="GB")   {retThis="Great Britain (UK)";}
if(Index== 78 || Index=="GD")   {retThis="Grenada";}
if(Index== 79 || Index=="GE")   {retThis="Georgia";}
if(Index== 80 || Index=="GF")   {retThis="French Guiana";}
if(Index== 81 || Index=="GG")   {retThis="Guernsey";}
if(Index== 82 || Index=="GH")   {retThis="Ghana";}
if(Index== 83 || Index=="GI")   {retThis="Gibraltar";}
if(Index== 84 || Index=="GL")   {retThis="Greenland";}
if(Index== 85 || Index=="GM")   {retThis="Gambia";}
if(Index== 86 || Index=="GN")   {retThis="Guinea";}
if(Index== 87 || Index=="GP")   {retThis="Guadeloupe";}
if(Index== 88 || Index=="GQ")   {retThis="Equatorial Guinea";}
if(Index== 89 || Index=="GR")   {retThis="Greece";}
if(Index== 90 || Index=="GS")   {retThis="South Georgia and South Sandwich Islands";}
if(Index== 91 || Index=="GT")   {retThis="Guatemala";}
if(Index== 92 || Index=="GU")   {retThis="Guam";}
if(Index== 93 || Index=="GW")   {retThis="Guinea-Bissau";}
if(Index== 94 || Index=="GY")   {retThis="Guyana";}
if(Index== 95 || Index=="HK")   {retThis="Hong Kong";}
if(Index== 96 || Index=="HM")   {retThis="Heard and McDonald Islands";}
if(Index== 97 || Index=="HN")   {retThis="Honduras";}
if(Index== 98 || Index=="HR")   {retThis="Croatia (Hrvatska)";}
if(Index== 99 || Index=="HT")   {retThis="Haiti";}
if(Index==100 || Index=="HU")   {retThis="Hungary";}
if(Index==101 || Index=="ID")   {retThis="Indonesia";}
if(Index==102 || Index=="IE")   {retThis="Ireland";}
if(Index==103 || Index=="IL")   {retThis="Israel";}
if(Index==104 || Index=="IM")   {retThis="Isle of Man";}
if(Index==105 || Index=="IN")   {retThis="India";}
if(Index==106 || Index=="IO")   {retThis="British Indian Ocean Territory";}
if(Index==107 || Index=="IQ")   {retThis="Iraq";}
if(Index==108 || Index=="IR")   {retThis="Iran";}
if(Index==109 || Index=="IS")   {retThis="Iceland";}
if(Index==110 || Index=="IT")   {retThis="Italy";}
if(Index==111 || Index=="JE")   {retThis="Jersey";}
if(Index==112 || Index=="JM")   {retThis="Jamaica";}
if(Index==113 || Index=="JO")   {retThis="Jordan";}
if(Index==114 || Index=="JP")   {retThis="Japan";}
if(Index==115 || Index=="KE")   {retThis="Kenya";}
if(Index==116 || Index=="KG")   {retThis="Kyrgyzstan";}
if(Index==117 || Index=="KH")   {retThis="Cambodia";}
if(Index==118 || Index=="KI")   {retThis="Kiribati";}
if(Index==119 || Index=="KM")   {retThis="Comoros";}
if(Index==120 || Index=="KN")   {retThis="Saint Kitts and Nevis";}
if(Index==121 || Index=="KP")   {retThis="Korea (North)";}
if(Index==122 || Index=="KR")   {retThis="Korea (South)";}
if(Index==123 || Index=="KW")   {retThis="Kuwait";}
if(Index==124 || Index=="KY")   {retThis="Cayman Islands";}
if(Index==125 || Index=="KZ")   {retThis="Kazakhstan";}
if(Index==126 || Index=="LA")   {retThis="Laos";}
if(Index==127 || Index=="LB")   {retThis="Lebanon";}
if(Index==128 || Index=="LC")   {retThis="Saint Lucia";}
if(Index==129 || Index=="LI")   {retThis="Liechtenstein";}
if(Index==130 || Index=="LK")   {retThis="Sri Lanka";}
if(Index==131 || Index=="LR")   {retThis="Liberia";}
if(Index==132 || Index=="LS")   {retThis="Lesotho";}
if(Index==133 || Index=="LT")   {retThis="Lithuania";}
if(Index==134 || Index=="LU")   {retThis="Luxembourg";}
if(Index==135 || Index=="LV")   {retThis="Latvia";}
if(Index==136 || Index=="LY")   {retThis="Libya";}
if(Index==137 || Index=="MA")   {retThis="Morocco";}
if(Index==138 || Index=="MC")   {retThis="Monaco";}
if(Index==139 || Index=="MD")   {retThis="Moldova";}
if(Index==140 || Index=="ME")   {retThis="Montenegro";}
if(Index==141 || Index=="MG")   {retThis="Madagascar";}
if(Index==142 || Index=="MH")   {retThis="Marshall Islands";}
if(Index==143 || Index=="MK")   {retThis="F.Y.R.O.M. (Macedonia)";}
if(Index==144 || Index=="ML")   {retThis="Mali";}
if(Index==145 || Index=="MM")   {retThis="Myanmar";}
if(Index==146 || Index=="MN")   {retThis="Mongolia";}
if(Index==147 || Index=="MO")   {retThis="Macau";}
if(Index==148 || Index=="MP")   {retThis="Northern Mariana Islands";}
if(Index==149 || Index=="MQ")   {retThis="Martinique";}
if(Index==150 || Index=="MR")   {retThis="Mauritania";}
if(Index==151 || Index=="MS")   {retThis="Montserrat ";}
if(Index==152 || Index=="MT")   {retThis="Malta";}
if(Index==153 || Index=="MU")   {retThis="Mauritius";}
if(Index==154 || Index=="MV")   {retThis="Maldives";}
if(Index==155 || Index=="MW")   {retThis="Malawi";}
if(Index==156 || Index=="MX")   {retThis="Mexico";}
if(Index==157 || Index=="MY")   {retThis="Malaysia";}
if(Index==158 || Index=="MZ")   {retThis="Mozambique";}
if(Index==159 || Index=="NA")   {retThis="Namibia";}
if(Index==160 || Index=="NC")   {retThis="New Caledonia";}
if(Index==161 || Index=="NE")   {retThis="Niger";}
if(Index==162 || Index=="NF")   {retThis="Norfolk Island";}
if(Index==163 || Index=="NG")   {retThis="Nigeria";}
if(Index==164 || Index=="NI")   {retThis="Nicaragua";}
if(Index==165 || Index=="NL")   {retThis="Netherlands";}
if(Index==166 || Index=="NO")   {retThis="Norway";}
if(Index==167 || Index=="NP")   {retThis="Nepal";}
if(Index==168 || Index=="NR")   {retThis="Nauru";}
if(Index==169 || Index=="NT")   {retThis="Neutral Zone";}
if(Index==170 || Index=="NU")   {retThis="Niue";}
if(Index==171 || Index=="NZ")   {retThis="New Zealand (Aotearoa)";}
if(Index==172 || Index=="OM")   {retThis="Oman";}
if(Index==173 || Index=="PA")   {retThis="Panama";}
if(Index==174 || Index=="PE")   {retThis="Peru";}
if(Index==175 || Index=="PF")   {retThis="French Polynesia";}
if(Index==176 || Index=="PG")   {retThis="Papua New Guinea";}
if(Index==177 || Index=="PH")   {retThis="Philippines";}
if(Index==178 || Index=="PK")   {retThis="Pakistan";}
if(Index==179 || Index=="PL")   {retThis="Poland";}
if(Index==180 || Index=="PM")   {retThis="St. Pierre and Miquelon";}
if(Index==181 || Index=="PN")   {retThis="Pitcairn";}
if(Index==182 || Index=="PR")   {retThis="Puerto Rico";}
if(Index==183 || Index=="PS")   {retThis="Palestinian Territory, Occupied";}
if(Index==184 || Index=="PT")   {retThis="Portugal";}
if(Index==185 || Index=="PW")   {retThis="Palau";}
if(Index==186 || Index=="PY")   {retThis="Paraguay";}
if(Index==187 || Index=="QA")   {retThis="Qatar";}
if(Index==188 || Index=="RE")   {retThis="Reunion";}
if(Index==189 || Index=="RO")   {retThis="Romania";}
if(Index==190 || Index=="RS")   {retThis="Serbia";}
if(Index==191 || Index=="RU")   {retThis="Russian Federation";}
if(Index==192 || Index=="RW")   {retThis="Rwanda";}
if(Index==193 || Index=="SA")   {retThis="Saudi Arabia";}
if(Index==194 || Index=="SB")   {retThis="Solomon Islands";}
if(Index==195 || Index=="SC")   {retThis="Seychelles ";}
if(Index==196 || Index=="SD")   {retThis="Sudan";}
if(Index==197 || Index=="SE")   {retThis="Sweden";}
if(Index==198 || Index=="SG")   {retThis="Singapore";}
if(Index==199 || Index=="SH")   {retThis="St. Helena";}
if(Index==200 || Index=="SI")   {retThis="Slovenia";}
if(Index==201 || Index=="SJ")   {retThis="Svalbard & Jan Mayen Islands";}
if(Index==202 || Index=="SK")   {retThis="Slovak Republic";}
if(Index==203 || Index=="SL")   {retThis="Sierra Leone";}
if(Index==204 || Index=="SM")   {retThis="San Marino";}
if(Index==205 || Index=="SN")   {retThis="Senegal";}
if(Index==206 || Index=="SO")   {retThis="Somalia";}
if(Index==207 || Index=="SR")   {retThis="Suriname";}
if(Index==208 || Index=="ST")   {retThis="Sao Tome and Principe";}
if(Index==209 || Index=="SU")   {retThis="USSR (former)";}
if(Index==210 || Index=="SV")   {retThis="El Salvador";}
if(Index==211 || Index=="SY")   {retThis="Syria";}
if(Index==212 || Index=="SZ")   {retThis="Swaziland";}
if(Index==213 || Index=="TC")   {retThis="Turks and Caicos Islands";}
if(Index==214 || Index=="TD")   {retThis="Chad";}
if(Index==215 || Index=="TF")   {retThis="French Southern Territories ";}
if(Index==216 || Index=="TG")   {retThis="Togo";}
if(Index==217 || Index=="TH")   {retThis="Thailand";}
if(Index==218 || Index=="TJ")   {retThis="Tajikistan";}
if(Index==219 || Index=="TK")   {retThis="Tokelau";}
if(Index==220 || Index=="TM")   {retThis="Turkmenistan";}
if(Index==221 || Index=="TN")   {retThis="Tunisia";}
if(Index==222 || Index=="TO")   {retThis="Tonga";}
if(Index==223 || Index=="TP")   {retThis="East Timor";}
if(Index==224 || Index=="TR")   {retThis="Turkey";}
if(Index==225 || Index=="TT")   {retThis="Trinidad and Tobago";}
if(Index==226 || Index=="TV")   {retThis="Tuvalu";}
if(Index==227 || Index=="TW")   {retThis="Taiwan";}
if(Index==228 || Index=="TZ")   {retThis="Tanzania";}
if(Index==229 || Index=="UA")   {retThis="Ukraine";}
if(Index==230 || Index=="UG")   {retThis="Uganda";}
if(Index==231 || Index=="UK")   {retThis="United Kingdom";}
if(Index==232 || Index=="UM")   {retThis="US Minor Outlying Islands";}
if(Index==233 || Index=="US")   {retThis="United States";}
if(Index==234 || Index=="UY")   {retThis="Uruguay";}
if(Index==235 || Index=="UZ")   {retThis="Uzbekistan";}
if(Index==236 || Index=="VA")   {retThis="Vatican City State (Holy See)";}
if(Index==237 || Index=="VC")   {retThis="Saint Vincent & the Grenadines";}
if(Index==238 || Index=="VE")   {retThis="Venezuela";}
if(Index==239 || Index=="VG")   {retThis="British Virgin Islands";}
if(Index==240 || Index=="VI")   {retThis="Virgin Islands (U.S.)";}
if(Index==241 || Index=="VN")   {retThis="Viet Nam";}
if(Index==242 || Index=="VU")   {retThis="Vanuatu";}
if(Index==243 || Index=="WF")   {retThis="Wallis and Futuna Islands";}
if(Index==244 || Index=="WS")   {retThis="Samoa";}
if(Index==245 || Index=="YE")   {retThis="Yemen";}
if(Index==246 || Index=="YT")   {retThis="Mayotte";}
if(Index==247 || Index=="YU")   {retThis="Yugoslavia (former)";}
if(Index==248 || Index=="ZA")   {retThis="South Africa";}
if(Index==249 || Index=="ZM")   {retThis="Zambia";}
if(Index==250 || Index=="ZR")   {retThis="Zaire";}
if(Index==251 || Index=="ZW")   {retThis="Zimbabwe";} // ------- ok up to here ------------
if(Index==252 || Index=="##")   {retThis="***********";}
if(Index==253 || Index=="##")   {retThis="***********";}
if(Index==254 || Index=="##")   {retThis="***********";}
if(Index==255 || Index=="##")   {retThis="***********";}
if(Index==256 || Index=="##")   {retThis="***********";}
if(Index==257 || Index=="##")   {retThis="***********";}
if(Index==258 || Index=="##")   {retThis="***********";}
if(Index==259 || Index=="##")   {retThis="***********";}
if(Index==260 || Index=="##")   {retThis="***********";}

if(Index==300 || Index=="######")  {retThis="***********";} // ----- NON-COUNTRY INTERNET DOMAINS -----
if(Index==301 || Index=="ARPA")    {retThis="Old style Arpanet";}
if(Index==302 || Index=="AERO")    {retThis="Air-transport industry";}
if(Index==303 || Index=="BIZ")     {retThis="Business";}
if(Index==304 || Index=="CAT")     {retThis="Catalan language or related culture";}
if(Index==305 || Index=="COOP")    {retThis="COOP limited cooperatives";}
if(Index==306 || Index=="COM")     {retThis="Commercial/Company";}
if(Index==307 || Index=="EDU")     {retThis="Educational (US)";}
if(Index==308 || Index=="EU")      {retThis="European Union";}
if(Index==309 || Index=="GOV")     {retThis="Government (US)";}
if(Index==310 || Index=="INFO")    {retThis="Information";}
if(Index==311 || Index=="INT")     {retThis="International Organiza";}
if(Index==312 || Index=="JOBS")    {retThis="Companies";}
if(Index==313 || Index=="MIL")     {retThis="US Military";}
if(Index==314 || Index=="MOBI")    {retThis="Mobile-compatible site";}
if(Index==315 || Index=="MUSEUM")  {retThis="Museum";}
if(Index==316 || Index=="NAME")    {retThis="Individuals, by name";}
if(Index==317 || Index=="NATO")    {retThis="N.A.T.O. (North Atlantic Treaty Organization)";}
if(Index==318 || Index=="NET")     {retThis="Network";}
if(Index==319 || Index=="ORG")     {retThis="Non-Profit Organization";}
if(Index==320 || Index=="PRO")     {retThis="Doctors, attorneys or public accountants";}
if(Index==321 || Index=="TRAVEL")  {retThis="Travel and travel-agency related";}
if(Index==322 || Index=="##")      {retThis="***********";}
if(Index==323 || Index=="##")      {retThis="***********";}
if(Index==324 || Index=="##")      {retThis="***********";}
if(Index==325 || Index=="##")      {retThis="***********";}
if(Index==326 || Index=="##")      {retThis="***********";}
if(Index==327 || Index=="##")      {retThis="***********";}
if(Index==328 || Index=="##")      {retThis="***********";}


/*
if(Index==321 || Index=="##")      {retThis="***********";}
if(Index==321 || Index=="##")      {retThis="***********";}
if(Index==321 || Index=="##")      {retThis="***********";}
if(Index==321 || Index=="##")      {retThis="***********";}
if(Index==321 || Index=="##")      {retThis="***********";}
*/



  // End of list.
  




  return retThis;
}
// -- End of code. --
