function tableSelectAll(tableIds){
	this.tableIds = tableIds;
	
	this.init();
}

tableSelectAll.prototype = {
	init: function(){
		var instance = this;
		
		var tableIdArray = this.tableIds.split(',');
		var tableIdLength = tableIdArray.length;
		var tableSelectors = '';
		for (var i=0; i<tableIdLength; i++){
			tableSelectors += 'table#' + $.trim(tableIdArray[i]) + ' input[type=checkbox], ';
		}
		tableSelectors = tableSelectors.substring(0, tableSelectors.length - 2);
		$('input.selectAll').click(function(){
			if ($(this).attr('checked')){
				$(tableSelectors).attr('checked', 'checked');
			}
			else{
				$(tableSelectors).removeAttr('checked');
			}
		});
	}
}
