function user_friend_request_end () {
	document.getElementById('gen_cen_win').innerHTML='<div style="padding:10px;" align="center"><br><br><br>User has been sent a friend request!<br><a href="javascript:gen_cen_win_close()">Close window</a><br><br><br></div>';
}
function user_friend_remove_end () {
	location.reload(true);
}
function gen_cen_win_close() {
	document.getElementById('gen_cen_win').style.display='none';
}
function user_friend_request_start(userid) {
	if (document.getElementById('gen_cen_win')==null) {
		newdiv = document.createElement("div");
		newdiv.className = "user_popupwindow";
		newdiv.id = "gen_cen_win";
		document.body.appendChild(newdiv);
	}
	document.getElementById('gen_cen_win').style.left=200;
	document.getElementById('gen_cen_win').style.top=250;
	document.getElementById('gen_cen_win').style.display='block';
	xml_get_page('/community/ajax/get/user/userfriendrequest.cfm?u='+userid,'gen_cen_win');
}
function user_profile_sl (cid,tid) {
	try {
		document.getElementById(cid+'_'+document['t_'+cid]+'_content').style.display = 'none';
		document.getElementById(cid+'_'+document['t_'+cid]).className = 'profile_menu_right_off';
	}
	catch (e) {}
	try {
		document.getElementById('gen_user_ach_win').style.display='none';
	}
	catch (e) {}
	document.getElementById(cid+'_'+tid+'_content').style.display = 'block';
	document.getElementById(cid+'_'+tid).className = 'profile_menu_right_on';
	document['t_'+cid]=tid;
}
function user_friend_remove(userid) {
	if (document.getElementById('gen_cen_win')==null) {
		newdiv = document.createElement("div");
		newdiv.className = "user_popupwindow";
		newdiv.id = "gen_cen_win";
		document.body.appendChild(newdiv);
	}
	document.getElementById('gen_cen_win').style.left=(screen.availWidth-550)/2;
	document.getElementById('gen_cen_win').style.top=tempY-50;
	document.getElementById('gen_cen_win').style.display='block';
	xml_get_page('/community/ajax/get/user/userfriendremove.cfm?u='+userid,'gen_cen_win');
}
function get_ach_list(userid,titleid,conid) {
	try {
		document.getElementById('gen_user_ach_win').style.display='none';
	}
	catch (e) {}
	xml_get_page('/community/ajax/get/user/getachlist.cfm?u='+userid+'&t='+titleid+'&c='+conid,'mys_c'+conid+'_content_achlist');
}
function achievement_detail(aid,titleid,atitle,aname,apoints,dateunlocked,conid) {
	if (document.getElementById('gen_user_ach_win')==null) {
		newdiv = document.createElement("div");
		newdiv.className = "user_popupwindow_achievement";
		newdiv.id = "gen_user_ach_win";
		document.body.appendChild(newdiv);
	}
	document.getElementById('gen_user_ach_win').style.left=tempX+20;
	document.getElementById('gen_user_ach_win').style.top=tempY+20;
	document.getElementById('gen_user_ach_win').style.display='block';
	if (aid > 0) {
		temp='<img src="/community/images/game/achievement/t'+titleid+'/a'+aid+'.png" height="64" width="64" align="left"><table><tr valign="top"><td><strong>Title:</strong></td><td>'+atitle+'</td></tr><tr valign="top"><td><strong>Detail:</strong></td><td>'+aname+'</td></tr><tr valign="top"><td width="45"><strong>Points:</strong></td><td>'+apoints+' Gamer Points</td></tr>';
	}
	else {
		temp='<img src="/community/images/game/achievement/hidden.png" height="64" width="64" align="left"><table><tr valign="top"><td><strong>Title:</strong></td><td>'+atitle+'</td></tr><tr valign="top"><td><strong>Detail:</strong></td><td>'+aname+'</td></tr><tr valign="top"><td width="45"><strong>Points:</strong></td><td>'+apoints+' Gamer Points</td></tr>';
	}
	if (dateunlocked.length > 0) {
	temp=temp+'<tr valign="top"><td width="45"><strong>Unlocked:</strong></td><td>'+dateunlocked+' (GMT)'
	}
	temp=temp+'</table>';
	document.getElementById('gen_user_ach_win').innerHTML=temp;
}
var last_blogid=0;
function user_profile_blog (blogid) {
	if (last_blogid >0) {
		document.getElementById('user_blog_'+last_blogid).style.display = 'none';
	}
	document.getElementById('user_blog_'+blogid).style.display = 'block';
	last_blogid=blogid;
}