function showRSSfromJSON(json) {
  var html = '';
  var htmlpic = '';
  for( var i=0; i<1; i++ ) {
    var title = '<a href="' + json.value.items[i].link + '">' + json.value.items[i].title + '</a>';
    var desp = json.value.items[i].description;
    desp = desp.slice(0, 280);
    //日付を整形
    //var date = dateParse(json.value.items[i].pubDate);
    var date2 =json.value.items[i].dcdate;

	if(i==0){
		//画像があった場合のみ
		var enc = json.value.items[i].enclosure;
		if(enc!=null){	
			var temp=enc.url;
			if(temp !=null){
		   	outputimg =  temp;
			}else{
				outputimg=enc[0].url;
		 		
			}
			htmlpic='<div class="info_pic"><a href="' + outputimg + '"><img src="' + outputimg + '" width="250"></a></div>';
	   }else{

		}
			htmlpic='<div class="info_pic"><a href="http://kiyoe.net/image/sp_pic_sum_close.jpg"><img src="http://kiyoe.net/image/sp_pic_sum_close.jpg" width="250"></a></div>';

	//	html+='<h3 class="info_title">' + title + '</h3><div class="info_date">' + date[0] +' ' + date[1] + '</div>' + htmlpic + '<div class="info_desp">' + desp + '......<br></div>';
		html+='<h3 class="info_title">' + title + '</h3><div class="info_date"></div>' + htmlpic + '<div class="info_desp">' + desp + '......<br></div>';
	
	
	}else{
		html+='<span class="info_date">' + date[0] +' ' + date[1] + '</span><h3 class="info_title">' + title + '</h3>';
	}

  }
  document.getElementById('feedList').innerHTML = html;
}

//dateParse: "2008/10/14" 形式
function dateParse(str){
    var objDate = new Date(str);
    var nowDate = new Date();
    //現在の日付との差を計算
    myDay = Math.floor((nowDate.getTime()-objDate.getTime()) / (1000*60*60*24)) + 1;
    //もし2週間以内なら"new!"マーク
    if (myDay < 15 ){
        var newMsg = '&nbsp;&nbsp;<span style="color:#ff6666; font-weight:bold;">new!</span>';
    } else {
        var newMsg = '';
    }
    var year = objDate.getFullYear();
    var month = objDate.getMonth() + 1;
    var date = objDate.getDate();
    if ( month < 10 ) { month = "0" + month; }
    if ( date < 10 ) { date = "0" + date; }
    str = year + '/' + month + '/' + date;
    rtnValue = new Array(2);
    rtnValue[0] = str;
    rtnValue[1] = newMsg;
    return rtnValue;
}


