var siteStuff = {
  getSiteData: function(s) {
    var t = {};
    if(s == "us") {
      t.site = "us";
      t.language = "us-english";
      t.region = "us";
      t.selling = true;
      t.sourceID = 1;
      t.priceID = 1;
      t.possiblyAvailableShopper = false;
    }
    else if(s == "uk") {
      t.site = "uk";
      t.language = "uk-english";
      t.region = "uk";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 2;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "fr") {
      t.site = "fr";
      t.language = "french";
      t.region = "fr";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 3;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "de") {
      t.site = "de";
      t.language = "german";
      t.region = "de";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 4;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "jp") {
      t.site = "jp";
      t.language = "japanese";
      t.region = "jp";
      t.selling = false;
    }
    else if(s == "at") {
      t.site = "at";
      t.language = "german";
      t.region = "at";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 6;
    }
    else if(s == "be") {
      t.site = "be";
      t.language = "uk-english";
      t.region = "be";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 7;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "ie") {
      t.site = "ie";
      t.language = "uk-english";
      t.region = "ie";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 8;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "nl") {
      t.site = "nl";
      t.language = "uk-english";
      t.region = "nl";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 9;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "kr") {
      t.site = "kr";
      t.language = "korean";
      t.region = "kr";
      t.selling = false;
    }
    else if(s == "it") {
      t.site = "it";
      t.language = "italian";
      t.region = "it";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 11;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "ch") {
      t.site = "ch";
      t.language = "uk-english";
      t.region = "ch";
      t.selling = true;
      t.sourceID = 3;
      t.priceID = 12;
      t.possiblyAvailableShopper = true;
    }
    else if(s == "int") {
      t.site = "int";
      t.language = "uk-english";
      t.region = "int";
      t.selling = false;
    }
    else if(s == "cn") {
      t.site = "cn";
      t.language = "chinese";
      t.region = "cn";
      t.selling = false;
    }
    else if(s == "cn-en") {
      t.site = "cn-en";
      t.language = "uk-english";
      t.region = "cn";
      t.selling = false;
    }
    else if(s == "ca-en") {
      t.site = "ca-en";
      t.language = "us-english";
      t.region = "ca";
      t.selling = true;
      t.sourceID = 1;
      t.priceID = 16;
      t.possiblyAvailableShopper = false;
    }
    else if(s == "ca-fr") {
      t.site = "ca-fr";
      t.language = "french";
      t.region = "ca";
      t.selling = true;
      t.sourceID = 1;
      t.priceID = 16;
      t.possiblyAvailableShopper = false;
    }
    else {
      t = null;
    }
    return t;
  },
  
  getSiteFromCookie: function() {
    var dc = document.cookie;
    var prefix = "site=";
    var begin = dc.indexOf("; " + prefix);
  
    if (begin == -1) {
      begin = dc.indexOf(prefix);
      if (begin != 0) return "int";
    }
    else {
      begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
      end = dc.length;
    }
    var s = unescape(dc.substring(begin + prefix.length, end));
    if(!s) {
      s = "int";
    }
    return s;
  }

};
