function itemDisp() {
//  state.innerHTML = "処理中です・・・<br />\n";
  state.innerHTML = "<img src='http://suemari.com/a/rakuten/ajax-loader.gif'><br />\n";

  var url = "http://suemari.com/a/rakuten/ItemRanking.php";

  var Genre = new Array(9);
  Genre[0] = "101240"; //CD・DVD・楽器
  Genre[1] = "100227"; //食品
  Genre[2] = "100939"; //美容・コスメ・香水
  Genre[3] = "200162"; //本・雑誌・コミック
  Genre[4] = "100026"; //パソコン・周辺機器
  Genre[5] = "101164"; //おもちゃ・ホビー・ゲーム
  Genre[6] = "100371"; //レディースファッション・靴
  Genre[7] = "211742"; //家電・AV・カメラ
  Genre[8] = "551167"; //スイーツ
//  var Genre_pickup = Genre[4]; //テスト用
  var Genre_pickup = Genre[Math.floor(Math.random() * Genre.length)];
  var paramList = "&genreId=" + Genre_pickup;

  new Ajax.Request(url,
    {
      method: 'get',
      onSuccess: getData,
      onFailure: showErrMsg,
      parameters: paramList
  });

  function getData(data){
    var response = data.responseXML.getElementsByTagName('Response');
    var status = getValue(response[0], 'Status');

    if(!(status == "Success")){
      state.innerHTML = "データが見つかりませんでした。";
      return;
    }

    var titleValue = getValue(response[0], 'title');
    var item = response[0].getElementsByTagName('Item');
    var tmpHtml = "";
     tmpHtml += titleValue + "<br />";

    for(i = 0; i < hits; i++){
//    for(i = 0; i < item.length; i++){
      //値を取得
      var itemNameValue = getValue(item[i], 'itemName');
      var itemPriceValue = getValue(item[i], 'itemPrice');
      var affiliateUrlValue = getValue(item[i], 'affiliateUrl');
      var mediumImageUrlValue = getValue(item[i], 'mediumImageUrl');
      //var itemCaptionValue = getValue(item[i], 'itemCaption');
      var reviewCountValue = getValue(item[i], 'reviewCount');
      var taxFlagValue = getValue(item[i], 'taxFlag');
      var postageFlagValue = getValue(item[i], 'postageFlag');

      //HTML作成
      tmpHtml += "<p>";

      tmpHtml += "<a href='" + affiliateUrlValue + "' target='_blank'>";
      tmpHtml += "<img src='"+ mediumImageUrlValue + "' border='0'>";
      tmpHtml += "</a>";
      tmpHtml += "<br />";

      tmpHtml += "<a href='" + affiliateUrlValue + "' target='_blank'>";
      if(itemNameValue.length >= 40){
        tmpHtml += itemNameValue.substring(0, 40) + "・・・</a>";
        tmpHtml += "<br />";
      }else{
      tmpHtml += itemNameValue + "</a>";
      tmpHtml += "<br />";
      }

      tmpHtml += "<b>" + itemPriceValue + "円</b>";
      //tmpHtml += "<br />";

      tmpHtml += "（";
     if(taxFlagValue == 0){
        tmpHtml += "税込";
      }else{
        tmpHtml += "税別";
      }

        tmpHtml += "/";

      if(postageFlagValue == 0){
        tmpHtml += "送料込";
      }else{
        tmpHtml += "送料別";
      }
      tmpHtml += "）";
      tmpHtml += "<br />";

      if(reviewCountValue >= 1){
        tmpHtml += "レビュー数：" + reviewCountValue + "件";
      }else{
        tmpHtml += " ";
      }
      tmpHtml += "<br />";

//      if(itemCaptionValue.length >= 200){
//        tmpHtml += itemCaptionValue.substring(0, 200);
//        tmpHtml += "<br />";
//      }else{
//        tmpHtml += itemCaptionValue;
//        tmpHtml += "<br />";
//      }

      tmpHtml += "</p>";
      tmpHtml += "<hr />";

    }

    //結果を表示
    result.innerHTML = tmpHtml;
//    state.innerHTML = "データを取得しました。<br />\n";
    state.innerHTML = "<!-- Rakuten Web Services Attribution Snippet FROM HERE --><a href='http://webservice.rakuten.co.jp/' target='_blank'><img src='http://webservice.rakuten.co.jp/img/credit/200709/credit_4936.gif' border='0' alt='楽天ウェブサービスセンター' title='楽天ウェブサービスセンター' width='49' height='36'/></a><!-- Rakuten Web Services Attribution Snippet TO HERE --><br />\n";
  }

  function showErrMsg(){
    //clearDisp();
    state.innerHTML = "データを取得できませんでした。<br />\n";
  }

}
