


//管理菜单
function MlistThread(Jthreadid,Jrestoreid,Jforumid){
	$('#Mlist_menu').remove();
	$('<div id="Mlist_menu"></div>').appendTo('body');
	
	$.ajax({
			  url: "/ajaxTemplates/Boardthread.asp",
			  cache: false,
			  data: 'Jthreadid='+ Jthreadid +'&Jrestoreid='+ Jrestoreid +'&Jforumid='+ Jforumid ,
			  beforeSend: function(XMLHttpRequest){
				//ShowLoading();
				Loadingstr=ShowLoading();
				$('#Mlist_menu').html(Loadingstr);
			  },
			  success: function(html){
				$('#Mlist_menu').html(html);
			  },
			  complete: function(){
				 $('#loading').remove();
			  },
			  error: function(){
				$('#Mlist_menu').append('加载失败...');
			  }
		});
	
	var offset = $('#Mlist_' + Jthreadid).offset();
	var divheight = $('#Mlist_' + Jthreadid).innerHeight();
	
	$('#Mlist_menu').css({
		'left':offset.left,
		'top':offset.top + divheight,
		'position':'absolute'
	}).show();
	
	$('#Mlist_menu').mouseover(function () { $(this).show(); });
	$('#Mlist_menu').mouseout(function () { $(this).hide(); });
}


//下拉查看用户信息
function UserListDiv(DivID,username){
	$('#'+ DivID +'_menu').remove();
	$('<div id="'+ DivID +'_menu" class="userdivcss"></div>').appendTo('body');
	
	$.ajax({
		url: "/ajaxTemplates/UserinfoDiv.asp",
		cache: false,
		data: 'username='+ username,
		beforeSend: function(XMLHttpRequest){
			Loadingstr=ShowLoading();
			$('#'+ DivID +'_menu').html(Loadingstr);
		},
		success: function(html){
			$('#'+ DivID +'_menu').html(html);
		},
		complete: function(){
			$('#loading').remove();
		},
		error: function(){
			$('#'+ DivID +'_menu').html('加载失败...');
		}
	}); 
	
	setMenuPosition(DivID);
	MenuDivShow(DivID);
		
	$('#' + DivID).mouseout(function () { $('#' + this.id + '_menu').hide(); });
}

//管理菜单
function commentThread(threadid){
	$('#commentdiv').remove();
	$('<div id="commentdiv"></div>').appendTo('body');
	
	$.ajax({
			  url: "/ajaxTemplates/CommentviewNum.asp",
			  cache: false,
			  data: 'threadid='+ threadid ,
			  beforeSend: function(XMLHttpRequest){
				//ShowLoading();
				Loadingstr=ShowLoading();
				$('#commentdiv').html(Loadingstr);
			  },
			  success: function(html){
				$('#commentdiv').html(html);
			  },
			  complete: function(){
				 $('#loading').remove();
			  },
			  error: function(){
				$('#commentdiv').append('加载失败...');
			  }
		});
	
	var offset = $('#ratelink').offset();
	var divheight = $('#ratelink').innerHeight();
	
	$('#commentdiv').css({
		'left':offset.left,
		'top':offset.top,
		'position':'absolute'
	}).show();
	
	$('#commentdiv').mouseover(function () { $(this).show(); });
	$('#commentdiv').mouseout(function () { $(this).hide(); });
}