The present invention relates to certain compounds of FormulaIaand pharmaceutical compositions thereof that modulate the activity of the cannabinoid CB2receptor. The present invention further relates to certain compounds of FormulaIaand pharmaceutical compositions thereof that modulate the activities of both the CB1receptor and the CB2receptor.Compounds of the present invention and pharmaceutical compositions thereof are directed to methods useful in the treatment of: pain, for example bone and joint pain, muscle pain, dental pain, migraine and other headache pain, inflammatory pain, neuropathic pain, pain that occurs as an adverse effect of therapeutics and pain associated with osteoarthritis; hyperalgesia; allodynia; inflammatory hyperalgesia; neuropathic hyperalgesia; acute nociception; osteoporosis; multiple sclerosis-associated spasticity; autoimmune disorders; allergic reactions; CNS inflammation; atherosclerosis; undesired immune cell activity and inflammation; age-related macular degeneration; cough; leukemia; lymphoma; CNS tumors; prostate cancer; Alzheimer's disease; stroke-induced damage; dementia; amyotrophic lateral sclerosis, and Parkinson's disease.本發明係關於某些式Ia化合物及其醫藥組合物,其會調節類大麻酚CB2受體之活性。本發明係進一步關於某些式Ia化合物及其醫藥組合物,其會調節CB1受體與CB2受體兩者之活性。本發明之化合物及其醫藥組合物係針對可用於治療以下之方法:疼痛,例如骨頭與關節疼痛、肌肉疼痛、牙痛、偏頭痛與其他頭痛、炎性疼痛、神經病原性疼痛、因治療劑之不利作用而發生之疼痛及與骨關節炎有關聯之疼痛;痛覺過敏;痛覺異常;炎性痛覺過敏;神經病原性痛覺過敏;急性感受傷害;骨質疏鬆症;多發性硬化有關聯之痙攣狀態;自身免疫病症;過敏性反應;CNS發炎;動脈粥瘤硬化;不想要之免疫細胞活性與發炎;與老化有關聯之斑點變性;咳嗽;白血病;淋巴瘤;CNS腫瘤;前列腺癌;阿耳滋海默氏病;中風所引致之傷害;癡呆症;肌萎縮性側索硬化,及巴金生氏病。