| INCOME TAXES (Details 1) - USD ($) | Dec. 31, 2018 | Dec. 31, 2017 | 
|---|---|---|
| Deferred tax assets (liabilities): | ||
| Net operating loss carryforwards | $ 38,761,000 | $ 50,029,000 | 
| General business credit carryforwards | 3,214,000 | 3,227,000 | 
| State credits | 3,012,000 | 3,089,000 | 
| Property, equipment and goodwill | (72,000) | (28,000) | 
| Stock options | 6,316,000 | 5,122,000 | 
| Derivatives | (57,000) | (57,000) | 
| Deferred revenue | 62,000 | 778,000 | 
| Intangible assets | 399,000 | 379,000 | 
| Accrued interest | 0 | 156,000 | 
| Other | 80,000 | 143,000 | 
| Gross deferred tax assets | 51,715,000 | 62,838,000 | 
| Valuation allowance | (51,715,000) | (62,838,000) | 
| Net deferred taxes | $ 0 | $ 0 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from deferred income. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from intangible assets including goodwill. No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences and carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount after allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences and carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible operating loss carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount, before allocation of valuation allowance, of deferred tax asset attributable to deductible temporary differences, classified as other. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from state taxes. No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible general business tax credit carryforwards. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from share-based compensation. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from accrued liabilities. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax assets for which it is more likely than not that a tax benefit will not be realized. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax liability attributable to taxable temporary differences from derivatives. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax liability attributable to taxable temporary differences from property, plant, and equipment. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |