// --------------------------------------- WALL -------------------------------------------
function select_wall_img(id)
{
	tb_remove();
	jQuery('#wall_photo_id').val(id);
	xajax_wall(xajax.getFormValues(jQuery('#wall_form')[0]));
}
function uploaded_image_selected(path)
{
	jQuery('#wall_photo_path').val(path);
	xajax_wall(xajax.getFormValues(jQuery('#wall_form')[0]));
}
function uploaded_graffiti_selected(path)
{
	tb_remove();
	jQuery('#wall_graffiti_path').val(path);
	xajax_wall(xajax.getFormValues(jQuery('#wall_form')[0]));
}
var cur_page=0;
function wall_prev()
{
	if (cur_page>0) xajax_wall_page(cur_page-1,wall_limit);
	else { alert('Эта первая страница'); }
	return(false);
}
function wall_next()
{
	xajax_wall_page(cur_page+1,wall_limit);
	return(false);
}
function xajax_wall_page(){xajaxRequestUri='/wall.php';return xajax.call("wall_page",arguments,1);}
function xajax_wall(){xajaxRequestUri='/wall.php';return xajax.call("wall",arguments,1);}
function xajax_del_wall_msg(){xajaxRequestUri='/wall.php';return xajax.call("del_wall_msg",arguments,1);}
function wall_message(html)
{
	$('#empty_wall').hide();
	var div=$(html);
	$('#wall_content').prepend(div);
	tb_init(div.find('a.thickbox'));
	$('#wall_message').attr('value','');
	jQuery('#wall_photo_id').val('');
	jQuery('#wall_photo_path').val('');
	jQuery('#wall_graffiti_path').val('');
}
function del_wall_msg(msg_id)
{
	$('#del_wall_msg_form input[name=msg_id]').attr('value',msg_id);
	$('#del_wall_msg_form').each(function(){ xajax_del_wall_msg(xajax.getFormValues(this)); });
}

function xajax_rss(){xajaxRequestUri='/rss.php';return xajax.call("rss",arguments,1);}

