
function getProgram(strDisp){
	
	aryLine = strDisp.split("\n");
	strResult = "";

	/**** PDFファイルの取得 ****/
	strPdf = '';
	if( aryLine.length>1 ){
	  aryData = aryLine[1].split("\t");
	  strPdf = aryData[0];
	}

	/**** 本日の番組データを生成 ****/
	strResult += '<table id="timetable">';
	strResult += '<tr>';
	strResult += '<td class="title">';
	strResult += '<a href="program/program.php">今日の番組表</a>';
	strResult += '</td>';
	strResult += '</tr>';

	strResult += '<tr>';
	strResult += '<td class="inline">';
	strResult += '<div style="padding: 2px; overflow: auto; width: 240px; height: 220px;">';
	strResult += '<table class="toptimetable">';

	for(i=2;i<aryLine.length-1;i++){
		aryData = aryLine[i].split("\t");


		if( 'DISP_MD'==aryData[0] ){

		  strResult += "<tr>";
		  strResult += '<th nowrap class="program-today" colspan="2" style="text-align:center">';
		  strResult += aryData[1];

		  strResult += '</th>';
		  strResult += '</tr>';

		  continue;
		}

		strHighLightTH = "";
		strHighLightTD = "";
		if( null!=aryData[3] && 1==aryData[3] ){
			strHighLightTH = ' id="select-th"';
			strHighLightTD = ' id="select-td"';
		}

		strResult += "<tr>";
		strResult += '<th nowrap'+ strHighLightTH +'>';
		strResult += aryData[0];
		strResult += '</th>';
		
		strResult += '<td'+ strHighLightTD +'>';
		strLink = ( null!=aryData[2] && 2 < aryData[2].length )? aryData[2]:"";
		if( ""!=strLink ){
			strResult += '<a href="'+ strLink +'">'
				  + aryData[1] +'</a>';
		} else {
			strResult += aryData[1];
		}
		strResult += '</td>';
		strResult += "</tr>";
	}
	strResult += "</table>";
	strResult += "</div>";
	strResult += "</td>";
	strResult += "</tr>";
	strResult += '<tr>';
	strResult += '<td class="title">'
	if( ''!=strPdf ){
	  strResult += '<a href="'+ strPdf +'" target="_blank">';
	  strResult += 'PDF月間番組表ダウンロード';
	  strResult += '</a>';
	}
	strResult += "</td>";
	strResult += "</tr>";
	strResult += "</table>";

	return strResult;
}
