contract Management is Manager {
	
	// Description
	string public description = "";
	
	// Current tansaction status 
	// TRUE - tansaction available
	// FALSE - tansaction not available
	bool public transactionsOn = false;
	// Special permissions to allow/prohibit transactions to move tokens for specific accounts
	// 0 - depends on transactionsOn
	// 1 - always "forbidden"
	// 2 - always "allowed"
	mapping ( address => uint256 ) public transactionsOnForHolder;
	
	
	// Displaying tokens in the balanceOf function for all tokens
	// TRUE - Displaying available
	// FALSE - Displaying hidden, shows 0. Checking the token balance available in function balanceOfReal
	bool public balanceOfOn = true;
	// Displaying the token balance in function balanceOfReal for definit holder
	// 0 - depends on transactionsOn
	// 1 - always "forbidden"
	// 2 - always "allowed"
	mapping ( address => uint256 ) public balanceOfOnForHolder;
	
	
	// Current emission status
	// TRUE - emission is available, managers may add tokens to contract
	// FALSE - emission isn`t available, managers may not add tokens to contract
	bool public emissionOn = true;

	// emission cap
	uint256 public tokenCreationCap = 0;
	
	// Addresses list for verification of acoounts owners
	// Addresses
	mapping ( address => bool ) public verificationAddressMap;
	// Verification Address/Number Mapping
	mapping ( address => uint256 ) public verificationAddressNumberMap;
	// Verification List Mapping
	mapping ( uint256 => address ) public verificationListMap;
	// Amount of verifications
	uint256 public verificationCountInt = 1;
	
	// Verification holding
	// Verification Holders Timestamp
	mapping (address => uint256) public verificationHoldersTimestampMap;
	// Verification Holders Value
	mapping (address => uint256) public verificationHoldersValueMap;
	// Verification Holders Verifier Address
	mapping (address => address) public verificationHoldersVerifierAddressMap;
	// Verification Address Holders List Count
	mapping (address => uint256) public verificationAddressHoldersListCountMap;
	// Verification Address Holders List Number
	mapping (address => mapping ( uint256 => address )) public verificationAddressHoldersListNumberMap;
	
	// Modifier - Transactions On
	modifier isTransactionsOn( address addressFrom ) {
		
		require( transactionsOnNowVal( addressFrom ) );
		_;
    }
	
	// Modifier - Emission On
	modifier isEmissionOn{
        require( emissionOn );
        _;
    }
	
	// Function transactions On now validate for definit address 
	function transactionsOnNowVal( address addressFrom ) public view returns( bool )
	{
		return ( transactionsOnForHolder[ addressFrom ]==0 && transactionsOn ) || transactionsOnForHolder[ addressFrom ]==2 ;
	}
	
	// transaction allow/forbidden for definit token holder
	function transactionsOnForHolderUpdate( address _to, uint256 _newValue ) external isOwner
	{
		if ( transactionsOnForHolder[ _to ] != _newValue )
		{
			transactionsOnForHolder[ _to ] = _newValue;
		}
	}

	// Function of changing allow/forbidden transfer status
	function transactionsStatusUpdate( bool _on ) external isOwner
	{
		transactionsOn = _on;
	}
	
	// Function of changing emission status
	function emissionStatusUpdate( bool _on ) external isOwner
	{
		emissionOn = _on;
	}
	
	// Emission cap setting up
	function tokenCreationCapUpdate( uint256 _newVal ) external isOwner
	{
		tokenCreationCap = _newVal;
	}
	
	// balanceOfOnForHolder; balanceOfOn
	
	// Function on/off token displaying in function balanceOf
	function balanceOfOnUpdate( bool _on ) external isOwner
	{
		balanceOfOn = _on;
	}
	
	// Function on/off token displaying in function balanceOf for definit token holder
	function balanceOfOnForHolderUpdate( address _to, uint256 _newValue ) external isOwner
	{
		if ( balanceOfOnForHolder[ _to ] != _newValue )
		{
			balanceOfOnForHolder[ _to ] = _newValue;
		}
	}
	
	
	// Function adding of new verification address
	function verificationAddressOn( address _onVerificationAddress ) external isOwner returns (bool retrnVal) {
		// Check if it's a non-zero address
		require( _onVerificationAddress != address(0) );
		// If this address is already exists
		if ( verificationAddressNumberMap[ _onVerificationAddress ]>0 )
		{
			// If address off, activate it again
			if ( !verificationAddressMap[ _onVerificationAddress ] )
			{
				verificationAddressMap[ _onVerificationAddress ] = true;
				retrnVal = true;
			}
			else
			{
				retrnVal = false;
			}
		}
		// If this address doesn`t exist
		else
		{
			verificationAddressMap[ _onVerificationAddress ] = true;
			verificationAddressNumberMap[ _onVerificationAddress ] = verificationCountInt;
			verificationListMap[ verificationCountInt ] = _onVerificationAddress;
			verificationCountInt++;
			retrnVal = true;
		}
	}
	
	// Function of disactivation of verification address
	function verificationOff( address _offVerificationAddress ) external isOwner returns (bool retrnVal) {
		// If this verification address exists and disabled
		if ( verificationAddressNumberMap[ _offVerificationAddress ]>0 && verificationAddressMap[ _offVerificationAddress ] )
		{
			verificationAddressMap[ _offVerificationAddress ] = false;
			retrnVal = true;
		}
		else
		{
			retrnVal = false;
		}
	}
	
	// Event "Description updated"
	event DescriptionPublished( string _description, address _initiator);
	
	// Description update
	function descriptionUpdate( string _newVal ) external isOwner
	{
		description = _newVal;
		DescriptionPublished( _newVal, msg.sender );
	}
}
function transactionsStatusUpdate( bool _on ) external isOwner
{
	transactionsOn = _on;
}

// Function of changing allow/forbidden transfer status