function multiImgById(maxLen,id,needInner){
	if (id==null) return;
	id = (needInner==1) ? "atm32" : "atm16";
	for(var i = 0; i < maxLen ; i++){
		var j = i + 1;
		var alit = document.getElementById("talkId"+j);
		var noalit = document.getElementById("noAlitalkId"+j);
		if(online[i] == 1){
			if(alit != null){
				alit.className="author-online sprite";
				if (needInner==1) alit.innerHTML='I\'m online!';
				alit.href = alit.href.replace("isOnline","1");
				alit.title="TradeManager";
			}
		}else if (online[i] == 2||online[i]==0) {
			if(alit != null){
				alit.className="author-offline sprite";
				if (needInner==1) alit.innerHTML='offline';
				alit.href = alit.href.replace("isOnline",online[i].toString());
				alit.title="Leave me a message";
			}
		}
	}
}



AE.namespace('AE.forum.detail');
AE.forum.detail = function(config){
	this.config = {
		postAction : {
			targetsClass : "post-topic",
			overShowsClass : "topic-other-action"
		},
		emotionBox : {
			target : get("emotionsBox"),
			emotionAll : get("emotionsAll"),
			showAllLink : get("emotionsShowall"),
			closeLink : get("emotionsClose"),
			linkTextArea : get("replyBody")
		}
	};
	this.config = YL.merge(this.config,config||{});
	this.defineEvents();
	this.defaultRuns();
};


AE.forum.detail.prototype = {
		defineEvents : function(){
			var _self = this;
			var config = this.config;
			
			// 展开post按钮目录
			var postActionBtns = YUD.getElementsByClassName(config.postAction.targetsClass);
			var postActionOverShows = YUD.getElementsByClassName(config.postAction.overShowsClass,"ul");
			for(i=0;i<postActionBtns.length;i++){
				var postActionBtn = postActionBtns[i];
				var postActionOverShow = postActionOverShows[i];
				var excursion4config = YUD.hasClass(postActionOverShow,"action-show-asc")?[0,-postActionOverShow.offsetHeight-1]:[0,postActionBtn.offsetHeight+1];
				var overkShowConfig={
					targetId:postActionBtn,
					contentId:postActionOverShow,
					excursion:excursion4config
				};
				var overkShowInstance = new AE.widget.overShow();
				overkShowInstance.init(overkShowConfig);
			}
			
			
			if(config.emotionBox.target){
				YUE.on(config.emotionBox.showAllLink,"click",function(){_self.emoticonBoxShowAll();});
				YUE.on(config.emotionBox.closeLink,"click",function(){_self.emoticonBoxClose();});
				YUE.on(config.emotionBox.target.getElementsByTagName("a"),"click",function(){_self.insertEm(this);});
			}
		},
		emoticonBoxShowAll : function(){
			var _self = this;
			var config = this.config;
			config.emotionBox.emotionAll.style.display = "block";
		},
		emoticonBoxClose : function(){
			var _self = this;var config = this.config;
			config.emotionBox.emotionAll.style.display = "none";
		},
		insertEm : function(emIco){
			var _self = this;var config = this.config;
			if(!emIco.getAttribute("code"))return;
			config.emotionBox.linkTextArea.value += emIco.getAttribute("code");
			config.emotionBox.linkTextArea.focus();
		},
		defaultRuns : function(){
			var _self = this;
			var config = this.config;
			if(config.emotionBox.target){
				_self.defineEmptyLinks(config.emotionBox.target);
			}
		},
		defineEmptyLinks : function(target){
			var links = target.getElementsByTagName("a");
			for(i=0;i<links.length;i++){
				var link = links[i];
				if(!link.href){
						link.href = "javascript:void(0);";
					}
			}
		}
};