/**
 * @author yoshizawa
 */

/**
 * LOAD時の処理
 */
Event.observe(window, "load", function(){
	
//	Event.observe($("imgSearch_stu"), "click", function(){
//		//名称検索
//		location.href = "./execute/search/search_housing.php?s_txtHousing=" + encodeURI($("Search_hougins_stu").value);
//		
//	}, false);
	//トピックスの出力
	get_json_text();
}, false);
//名称検索
function onClick_imgSearch_stu(){
	location.href = "./execute/search/search_housing.php?s_txtHousing=" + encodeURI($("Search_hougins_stu").value);
}

function onClick_imgSearch_gen(){
	location.href = "./execute/search_gen/search_housing.php?s_txtHousing=" + encodeURI($("Search_hougins_gen").value);
}

/**
 * リスト用JSONデータを取得する。
 */
function get_json_text() {
	var s_url = "./execute/top/index_topics.php";
	new Ajax.Request (
		s_url,
		{
		  method: 'GET',
		  parameters: "",
		  onComplete: CreateTopics
	});
}

function CreateTopics(res) {
	$('dvTopics').innerHTML = res.responseText;
}
