function fillCategory(){ // this function is used to fill the category list on load addOption(document.frm_item.categoryId, '3', 'Addictions', '0');addOption(document.frm_item.categoryId, '2', 'ADHD/ADD', '0');addOption(document.frm_item.categoryId, '71', 'Anger', '0');addOption(document.frm_item.categoryId, '7', 'Anxiety/Panic', '0');addOption(document.frm_item.categoryId, '117', 'Art and Play Therapy', '0');addOption(document.frm_item.categoryId, '8', 'Attachment', '0');addOption(document.frm_item.categoryId, '9', 'Audio', '0');addOption(document.frm_item.categoryId, '10', 'Autism/Asperger', '0');addOption(document.frm_item.categoryId, '113', 'Behavior Intervention', '0');addOption(document.frm_item.categoryId, '11', 'Brain', '0');addOption(document.frm_item.categoryId, '15', 'Childrens Books', '0');addOption(document.frm_item.categoryId, '118', 'Communication', '0');addOption(document.frm_item.categoryId, '22', 'Counselling', '0');addOption(document.frm_item.categoryId, '23', 'Couples', '0');addOption(document.frm_item.categoryId, '24', 'Depression', '0');addOption(document.frm_item.categoryId, '27', 'Divorce', '0');addOption(document.frm_item.categoryId, '29', 'Early Childhood', '0');addOption(document.frm_item.categoryId, '30', 'Eating Disorders', '0');addOption(document.frm_item.categoryId, '116', 'Educator/Professional', '0');addOption(document.frm_item.categoryId, '34', 'FASD', '0');addOption(document.frm_item.categoryId, '35', 'First Nations', '0');addOption(document.frm_item.categoryId, '36', 'Games and Card Games', '0');addOption(document.frm_item.categoryId, '38', 'Grief/Loss', '0');addOption(document.frm_item.categoryId, '106', 'Hawthorne', '0');addOption(document.frm_item.categoryId, '40', 'Health/Wellness', '0');addOption(document.frm_item.categoryId, '41', 'Learning Disabilities', '0');addOption(document.frm_item.categoryId, '20', 'Life Skills/Social Skills', '0');addOption(document.frm_item.categoryId, '44', 'Mental Illness', '0');addOption(document.frm_item.categoryId, '47', 'Offender', '0');addOption(document.frm_item.categoryId, '48', 'Parenting', '0');addOption(document.frm_item.categoryId, '50', 'Personality Disorder', '0');addOption(document.frm_item.categoryId, '92', 'Psychiatry/Psychology', '0');addOption(document.frm_item.categoryId, '68', 'PTSD/Trauma', '0');addOption(document.frm_item.categoryId, '107', 'Puppets & Toys', '0');addOption(document.frm_item.categoryId, '115', 'Relationships', '0');addOption(document.frm_item.categoryId, '97', 'Self-Esteem', '0');addOption(document.frm_item.categoryId, '57', 'Sex Education/Sexuality', '0');addOption(document.frm_item.categoryId, '25', 'Special Needs/Disabilities', '0');addOption(document.frm_item.categoryId, '59', 'Special Order', '0');addOption(document.frm_item.categoryId, '119', 'Workplace/Leadership', '0');} // end of JS function function SelectSubCat(){ // ON or after selection of category this function will work removeAllOptions(document.frm_item.subCategoryId); addOption(document.frm_item.subCategoryId, '', 'No Subcategory Selected', '1');if(document.frm_item.categoryId.value == '2'){addOption(document.frm_item.subCategoryId,'220', 'Adult/Parent','0');addOption(document.frm_item.subCategoryId,'221', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'222', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '68'){addOption(document.frm_item.subCategoryId,'97', 'Domestic Violence/Abuse/Rape','0');addOption(document.frm_item.subCategoryId,'189', 'EMDR/Energy Therapy','0');addOption(document.frm_item.subCategoryId,'207', 'General','0');addOption(document.frm_item.subCategoryId,'209', 'Self Harm','0');addOption(document.frm_item.subCategoryId,'208', 'Sexual Offender','0');}if(document.frm_item.categoryId.value == '113'){addOption(document.frm_item.subCategoryId,'192', 'Bullying','0');addOption(document.frm_item.subCategoryId,'191', 'Conduct Disorder/ODD','0');addOption(document.frm_item.subCategoryId,'234', 'Functional Assessment/Hawthorne','0');addOption(document.frm_item.subCategoryId,'272', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '3'){addOption(document.frm_item.subCategoryId,'232', 'Alcohol/Substance Abuse','0');addOption(document.frm_item.subCategoryId,'188', 'Co-occurring/Dual Diagnosis','0');addOption(document.frm_item.subCategoryId,'5', 'Codependency/Family of Origin','0');addOption(document.frm_item.subCategoryId,'6', 'Dual Disorder','0');}if(document.frm_item.categoryId.value == '7'){addOption(document.frm_item.subCategoryId,'235', 'Adults/Parents','0');addOption(document.frm_item.subCategoryId,'9', 'Obsessive Compulsive Disorder','0');addOption(document.frm_item.subCategoryId,'233', 'Professional/Educator','0');addOption(document.frm_item.subCategoryId,'195', 'Shyness/Social Phobias','0');}if(document.frm_item.categoryId.value == '50'){addOption(document.frm_item.subCategoryId,'15', 'Borderline/Narcissism','0');}if(document.frm_item.categoryId.value == '38'){addOption(document.frm_item.subCategoryId,'55', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'198', 'Palliative Care/Death','0');addOption(document.frm_item.subCategoryId,'199', 'Suicide','0');}if(document.frm_item.categoryId.value == '15'){addOption(document.frm_item.subCategoryId,'27', 'Illness','0');}if(document.frm_item.categoryId.value == '44'){addOption(document.frm_item.subCategoryId,'202', 'Borderline Personality Disorder','0');addOption(document.frm_item.subCategoryId,'214', 'General','0');addOption(document.frm_item.subCategoryId,'201', 'Personality/Narcissism/Histrionic','0');addOption(document.frm_item.subCategoryId,'277', 'Professional','0');addOption(document.frm_item.subCategoryId,'200', 'Schizophrenia','0');}if(document.frm_item.categoryId.value == '22'){addOption(document.frm_item.subCategoryId,'42', 'Child & Youth','0');addOption(document.frm_item.subCategoryId,'40', 'Social Skills','0');}if(document.frm_item.categoryId.value == '23'){addOption(document.frm_item.subCategoryId,'44', 'Relationships','0');}if(document.frm_item.categoryId.value == '24'){addOption(document.frm_item.subCategoryId,'46', 'Adult/Parent','0');addOption(document.frm_item.subCategoryId,'47', 'Bipolar','0');addOption(document.frm_item.subCategoryId,'216', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'213', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '27'){addOption(document.frm_item.subCategoryId,'50', 'Relationships Divorce','0');}if(document.frm_item.categoryId.value == '36'){addOption(document.frm_item.subCategoryId,'52', 'Board','0');addOption(document.frm_item.subCategoryId,'53', 'Card','0');addOption(document.frm_item.subCategoryId,'51', 'Miscellaneous','0');}if(document.frm_item.categoryId.value == '20'){addOption(document.frm_item.subCategoryId,'226', 'Adults/Parents','0');addOption(document.frm_item.subCategoryId,'227', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'228', 'Professional/Educator','0');addOption(document.frm_item.subCategoryId,'196', 'Self Esteem','0');}if(document.frm_item.categoryId.value == '48'){addOption(document.frm_item.subCategoryId,'58', 'Behavior','0');addOption(document.frm_item.subCategoryId,'59', 'Early','0');addOption(document.frm_item.subCategoryId,'60', 'General','0');addOption(document.frm_item.subCategoryId,'61', 'Pre-Teens and Teenagers','0');}if(document.frm_item.categoryId.value == '57'){addOption(document.frm_item.subCategoryId,'64', 'Adult/Parent','0');addOption(document.frm_item.subCategoryId,'263', 'Adults','0');addOption(document.frm_item.subCategoryId,'261', 'Children','0');addOption(document.frm_item.subCategoryId,'262', 'Pre-teens and Adolescents','0');addOption(document.frm_item.subCategoryId,'260', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '92'){addOption(document.frm_item.subCategoryId,'255', 'ACT/Adlerian Therapy','0');addOption(document.frm_item.subCategoryId,'204', 'Brief/Narrative/Hypnosis','0');addOption(document.frm_item.subCategoryId,'108', 'Family Therapy','0');addOption(document.frm_item.subCategoryId,'203', 'Group Therapy','0');addOption(document.frm_item.subCategoryId,'86', 'Professional/Reference','0');addOption(document.frm_item.subCategoryId,'211', 'Psychopharmacology','0');addOption(document.frm_item.subCategoryId,'256', 'Techniques/Resources','0');}if(document.frm_item.categoryId.value == '25'){addOption(document.frm_item.subCategoryId,'240', 'Adult/Parent','0');addOption(document.frm_item.subCategoryId,'241', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'230', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '116'){addOption(document.frm_item.subCategoryId,'268', 'Conflict Resolution','0');addOption(document.frm_item.subCategoryId,'197', 'Gifted','0');addOption(document.frm_item.subCategoryId,'247', 'Grades 8 to 12','0');addOption(document.frm_item.subCategoryId,'248', 'Kindergarten to Grade 12','0');addOption(document.frm_item.subCategoryId,'246', 'Kindergarten to Grade 7','0');}if(document.frm_item.categoryId.value == '40'){addOption(document.frm_item.subCategoryId,'205', 'Illness','0');addOption(document.frm_item.subCategoryId,'170', 'Meditation/Stress Reduction','0');addOption(document.frm_item.subCategoryId,'266', 'Mind-body','0');addOption(document.frm_item.subCategoryId,'80', 'Personal Growth/Self-Help','0');}if(document.frm_item.categoryId.value == '106'){addOption(document.frm_item.subCategoryId,'89', 'Behavior','0');}if(document.frm_item.categoryId.value == '10'){addOption(document.frm_item.subCategoryId,'224', 'Adult/Parent','0');addOption(document.frm_item.subCategoryId,'225', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'269', 'Nonverbal Learning Disabilities','0');addOption(document.frm_item.subCategoryId,'271', 'Professional/Educator','0');addOption(document.frm_item.subCategoryId,'223', 'Sensory Processing Disorder','0');}if(document.frm_item.categoryId.value == '71'){addOption(document.frm_item.subCategoryId,'153', 'Adults/Parents','0');addOption(document.frm_item.subCategoryId,'152', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'229', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '41'){addOption(document.frm_item.subCategoryId,'276', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'250', 'Professional/Educator','0');addOption(document.frm_item.subCategoryId,'217', 'Speech & Language','0');}if(document.frm_item.categoryId.value == '97'){addOption(document.frm_item.subCategoryId,'173', 'Child & Youth','0');}if(document.frm_item.categoryId.value == '107'){addOption(document.frm_item.subCategoryId,'150', 'Puppets','0');}if(document.frm_item.categoryId.value == '8'){addOption(document.frm_item.subCategoryId,'219', 'Adoption','0');addOption(document.frm_item.subCategoryId,'237', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '115'){addOption(document.frm_item.subCategoryId,'257', 'Couples/Conflict','0');addOption(document.frm_item.subCategoryId,'193', 'Divorce','0');addOption(document.frm_item.subCategoryId,'258', 'Dysfunction/Emotion','0');addOption(document.frm_item.subCategoryId,'259', 'Physical/Psychological Abuse','0');}if(document.frm_item.categoryId.value == '35'){addOption(document.frm_item.subCategoryId,'194', 'Restorative Justice','0');}if(document.frm_item.categoryId.value == '34'){addOption(document.frm_item.subCategoryId,'275', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'249', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '117'){addOption(document.frm_item.subCategoryId,'236', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '11'){addOption(document.frm_item.subCategoryId,'238', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '118'){addOption(document.frm_item.subCategoryId,'239', 'Boundaries/Assertiveness','0');addOption(document.frm_item.subCategoryId,'273', 'General Communication Skills','0');addOption(document.frm_item.subCategoryId,'274', 'General Communication Skills','0');}if(document.frm_item.categoryId.value == '29'){addOption(document.frm_item.subCategoryId,'254', 'Parenting','0');addOption(document.frm_item.subCategoryId,'242', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '30'){addOption(document.frm_item.subCategoryId,'245', 'Children and Adolescents','0');addOption(document.frm_item.subCategoryId,'243', 'Professional/Educator','0');}if(document.frm_item.categoryId.value == '119'){addOption(document.frm_item.subCategoryId,'267', 'Conflict Resolution','0');addOption(document.frm_item.subCategoryId,'264', 'Groups/Teambuilding','0');} } ////////////////// function removeAllOptions(selectbox) { var i; for(i=selectbox.options.length-1;i>=0;i--) { //selectbox.options.remove(i); selectbox.remove(i); } } function addOption(selectbox, value, text,selected ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; if (selected==1) { optn.selected = true; } selectbox.options.add(optn); }