function AddToFavorites(bFriend) {
	if (!protectMembers()) return false;
	if (!bFriend)
	{
		MessageBox(396,119,"Got it! close this message","<span>To add <span class=\"color3\">"+userIcon+"</span>"+userName+" to your favorites, you must first become friends (this will put the user at the top of your top-6 list).</span>",true,null,true);
	} else {
	   $.ajax({
		   type: "POST",
		   url: ROOT_URL+"pro-users.asp",
		   data: {act:"favorite-add",id:userId},
		   success: function(msg){
				MessageBox(396,119,"Got it! feature this user","<span>This will put <span class=\"color3\">"+userIcon+"</span>"+userName+" at the top of your profile top-6 list. (press the X button to cancel)</span>",true,null,true);
		   }
	   });
	}
}

function doRank(iRank) {
	if (!protectMembers()) return false;
	$.ajax({
	   type: "POST",
	   url: ROOT_URL+"pro-users.asp",
	   data: {act:"rank",id:userId,rank:iRank},
	   success: function(msg){
			userRank = iRank;

			location.reload(true);
	   }
   });
}

function RankThisUser() {
	if (!protectMembers()) return false;
	if (userRank == 0)
	{
		var sHtml = "";
		for (var i=1;i<=10;i++)
			sHtml += "<span onmouseover=\"this.style.fontWeight='bold'\" onmouseout=\"this.style.fontWeight='normal'\" onclick=\"doRank("+i+")\" class=\"s"+i+"\">"+i+"</span>";

		MessageBox(396,119,"Close this message","<span>Please rank <span class=\"color3\">"+userIcon+"</span>"+userName+":</span><div class=\"rankuser\"><span class=\"des\" style=\"margin-left:0px;\">bad</span>"+sHtml+"<span class=\"des\">good</span></div>",true,null,true);
	} else {
		MessageBox(396,119,"Got it! close this message","<span>You cannot rank the same user twice. your previous ranking of <span class=\"color3\">"+userIcon+"</span>"+userName+" was "+userRank+"/10.</span>",true,null,true);
	}
}

