document.write('<span id="span_contextmenu_username" oncontextmenu="return false;" style="position: absolute; z-index: 999; visibility: hidden; background: #c0c0c0"></span>');
setTimeout(function(){
contextmenu_username_over = false;
document.onclick_callbacks['context_username'] = function (e)
{
 if (typeof(e) == 'undefined') { // IE code
  e = window.event;
 }
 var obj;
 if (typeof(e.srcElement) != 'undefined') {obj = e.srcElement;}
 else if (typeof(e.target) != 'undefined') {obj = e.target;}
 if (typeof(obj) == 'undefined') {return;}
 if (!contextmenu_username_over)
 {
  var L = layer('span_contextmenu_username');
  L.hide();
 }
}},100);

function contextmenu_username(username,prefix)
{
 if (typeof prefix == 'undefined') {prefix = '';}
 L = layer('span_contextmenu_username');
 var x = mousex;
 var y = mousey;
 if (isMSIE)
 {
  x += getScrollX();
  y += getScrollY();
 }
 L.moveTo(x,y);
 var tmp = '';
 var rows = {}
 rows[1] = {onclick: 'document.location.href = \''+prefix+'/'+xE_lang['LANG']+'/account,userinfo/?username='+escape(username)+'\';', text: xE_lang['FIELD_INFORMATION']}
 if (xE_mod == 'forum') {rows[2] = {onclick: 'document.location.href = \''+prefix+'/'+xE_lang['LANG']+'/forum,search/?member='+escape(username)+'&show_posts=1\';', text: xE_lang['BUTTON_FIND_ALL_POSTS_OF_THIS_MEMBER']}}
 if (xE_logged && (xE_username != username)) {
    rows[3] = {onclick: 'document.location.href = \''+prefix+'/'+xE_lang['LANG']+'/mail,compose/?username='+escape(username)+'\';', text: xE_lang['BUTTON_SEND_PRIVATE_MESSAGE']}
	rows[4] = {onclick: 'document.location.href = \''+prefix+'/'+xE_lang['LANG']+'/account,buddies/?addbuddy_username='+escape(username)+'\';', text: xE_lang['BUTTON_ADD_USER_TO_FIENDS']}
 }
 rows[5] = {onclick: 'document.location.href = \''+prefix+'/'+xE_lang['LANG']+'/blog/?'+escape(username)+'\';', text: xE_lang['TITLE_BLOG']}
 for (k in rows) {tmp += '<tr><td onmouseover="this.style.backgroundColor = \'#C0C0C0\'" onmouseout="this.style.backgroundColor = \'#ECECEC\'" onclick="'+rows[k].onclick+' layer(\'span_contextmenu_username\').hide();">'+rows[k].text+'</td></tr>'+"\n";}
 L.write('<table class="table_simple" style="background-color: #ECECEC; cursor: hand; cursor: pointer;" onmouseover="contextmenu_username_over = true;" onmouseout="contextmenu_username_over = false;" cellspacing="0" cellPadding="5" border="1">'+
		 tmp+
		 '</table>');
 L.show();
 return false;
}