VAR_AVATAR_PRE = "http://avatar.16466.com";

function RefreshList(str, div){
	
	requestUrl = "/client/index_star_list.php";

	div.html('<div style=height:200px;" align="center" id="loading"></div>');

	jQuery.ajaxSetup ({cache:false});
	$.ajax({
		type: "GET", url: requestUrl, data: str, dataType: "json", async: "false",
		success: function(json){
			LoadData(json, div);
		}
	});
	json = null; requestUrl = null;
}

function LoadData(jsonResult, div){
    var infos = jsonResult['info'];
	if(infos == null) {
		div.html("<div style=\"width:100%; padding-top:100px; height:200px;\" align=\"center\">对不起，没有相应的数据</div>");
	} else {
		var items = [];
		var info = {};
		
		for (var i = 0; i < infos.length; i++) {
			info = infos[i];
			items.push('<div class="grhy">');
			items.push('<div class="hytx">');
			items.push('<a href="/user/'+info['rand_id']+'" target="_blank"><img src="'+VAR_AVATAR_PRE+'/'+info['file_head']+'" width="100" height="125" /></a>');
			items.push('</div>');
			items.push('<p><span class="c_bule">'+info['nick_name']+'</span> '+info['sex']+' '+info['age']+'岁</p>');
			items.push('<p>'+info['location']+'</p>');
			items.push('<div class="faxinxi"><img src="http://static.16466.com/v3/client/my/icon01_usercp.gif" width="16" height="11" alt="短信息" /><a href="javascript:gop_mail('+info['user_id']+');">发短消息</a></div>');
			items.push('<div class="lxta">');
			items.push('<a href="javascript:window.open(\'http://b.qq.com/webc.htm?new=0&sid=4000016466&eid=218808P8z8p8Q8K8p8q8Q&o=www.16466.com&q=7\', \'_blank\', \'height=544, width=644,toolbar=no,scrollbars=no,menubar=no,status=no\');"><img src="http://static.16466.com/v3/client/btn6.jpg" width="97" height="24" alt="联系TA" /></a></div>');
			items.push('</div>');

		}

		div.html(items.join('').toString());

	}
	
	items = null; infos = null; info = null; jsonResult = null;
};
