document.write('<br>');
document.write('<hr width="50%">');
document.write('<p align=center>');
document.write('<small>&copy; 2010 Hamrick Software<br>');
document.write('</small></p>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');

function foot_tra(res)
{
  if (!res.error && (res.translation.length > 0))
  {
    var id = document.getElementById("repl");

    if (id)
      id.innerHTML = res.translation;
  }
}

function foot_ini()
{
  var id;

  id = document.getElementById("tran");
  if (id)
    google.language.translate(id.innerHTML, "en", tra_lan, foot_tra);
}

function foot_ppl()
{
  var lan = navigator.language ? navigator.language.toLowerCase() : navigator.userLanguage.toLowerCase();

  var cco = lan.substr(0,2);

  if (google.loader.ClientLocation)
    cco = google.loader.ClientLocation.address.country_code;
  else if (lan.length == 5)
    cco = lan.substr(3, 2);
  else if (cco == "en")
    cco = "us";
  else if (cco == "ja")
    cco = "jp";
  else if (cco == "pt")
    cco = "br";
  else if (cco == "zh")
    cco = "cn";
  else if (cco == "sv")
    cco = "se";
  else if (cco == "nb")
    cco = "no";
  else if (cco == "ar")
    cco = "sa";
  else if (cco == "cs")
    cco = "cz";
  else if (cco == "da")
    cco = "dk";
  else if (cco == "ko")
    cco = "kr";
  else if (cco == "el")
    cco = "gr";
  else if (cco == "uk")
    cco = "ua";
  else if (cco == "et")
    cco = "ee";
  else if (cco == "nn")
    cco = "no";

  cco = cco.toUpperCase();

  if ((cco != "US") &&
      (cco != "CA")    )
  {
    var loc = lan.substr(0,2);

    if ((cco == "CA") || (cco == "US"))
    {
      if      (loc == "fr")
        loc = "fr_XC";
      else if (loc == "es")
        loc = "es_XC";
      else if (loc == "zh")
        loc = "zh_XC";
      else
        loc = "en_US";
    }
    else if (cco == "AU")
    {
        loc = "en_AU";
    }
    else if (cco == "GB")
    {
        loc = "en_GB";
    }
    else if (loc == "de")
    {
        loc = "de_DE";
    }
    else if (loc == "nl")
    {
        loc = "nl_NL";
    }
    else if (loc == "fr")
    {
        loc = "fr_FR";
    }
    else if (loc == "zh")
    {
        loc = "zh_CN";
    }
    else if (loc == "es")
    {
        loc = "es_ES";
    }
    else if (loc == "it")
    {
        loc = "it_IT";
    }
    else if (loc == "ja")
    {
        loc = "ja_JP";
    }
    else if (loc == "pl")
    {
        loc = "pl_PL";
    }
    else
    {
        loc = "en_US";
    }

    var id;

    id = document.getElementById("paypal_lis");
    if (id) id.style.display = "block";

    id = document.getElementById("paypal_opt");
    if (id) id.style.display = "block";

    id = document.getElementById("paypal_cco");
    if (id) id.value = cco;

    id = document.getElementById("paypal_loc");
    if (id) id.value = loc;
  }
}

function foot_loa()
{
  if (((location.href.indexOf(".cgi"  ) != -1) ||
       (location.href.indexOf("ackppl") != -1)    ) && (tra_off > 0))
  {
    google.load("language", "1", {"callback" : foot_ini});
  }
  else
  {
    // foot_ppl();
  }
}

// if ((((location.href.indexOf(".cgi"  ) != -1) ||
//       (location.href.indexOf("ackppl") != -1)    ) && (tra_off > 0)) ||
//     (((location.href.indexOf("reg"   ) != -1)    )                 ) ||
//     (((location.href.indexOf("ppl"   ) != -1)    )                 )    )
if ((((location.href.indexOf(".cgi"  ) != -1) ||
      (location.href.indexOf("ackppl") != -1)    ) && (tra_off > 0)))
{
  var s = document.createElement("script");
  s.src = "https://www.google.com/jsapi?callback=foot_loa";
  s.type = "text/javascript";
  document.getElementsByTagName("head")[0].appendChild(s);
}

var pageTracker;

if ("http:" == document.location.protocol)
{
  var s = document.createElement("script");
  s.src = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.") + "google-analytics.com/ga.js";
  s.type = "text/javascript";
  s.onloadDone = false;

  s.onload = function()
  {
    if (!s.onloadDone)
    {
         s.onloadDone = true;

         pageTracker = _gat._getTracker("UA-4497345-1");
         pageTracker._trackPageview();
      }
    };

  s.onreadystatechange = function()
  {
    if ((s.readyState === "loaded"  ) ||
        (s.readyState === "complete")    )
    {
      if (!s.onloadDone)
      {
           s.onloadDone = true;

           pageTracker = _gat._getTracker("UA-4497345-1");
           pageTracker._trackPageview();
      }
    }
  };

  document.getElementsByTagName("head")[0].appendChild(s);
}
