function getcommentinfo(userList,conList,timeList,infoidList,diggList,buryList,fl,userportraitList)
{
	if (userList.length<=0 || conList.length<=0)
	return ;
	var str="";

	var imgurl = "http://images.mmosite.com/www/images/newpop/";
	for (i=0;i<userList.length;i++)
	{
		str += "<table width=\"98%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
		str += "<tr>";
		str += "<td width=\"13\" height=\"15\"><img src=\""+ imgurl +"pop_01.gif\" width=\"13\" height=\"15\"><\/td><td background=\""+ imgurl +"pop_02.gif\"><\/td>";
		str += "<td width=\"15\"><img src=\""+ imgurl +"pop_04.gif\" width=\"15\" height=\"15\"><\/td>";
		str += "<\/tr>";
		str += "<tr>";
		str += "<td valign=\"top\" background=\""+ imgurl +"pop_09.jpg\"><img src=\""+ imgurl +"pop_05.gif\" width=\"13\" height=\"69\"><\/td>";
		str += "<td height=\"50\" background=\""+ imgurl +"pop_06.gif\" valign=\"top\" class=\"comm_js_bg\">";
		str += "<div class=\"comm_js_conten\"><p class=\"floor\">#"+fl[i]+"</p>";
		str += "<a href=\"javascript:quote("+infoidList[i]+")\" class=\"quote_box\">Quote</a>";
		str += "<div class=\"comm_dig\"><a title=\"Digg\" href=\"#notop\" onClick=\"DoDigg('"+infoidList[i]+"');\"><img alt=\"digg\" title=\"digg\" src=\"http://images.mmosite.com/comment/digg.gif\" align=\"absmiddle\" border=\"0\"></a> <span id=\"diggnum_"+infoidList[i]+"\">"+diggList[i]+"</span>  <a title=\"Bury\" href=\"#notop\" onClick=\"DoBury('"+infoidList[i]+"');\"><img alt=\"bury\" title=\"bury\" src=\"http://images.mmosite.com/comment/bury.gif\" align=\"absmiddle\" border=\"0\"></a> <span id=\"burynum_"+infoidList[i]+"\">"+buryList[i]+"</span>";
		str += "<\/div>"+conList[i]+"<\/div><\/td>";
		str += "<td valign=\"top\" background=\""+ imgurl +"pop_10.jpg\"><img src=\""+ imgurl +"pop_08.gif\" width=\"15\" height=\"69\"><\/td>";
		str += "<\/tr>";
		str += "<tr>";
		str += "<td valign=\"top\"><img src=\""+ imgurl +"pop_11.gif\" width=\"13\" height=\"26\"><\/td>";
		str += "<td background=\""+ imgurl +"pop_14.gif\"><img src=\""+ imgurl +"pop_12.gif\" width=\"54\" height=\"26\"><\/td>";
		str += "<td><img src=\""+ imgurl +"pop_16.gif\" width=\"15\" height=\"26\"><\/td>";
		str += "<\/tr>";
		str += "<\/table>";
		str += "<div class=\"comm_js_title\"><em><img src='"+userportraitList[i]+"'  align=\"absbottom\"> <span>"+userList[i]+" <\/span>  <span class=\"past_time\">said at "+timeList[i]+"</span><\/em>";
		if(commentsendfm.jbList[i] == "0"){
			str += "<p><span class='report'><a onclick=\"window.open('http://comment.mmosite.com/!@@mmo&^c_t/act_info.php?id="+infoidList[i]+"&rid="+comment_id+"&path="+pathArr[1]+"&pagenum=10000&page=20&username="+userportraitList[i]+"','_blank','width=480','height=350');\" href=\"#notop\">report</a><\/span>";
		}else{
			str += "<p><span class='reported'>reported<\/span>";
		}
		str +="<\/p>";
		str +="<div style=\"clear:both\"><\/div><\/div>";
	}	
	document.getElementById('commentinfoDiv').innerHTML = str;
}
document.getElementById('url').value = location.href;
function orderBy(val){
	var order = val;
	var commentsubs=document.getElementById("topcomment").getElementsByTagName("a");
    for(var i=0;i<commentsubs.length;i++){
		 commentsubs[i].className = ""
     }
	commentsubs[val].className = "on"
  
	if(order == 1){
		commentUrl = "http://comment.mmosite.com/port/getcomment_info_order.php?comment=" + document.getElementById('commentparam').value + "&num=30&orderBy=hottest";
	}else if(order == 2){
		commentUrl = "http://comment.mmosite.com/port/getcomment_info_order.php?comment=" + document.getElementById('commentparam').value + "&num=30&orderBy=buried";
	}else{	
		commentUrl = "http://comment.mmosite.com/port/getcomment_info_order.php?comment=" + document.getElementById('commentparam').value + "&num=30";
	}
	
	var userAgent = navigator.userAgent.toLowerCase();
	var srcObj = document.createElement('script');
	
	var _fnCallback = callback;
	var _oTarget = '';
	if(/msie/.test( userAgent ) && !/opera/.test(userAgent)) {
		try {

			srcObj.setAttribute("src", commentUrl);

			srcObj.onreadystatechange = function() {
				if(/complete|loaded/i.test(this.readyState)) {
					_fnCallback(_oTarget);
				}
			};
			document.body.appendChild(srcObj);
		} catch(e) {
			alert(e.description);
			// do nothing
		}
	} else {						// FF, Opera
		try {
			srcObj.id = "testscript";
			srcObj.src = commentUrl;
			srcObj.onload = function() {
				_fnCallback(_oTarget);
			};
			document.body.appendChild(srcObj);
		} catch(e) {
			// do nothing
		}
	}
}

function callback() {
	getcommentinfo(userList,conList,timeList,infoidList,diggList,buryList,fl,userportraitList);
}
function quote(val){
	document.getElementById('defind').value = val;
	document.getElementById('content').value = "[quote="+val+"]";
	document.getElementById('content').focus();
}