function Attention()
{
  this.memberid="";
}

Attention.prototype.add=function()
{
  var obj=new Ajax(this);
  obj.post("/servlet/member/attention.servlet.php","action","add","memberid",this.memberid,this.addback)
}

Attention.prototype.addback=function(value)
{
  if(value=="成功")
    alert("添加关注成功了。");
  if(value=="#已有")
    alert("你已经在关注了。");
  if(value=="#失败")
    alert("关注失败，请等会儿再试。");
}

Attention.prototype.remove=function(id)
{
  if(confirm("您确认删除吗?")==false)
    return;
  var obj=new Ajax(this);
  obj.post("/servlet/member/attention.servlet.php","action","remove","id",id,this.removeback)
}

Attention.prototype.removeback=function(value)
{
  top.location.reload();
}
//End