12. STOCK BASED COMPENSATION (Details Compensation Expense) - USD ($) $ in Thousands |
12 Months Ended | |
|---|---|---|
Dec. 31, 2016 |
Dec. 31, 2015 |
|
| Allocated stock-based compensation | $ 2,468 | $ 431 |
| Research and Development [Member] | ||
| Allocated stock-based compensation | 157 | 137 |
| General and Administrative [Member] | ||
| Allocated stock-based compensation | 1,893 | 294 |
| Selling and Marketing [Member] | ||
| Allocated stock-based compensation | $ 418 | $ 0 |