14. INCOME TAXES (Details - Deferred valuation allowance) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2016
Dec. 31, 2015
Income Tax Disclosure [Abstract]    
Deferred tax asset valuation allowance, beginning balance $ 24,536 $ 21,378
Additions 11,296 3,163
Deductions 11,013 5
Deferred tax asset valuation allowance, ending balance $ 24,819 $ 24,536