function blockUser() {
   var idArray = $('block_user_link').get('name').split('-');
   this.memberIdToBlock = idArray[1];
   this.takeAction=idArray[2];
   this.useButton=idArray[3];
   this.blockUserAjaxDiv = $('blockUserAjaxDiv');
   var captionThrobber = new Throbber();

   new Request.JSON( {
        url: '/c/profile/ajax_block_user',
        data : {
            memberIdToBlock: this.memberIdToBlock,
            action: this.takeAction,
            useButton: this.useButton
        },
        onComplete : function(json) {
              captionThrobber.dispose();
              if (json.message != 'error')
              {

                  this.blockUserAjaxDiv.set('html',json.data.blockUserAjaxDiv_html);

              }
              else
              {
                  this.blockUserAjaxDiv.set('html',json.data.blockUserAjaxDiv_html);
                  
              }
        }.bind(this),
        onRequest : function() {


           captionThrobber.display(this.blockUserAjaxDiv); 

        }.bind(this)
    }).send();

}

function reportAbuse(){
  this.memberIdToReport =$('report_abuse_link').get('name');
  document.location='/ReportAbuse.jsp?MemberId='+memberIdToReport;
  return false;
}


function openCEOP(){
  this.URL =$('report_CEOP').get('name');
  window.open(this.URL,'popwindow','width=1000,height=700,scrollbars=1');
  void('');
}

var Throbber = new Class( {
	initialize: function() {
		this.throbber = new Element('img', {
			src :'/img/throbber_default.gif',
			id :'update-throbber'

		});
    },
    display: function(target) {
		this.throbber.inject(target);
		this.throbber.position( {
			relativeTo : target, // centered over a target
			position :"center"
		});
    },
	dispose: function () {
    	this.throbber.dispose();
    }
});
