function addFriend(userName,isSelf)
{
 if(isSelf=='1')
	{
      $('friend_req').innerHTML='You cant be your friend'; 
    }
  else
	{

      new Ajax.Updater('friend_req', host+'user/addfriend?userName='+userName,{asynchronous:true, evalScripts:true});
    }

}

function addComment(userName)
{
 var comment=$('comment').value;	 
 if(comment=='')
	 alert('Please enter some comment to post');
 else
    new Ajax.Updater('comment_div', host+'user/addComment?userName='+userName+'&comment='+ comment,{asynchronous:true, evalScripts:true});
}

function changeProfileImage(src)
{
 $('profile_image').src=src;
}