| 
           10. STOCK-BASED COMPENSATION (Details-Stock based compensation expense) (USD $) 
        In Thousands, unless otherwise specified  | 
        12 Months Ended | |
|---|---|---|
| 
           Dec. 31, 2013 
         | 
        
           Dec. 31, 2012 
         | 
      |
| Total stock-based compensation expense | $ 1,724 | $ 806 | 
| 
           Employees [Member] 
         | 
        ||
| Total stock-based compensation expense | 1,333 | 782 | 
| 
           Non-Employees [Member] 
         | 
        ||
| Total stock-based compensation expense | $ 391 | $ 24 | 
| X | ||||||||||
| 
             
- Definition 
          Represents the expense recognized during the period arising from equity-based compensation arrangements (for example, shares of stock, unit, stock options or other equity instruments) with employees, directors and certain consultants qualifying for treatment as employees. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
  |