/**
 * rssURL		String		RSSのURL (RSS ver2.0)。
 * domObj		String		表示させる element id。
 * num			int			表示数。default = 3
 * def			int			new icon を表示する日数差。default = 31
 */
function getRSS(rssURL, domObj, num, def) {
	n = num || 3;
	d = def || 31;
	$.ajax({
		dataType: "json",
		data: { "rssURL": rssURL },
		cache: false,
		url: "corporation/script/getRss.php",
		success: function (data) {
			$(domObj).empty();
			l = data.length;
			html = "<dl>";
			for(i = 0; i < Math.min(l, n); i++) {
				if(data[i].diff < d) {
					html +='<dt><span class="new">' + data[i].date + '</span></dt><dd><a href="' + data[i].link + '" target="_blank">' + data[i].title + '</a></dd>';
				} else {
					html +='<dt>' + data[i].date + '</dt><dd><a href="' + data[i].link + '" target="_blank">' + data[i].title + '</a></dd>';
				}
			}
			html += "</dl>";
			$(domObj).html(html);
		}
	});
}