﻿/*<!-------------------------------------------------------------------------------------------------
JSクラス
-------------------------------------------------------------------------------------------------->*/
if(typeof(contribution_con) != "object"){
	var contribution_con = new Object();
}

/*<!-------------------------------------------------------------------------------------------------
コメント設定表示切替
	name="ContributionID" type="numeric" required="yes" displayname="スレッドID" hint=""
	name="mc" type="any" required="false" displayname="メソッドコール要素のオブジェクト" hint=""
-------------------------------------------------------------------------------------------------->*/
contribution_con.setCntUp_thread = function (arguments){
	<!--- local変数 --->
	var local = new Object();
	<!--- result変数 --->
	var result = true;
	<!--- イベントコール --->
	local.gArg = new Object();
	local.gArg["ContributionID"] = arguments.ContributionID;
	local.result = global.connector.cf.connector("contribution_setThreadCntUP", local.gArg, "listener_cntS,listener_cntN");
	<!--- 表示切替 --->
	unit_doc_head.getById({id:"thread_sympathy_cnt_"+arguments.ContributionID}).innerHTML = local.result["listener"]["cntN"];
	unit_doc_head.getById({id:"thread_sympathy_btn_"+arguments.ContributionID}).src = "/dt_images/k-btn-off.gif";
	if(typeof(arguments.mc.href) == "string"){
		arguments.mc.removeAttribute("href");
	}
	if(typeof(arguments.mc.onclick) == "function"){
		arguments.mc.removeAttribute("onclick");
	}
	if(typeof(arguments.mc.disabled) == "string"){
		arguments.mc.disabled = false;
	}
	if(local.result["listener"]["cntS"] > 0){
		alert("既にあなたはこの記事を共感しています");
	}
}
