//contacts
var menu_params = new Array();

function menu_user_page_str(width)
{
	return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/'+menu_params['user_name']+'/" Title="Персональная страница">Персональная страница</a></td></tr></table>';
}

function menu_user_auk_str(width)
{
	return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/'+menu_params['user_name']+'/auk/" Title="Персональный аукцион">Персональный аукцион</a></td></tr></table>';
}

function menu_user_shop_str(width)
{
	return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/'+menu_params['user_name']+'/shop/" Title="Персональный магазин">Персональный магазин</a></td></tr></table>';
}

function menu_user_collect_str(width)
{
    return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/'+menu_params['user_name']+'/collect/" Title="Коллекция пользователя">Коллекция пользователя</a></td></tr></table>';
}

function menu_user_trans_vote(width)
{
	return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/prof/add_trans_vote/'+menu_params['lot_id']+'/'+menu_params['user_id']+'/'+menu_params['act_type']+'/" Title="Отзыв по сделке" class="thickbox" name="?keepThis=false&width=450&height=350">Отзыв по сделке</a></td></tr></table>';
}

function menu_user_add_favorite(width)
{
	return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/aumain/add_favorite/'+menu_params['user_id']+'/" Title="Добавить пользователя в фавориты" name="?keepThis=true&width=380&height=170" class="thickbox">Добавить пользователя в фавориты</a></td></tr></table>';
}

function menu_user_add_to_group(width)
{
	return '<table height="20" width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr  onmouseover="this.className = \'popit_over\';" onmouseout="this.className = \'\'"><td valign="middle" class="pop_content"><a href="/groups/add_to_my_group/'+menu_params['user_id']+'/" name="?keepThis=true&width=300&height=150" Title="Пригласить пользователя в группу" class="thickbox">Пригласить пользователя в группу</a></td></tr></table>';
}



function menu_user_point()
{
    return '<table height="20" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="middle" class="pop_content" style="text-align:center;"><img src="/uimages/'+menu_params['user_img']+'" border="0"><br><strong>Рейтинг пользователя '+menu_params['owner_up']+'/'+menu_params['owner_tp']+'</strong><br>Общая оценка: '+menu_params['owner_up']+'<br><i>Сумма положительных и отрицательных отзывов</i><br>Оценка сделок: '+menu_params['owner_tp']+'<br><i>Сумма положительных и отрицательных отзывов</i></td></tr></table>';
}



function popit_transaction()
{
    //alert('aaa');
    $('#simpleTooltip > .images_popit').css("display","none").appendTo("body");
    $('#simpleTooltip').empty();
    
    $("#simpleTooltip").css('width','250px');
    $("#popitmenu").css('width','270px');  
    
    str=menu_user_point(230)+menu_user_page_str(230)+menu_user_auk_str(230)+menu_user_shop_str(230)+menu_user_trans_vote(230)+menu_user_add_favorite(230)+menu_user_add_to_group(230);
    $('#simpleTooltip').html(str);
}

function popit_auk_shop(width)
{
    $('#simpleTooltip > .images_popit').css("display","none").appendTo("body");

    $('#simpleTooltip').empty();

    $("#simpleTooltip").css('width','250px');
    $("#popitmenu").css('width','270px');     

    str=menu_user_point(230)+menu_user_page_str(230)+menu_user_auk_str(230)+menu_user_shop_str(230)+menu_user_collect_str(230)+menu_user_add_favorite(230)+menu_user_add_to_group(230);
    $('#simpleTooltip').html(str);

}

function show_images_popit()
{
    $("#simpleTooltip").css('width','auto');      
    $("#popitmenu").css('width','auto');      
    if (eval('images_str_'+menu_params['lot_id']))
    {
        $('#images_'+menu_params['lot_id']).html(eval('images_str_'+menu_params['lot_id']));
        eval('delete images_str_'+menu_params['lot_id']);
        tb_init("a.thickbox"); 
    }


    $('#simpleTooltip > .images_popit').css("display","none").appendTo("body");


    $('#simpleTooltip').empty();
    
    $('#images_'+menu_params['lot_id']).css("display","").css("white-space","nowrap").appendTo("#simpleTooltip");
    
}


function invite_user_content(content)
{

    $("#TB_ajaxContent").html(content);

}


