function open_friends_form()
	{
	document.getElementById('friends_form').style.display = 'block';
	}


function close_friends_form()
	{
	document.getElementById('friends_form').style.display = 'none';
	}
	
function create_msg_dialog(id)
	{
	window.open('/dialog/?user='+id,'msg_dialog_'+id,'scrollbars=yes,resizable=no,width=522,height=670,status=no');
	}
	
function open_image(id)
	{
	window.open('','image_win_'+id,'scrollbars=no,resizable=no,width=700,height=750,status=no');
	}
	
function set_my_status()
	{
	indx = document.getElementById('stats').selectedIndex;
	
	if (indx > 0)
		{
		document.getElementById('str_status').value = document.getElementById('stats').options[indx].text;
		}
	}
	
function open_status_list()
	{
	document.getElementById('select_from_list').style.display = 'none';
	document.getElementById('status_list').style.display = 'block';
	}
	
function close_status_list()
	{
	document.getElementById('select_from_list').style.display = 'block';
	document.getElementById('status_list').style.display = 'none';
	}
	
function twitt_length()
	{
	len = document.getElementById('str_twitter').value.length;
	if (len > 255)
		{
		str = document.getElementById('str_twitter').value.substr(0,254);
		len = 255;
		document.getElementById('str_twitter').value = str;
		}
	document.getElementById('tw_len').innerHTML = len + ' из 255 символов';
	}
