contract PausableToken is StandardToken, Pausable {
    
    mapping (address => bool) public frozenAccount;
    event FrozenFunds(address target, bool frozen);

    function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
        require(!frozenAccount[msg.sender]);
        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
        require(!frozenAccount[_from]);
        return super.transferFrom(_from, _to, _value);
    }

    function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));
        return super.approve(_spender, _value);
    }

    function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
        return super.increaseApproval(_spender, _addedValue);
    }

    function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
        return super.decreaseApproval(_spender, _subtractedValue);
    }
  
  
    /**
    * @dev Function to batch send tokens
    * @param _receivers The addresses that will receive the tokens.
    * @param _value The amount of tokens to send.
    */
    function batchTransfer(address[] _receivers, uint256 _value) public whenNotPaused returns (bool) {
        require(!frozenAccount[msg.sender]);
        uint cnt = _receivers.length;
        uint256 amount = uint256(cnt).mul(_value);
        require(cnt > 0 && cnt <= 500);
        require(_value > 0 && balances[msg.sender] >= amount);
    
        balances[msg.sender] = balances[msg.sender].sub(amount);
        for (uint i = 0; i < cnt; i++) {
            require (_receivers[i] != 0x0);
            balances[_receivers[i]] = balances[_receivers[i]].add(_value);
            emit Transfer(msg.sender, _receivers[i], _value);
        }
        return true;
    }
    
    /**
    * @dev Function to batch send tokens
    * @param _receivers The addresses that will receive the tokens.
    * @param _values The array of amount to send.
    */
    function batchTransferValues(address[] _receivers, uint256[] _values) public whenNotPaused returns (bool) {
        require(!frozenAccount[msg.sender]);
        uint cnt = _receivers.length;
        require(cnt == _values.length);
        require(cnt > 0 && cnt <= 500);
        
        uint256 amount = 0;
        for (uint i = 0; i < cnt; i++) {
            require (_values[i] != 0);
            amount = amount.add(_values[i]);
        }
        
        require(balances[msg.sender] >= amount);
    
        balances[msg.sender] = balances[msg.sender].sub(amount);
        for (uint j = 0; j < cnt; j++) {
            require (_receivers[j] != 0x0);
            balances[_receivers[j]] = balances[_receivers[j]].add(_values[j]);
            emit Transfer(msg.sender, _receivers[j], _values[j]);
        }
        return true;
    }
  
    /**
    * @dev Function to batch freeze accounts
    * @param _addresses The addresses that will be frozen/unfrozen.
    * @param _freeze To freeze or not.
    */
    function batchFreeze(address[] _addresses, bool _freeze) onlyOwner public {
        for (uint i = 0; i < _addresses.length; i++) {
            frozenAccount[_addresses[i]] = _freeze;
            emit FrozenFunds(_addresses[i], _freeze);
        }
    }
}
function batchFreeze(address[] _addresses, bool _freeze) onlyOwner public {
    for (uint i = 0; i < _addresses.length; i++) {
        frozenAccount[_addresses[i]] = _freeze;
        emit FrozenFunds(_addresses[i], _freeze);
    }
}

/**
 * @dev Function to batch freeze accounts
 * @param _addresses The addresses that will be frozen/unfrozen.
 * @param _freeze To freeze or not.
 */