| 7. NOTES PAYABLE (Tables)
 | 9 Months Ended | 
| Sep. 30, 2017 | 
|---|
| Unsecured Note Payable [Member] |  | 
| Schedule of debt | 
    |  |  | Maturity |  | September
    30, 2017 |  |  | December
    31, 2016 |  |  | Interest Rate |  
    |  |  |  |  |  |  |  |  |  |  |  |  
    | Unsecured promissory
    note payable |  | February 1, 2018 |  | $ | 850,000 |  |  | $ | 850,000 |  |  | 12% |  
    | Unamortized original issue
    discount and debt issuance costs |  |  |  |  | (8,096 | ) |  |  | (26,309 | ) |  |  |  
    | Unamortized
    debt discount - fair value of warrants |  |  |  |  | (44,467 | ) |  |  | (144,517 | ) |  |  |  
    |  |  |  |  |  |  |  |  |  |  |  |  |  |  
    | Net carrying amount of debt |  |  |  |  | 797,437 |  |  |  | 679,174 |  |  |  |  
    | Less
    current portion |  |  |  |  | (797,437 | ) |  |  | – |  |  |  |  
    | Long-term
    borrowings - net of current portion |  |  |  | $ | – |  |  | $ | 679,174 |  |  |  |  | 
| Iliad Note [Member] | Convertible Notes Payable [Member] [Default Label] |  | 
| Schedule of debt | 
    |  |  | September
    30, 2017
 |  |  | December
    31, 2016
 |  |  
    |  |  |  |  |  |  |  |  
    | Iliad Note (defined below) |  | $ | 344,596 |  |  | $ | 1,897,976 |  |  
    | Iliad Note 2 (defined below) |  |  | 794,095 |  |  |  | – |  |  
    |  |  | $ | 1,138,691 |  |  | $ | 1,897,976 |  |  | 
| Schedule of conversions | 
    |  |  | Maturity |  | September
    30, 2017
 |  |  | December
    31, 2016
 |  |  | Interest Rate |  
    |  |  |  |  |  |  |  |  |  |  |  |  
    | Secured promissory
    note payable |  | April 1, 2018 |  | $ | 2,055,000 |  |  | $ | 2,055,000 |  |  | 10% |  
    | Interest accrued |  |  |  |  | 194,596 |  |  |  | 128,311 |  |  |  |  
    | Unamortized original issue
    discount and debt issuance costs |  |  |  |  | – |  |  |  | (35,335 | ) |  |  |  
    | Conversion of convertible
    promissory notes and accrued interest to common stock |  |  |  |  | (1,905,000 | ) |  |  | (175,000 | ) |  |  |  
    | Conversion
    of convertible promissory notes and accrued interest to accrued liabilities |  |  |  |  | – |  |  |  | (75,000 | ) |  |  |  
    |  |  |  |  |  |  |  |  |  |  |  |  |  |  
    | Net carrying amount of debt |  |  |  |  | 344,596 |  |  |  | 1,897,976 |  |  |  |  
    | Less
    current portion |  |  |  |  | (344,596 | ) |  |  | (1,897,976 | ) |  |  |  
    | Long-term
    borrowings - net of current portion |  |  |  | $ | – |  |  | $ | – |  |  |  |    
    |  |  |  |  |  | 2016 |  |  |  |  |  
    |  |  | Maturity |  |  | Balance |  |  | Interest
    Rate |  |  
    | Senior Secured Convertible Promissory Notes: |  |  |  |  |  |  |  |  |  |  |  |  |  
    |  |  |  |  |  |  |  |  |  |  |  |  |  |  
    | Tranche 1 (Note 1) |  |  | May 19, 2016 |  |  | $ | – |  |  |  | 10% |  |  
    | Tranche 2 (Note 2) |  |  | June 12, 2016 |  |  |  | 255,000 |  |  |  | 10% |  |  
    | Tranche 3 (Note 3) |  |  | July 24, 2016 |  |  |  | 510,000 |  |  |  | 10% |  |  
    | Tranche 4 (Note 4) |  |  | September 16, 2016 |  |  |  | 255,000 |  |  |  | 10% |  |  
    | Total borrowings |  |  |  |  |  |  | 1,020,000 |  |  |  |  |  |  
    |  |  |  |  |  |  |  |  |  |  |  |  |  |  
    | Convertible notes converted (Note 1) |  |  |  |  |  |  | – |  |  |  |  |  |  
    | Convertible notes converted (Note 2) |  |  |  |  |  |  | (255,000 | ) |  |  |  |  |  
    | Convertible notes converted/repaid (Note 3) |  |  |  |  |  |  | (510,000 | ) |  |  |  |  |  
    | Convertible notes repaid (Note 4) |  |  |  |  |  |  | (255,000 | ) |  |  |  |  |  
    | Unamortized debt issuance cost |  |  |  |  |  |  | – |  |  |  |  |  |  
    | Unamortized debt discount - beneficial conversion
    feature |  |  |  |  |  |  | – |  |  |  |  |  |  
    |  |  |  |  |  |  |  |  |  |  |  |  |  |  
    | Net carrying amount of debt |  |  |  |  |  |  | – |  |  |  |  |  |  
    | Less current portion |  |  |  |  |  |  | – |  |  |  |  |  |  
    | Long-term borrowings - net of current portion |  |  |  |  |  | $ | – |  |  |  |  |  |    | 
| Iliad Note 2 [Member] | Convertible Notes Payable [Member] [Default Label] |  | 
| Schedule of conversions | 
    |  |  | Maturity |  | September
    30, 2017
 |  |  | December
    31, 2016
 |  |  | Interest Rate |  
    |  |  |  |  |  |  |  |  |  |  |  |  
    | Secured promissory
    note payable |  | April 30, 2018 |  | $ | 770,000 |  |  | $ | – |  |  | 8% |  
    | Interest accrued |  |  |  |  | 37,319 |  |  |  | – |  |  |  |  
    | Unamortized original issue
    discount and debt issuance costs |  |  |  |  | (9,999 | ) |  |  | – |  |  |  |  
    | Unamortized
    discount - embedded derivative |  |  |  |  | (3,225 | ) |  |  | – |  |  |  |  
    |  |  |  |  |  |  |  |  |  |  |  |  |  |  
    | Net carrying amount of debt |  |  |  |  | 794,095 |  |  |  | – |  |  |  |  
    | Less
    current portion |  |  |  |  | (794,095 | ) |  |  | – |  |  |  |  
    | Long-term
    borrowings - net of current portion |  |  |  | $ | – |  |  | $ | – |  |  |  |  |