/*********************************************************************************/
/**			copyright (c) PlanetCalc.com, 2007  			**/
/**		    	Ajax Spam Reporter								*/
/*********************************************************************************/

function SpamControl(url, comments) {
	this.URL = url;
	var me = this;
	this.Comments = comments;

	this.Request = function ( op, id ) {
		BSMakePOSTRequest(this.URL, this, {"id" : id , "op" : op });
	}

	this.Report = function ( msgid ) {
		this.Request( "report", msgid );
	}

	this.Close = function ( msgid ) {
		this.Request( "close", msgid );
	}

	this.Delete = function ( msgid ) {
		this.Request( "delete", msgid );
	}

	this.OnResponse = function( obj ) {
		me.Comments.Reload();
	}

}    
