

var settings = {

  /**
   * docrootのPATH
   */
  root_path : '',

  /**
   * TOP:こんなエスエス製薬の製品をご存じですか？
   */
  // XMLのPATH
  top_pickup_xml_path :
    function(){
      return this.root_path+'/product/index.xml';
    },
  // 表示数
  top_picup_count : 3,
  // 説明文の最大文字数
  top_picup_description_length : 70,
  // cookie名
  top_pickup_cookie_name:'pickup',

  /**
   * TOP:新着情報
   */
  // XMLのPATH
  top_news_xml_path :
    function(){
      return this.root_path+'/news/index.xml';
    },
  // TOP新着情報の最大件数
  top_news_count : 5,

  /**
   * グラフのXML
   */
  // XMLのPATH
  voice_xml_path :
    function(){
      return this.root_path+'/voice/voice100715/answer_summary.xml';
    },

  /**
   * 新着情報一覧
   */
  // XMLのPATH
  all_news_xml_path :
    function(){
      return this.top_news_xml_path();
    },
  // 左帯に表示する年度メニュー配列
  news_years : [2009, 2010],

  /**
   * ランチャー
   */
  // XMLのPATH
  product_launcher_xml_path :
    function(){
      return this.root_path+'/product/index.xml';
    },
  product_launcher_all_xml_path :
    function(){
      return this.root_path+'/product/index.xml';
    },
  product_shelf_xml_path :
    function(){
      return this.root_path+'/product/all/';
    },

  /**
   * 製品棚の表示商品
   */
  availItems:[
    ['hc', 'hb', 'hcp', 'hc-drink', 'hcp-ws', 'hcp-dpuv', 'icon-flower2',/* 'alk',*/ 'cutina', 'cutina-cj', 'lbb', 'lmc-g', 'lmc-t', 'nv-ec2000', 'nv-ecc', 'sksyw', 'sksap', 'anna', 'icon-pyonchan1', 'esh-cr',/* 'esh-n',*/ 'atp-bs'],
    ['sc', 'sc-fresh', 'sc-mx', 'sc-king', 'sc-g', 'icon-pyonchan1', 'sc-bee', 'sc-c1000', 'sc-e', 'sc-dxa', 'sc-vq', 'sc-2000', 'sc-l', 'sc-g3000', 'ronpind',/* 'str-v',*/ 'str-s', 'str-k50', 'str-r', 'ysg-k', 'icon-flower1', 'ysg-k50', 'esf-g', 'esfgn', 'hc', 'hecdrink'],
    ['annys', 'icon-flower1', 'anch', 'andr', 'anc', 'ans', 'memoa', 'memokc', 'eveo-t', 'eveo-p', 'eveo-g', 'eveoi-t', 'eveoi-g', 'nsu', 'icon-pyonchan1', 'nsu-t', 'mcv', 'mcv-t']/*,
    ['stea-t', 'stea-c', 'stea-g', 'icon-flower2', 'ste-t', 'icon-pyonchan1', 'ste-g', 'stsokan', 'stsr', 'icon-flower1', 'stw', 'st12', 'stac', 'stg', 'stkn', 'stsshouni', 'atnys12', 'stnyss', 'stbs', 'stkbs', 'stef', 'stef-g', 'stbc12'],
    ['icon-pyonchan1', 'stea-t', 'stea-c', 'stea-g', 'ste-t', 'ste-g', 'stsokan', 'stsr', 'stw', 'st12', 'stac', 'stg', 'stkn', 'stsshouni', 'atnys12', 'stnyss', 'stkbs', 'brtc', 'icon-flower1', 'sttroche', 'stnd', 'eveq', 'evea', 'eve', 'stef', 'stef-g', 'icon-flower2', 'stnd-ex', 'stbc12']*/
  ],
  /**
   * iconの基本PATH
   */
  icons_path :
    function(){
      return this.root_path+'/product_material/images/shelf/';
    },
  /**
   * 新着iconのフルPATH
   */
  new_icon :
    function(){
      return this.icons_path()+'new.png';
    },
  new_icon_style : {
    'margin-left':'auto',
    'margin-right':'auto'
  },
  /**
   * オススメiconのフルPATH
   */
  renew_icon :
    function(){
      return this.icons_path()+'renew.png';
    },
  renew_icon_style : {
    'margin-left':'30px'
//    'margin-right':'auto'
  },

  /**
   * キャラクタアイコン類
   */
  icons:{
    'icon-flower1':'img1.png',
    'icon-flower2':'img2.png',
    'icon-pyonchan1':'img3.png'
  },

  empty_icon : 'empty.png',

  /**
   * キャラアイコンをフルPATHで取得
   */
  get_icon :
    function(icon_name){
      return this.icons_path()+this.icons[icon_name];
    },
  get_empty_icon :
    function(){
      return this.icons_path()+this.empty_icon;
    },

  /**
   * commonをフルPATHで取得
   */
  common_path :
    function(){
      return this.root_path+'/common/';
    },

  // ランチャーのスタイル
  launcher_style : {
    position: "top center",     // アイテムの上に表示する場合
//    position: "center right",   // アイテムの右(表示スペースがなければ左)に表示する場合
    offset: [10,0],
    effect: 'slide'
  },
  launcher_paging_count : 5
};

/**
 * 各種ユーティリティ
 */
var utils = {

  random : function(array, num) {
    var a = array;
    var t = {};
    var r = [];
    var l = a.length;
    var n = num < l ? num : l;
    while (n-- > 0) {
        var i = Math.random() * l | 0;
        r[n] = t[i] || a[i];
        --l;
        t[i] = t[l] || a[l];
    }
    return r;
  }

};
