| 13. Commitments and Contingencies (Details-Minimum lease payments) | Dec. 31, 2016  USD ($) | 
|---|---|
| Commitments and Contingencies Disclosure [Abstract] | |
| Year ending December 31, 2017 | $ 816,135 | 
| Year ending December 31, 2018 | 546,459 | 
| Year ending December 31, 2019 | 529,450 | 
| Year ending December 31, 2020 | 451,369 | 
| Year ending December 31, 2021 | 68,168 | 
| Total minimum future lease payments | $ 2,411,581 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of required minimum rental payments for leases having an initial or remaining non-cancelable letter-terms in excess of one year. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the next fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the fifth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the fourth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the third fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the second fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 |