Quarterly report pursuant to Section 13 or 15(d)

Stock based compensation, options and warrants (Stock Incentive Plan Options) (Narrative) (Details)

v3.7.0.1
Stock based compensation, options and warrants (Stock Incentive Plan Options) (Narrative) (Details) - USD ($)
6 Months Ended
Jun. 30, 2017
Jun. 30, 2016
Dec. 31, 2016
Dec. 31, 2015
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Number of shares reserved under the Plan     895,000 709,141
Rights forfeited 532,911      
Minimum [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Expiration period 3 years      
Maximum [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Expiration period 5 years      
Stock Incentive Plan [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted 20,000      
Options granted, exercise price $ 4.02      
Options grant date fair value $ 3.04      
Options forfeited 495,414 25,445    
Options forfeited, unvested 57,000      
Options forfeited, exercise price $ 22.98      
Options forfeited, unvested, exercise price $ 2.92      
Fair value of options vested $ 103,000 $ 271,000    
Expected to vest 26,000      
Unrecognized compensation cost $ 63,000      
Unrecognized compensation cost, period for recognition 1 year 3 months 19 days      
Director [Member] | Stock Incentive Plan [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted 20,000      
Options granted, exercise price $ 4.02      
Options grant date fair value $ 3.04      
Expiration period 10 years      
Vesting period 24 months      
Independent Directors [Member] | Stock Incentive Plan [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted   77,000    
Options granted, exercise price   $ 2.89    
Expiration period   10 years    
Independent Directors [Member] | Stock Incentive Plan [Member] | Vesting in Period One [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Vesting rate   50.00%    
Independent Directors [Member] | Stock Incentive Plan [Member] | Vesting in Period Two [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Vesting rate   25.00%    
Independent Directors [Member] | Stock Incentive Plan [Member] | Vesting in Period Three [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Vesting rate   25.00%    
Officers and Employees [Member] | Stock Incentive Plan [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted   150,000    
Options granted, exercise price   $ 2.89    
Expiration period   10 years    
Officers and Employees [Member] | Stock Incentive Plan [Member] | Vesting in Period One [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Vesting rate   50.00%    
Officers and Employees [Member] | Stock Incentive Plan [Member] | Vesting in Period Two [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Vesting rate   50.00%    
Restricted Stock [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted 197,000      
Options granted, exercise price $ 3.26      
Options grant date fair value $ 3.26      
Expiration period 24 months      
Vesting period 24 months      
Options forfeited, unvested 40,000      
Fair value of options vested $ 643,200      
Expected to vest 21,333    
Unrecognized compensation cost $ 435,200      
Unrecognized compensation cost, period for recognition 1 year 7 months 6 days      
Rights forfeited 833      
Restricted Stock [Member] | Board of Directors [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted 177,000      
Options forfeited 40,000      
Restricted Stock [Member] | Officer [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options granted 20,000      
Vested Options [Member] | Stock Incentive Plan [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options forfeited 438,414 21,825    
Options forfeited, exercise price $ 25.59 $ 39.81    
Unvested Options [Member] | Stock Incentive Plan [Member]        
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]        
Options forfeited 57,000 3,620    
Options forfeited, unvested, exercise price $ 2.92 $ 15.13