
// Recommend
function f_recommend(id) {
	var started = true;
	var ended = true;
	if (ended) {
		alert('恐れ入りますが、「the：rpg（仮）」敵モンスター再投票は、\n2009年7月13日（月）17時を持ちまして受付を終了いたしました。\n\n多数の投票ありがとうございます。');
	}else if (!started) {
		alert('恐れ入りますが、「the：rpg（仮）」敵モンスター投票は、\n2009年6月30日（火）17時を持ちまして受付を終了いたしました。\n\n多数のご応援ありがとうございます。');
	}else if (id > 0) {
		var postdata = 'id='+encodeURIComponent(id.toString());
		f_executeXHRequest('post', './recommend.do', true, postdata, callbackRecommend, null);
	}
	return false;
}
function callbackRecommend(xmlHttp) {
	if (xmlHttp && xmlHttp.responseXML) {
		var root		= xmlHttp.responseXML.documentElement;
		var objCount	= root.getElementsByTagName('recommendcount');
		var objMsg		= root.getElementsByTagName('msg');
		if ((objCount.length > 0) && (document.getElementById('DIV_RECOMMEND_COUNT')))
			document.getElementById('DIV_RECOMMEND_COUNT').innerHTML = objCount[0].firstChild.nodeValue;
		if (objMsg.length > 0) alert(objMsg[0].firstChild.nodeValue.replace(/\\n/gi,'\n'));
		xmlHttp = root = null;
	}
	return;
}

