// ブログエントリーのDB読み込み関数
function getBlogEntries(y, m, d){
	
	m += 1;
	
	if(!location.href.match(/index/)){
		location.href = 'index.php?y=' + y + '&m=' + m + '&d=' + d;
		return false;
	}
	
	// DBからデータを読み込む Ajax オブジェクト
	var params = 'y=' + encodeURIComponent(y);
	params += '&m=' + encodeURIComponent(m);
	params += '&d=' + encodeURIComponent(d);
	var ssl_url = "";
	if(location.href.match(/^https:\/\//)){
		ssl_url = "https://www.kuroshio-amiya.com";
	}
	new Ajax.Request(
		ssl_url + '/blog/getblogentries.php',
		{
			asynchronous: false,
			method: 'get',
			onComplete: getResponse,
			parameters: params
		}
	);
	
	// 読み込み完了時の処理
	function getResponse(req){
		// blogブロックにデータを代入
		$('blog').innerHTML = decodeURIComponent(req.responseText);
	}
	
}

