function fillCategory(){ // this function is used to fill the category list on load addOption(document.frm_item.categoryId, '2', 'ADD/ADHD/Impulse Control', '0');addOption(document.frm_item.categoryId, '3', 'Addictions', '0');addOption(document.frm_item.categoryId, '71', 'Anger', '0');addOption(document.frm_item.categoryId, '7', 'Anxiety/Panic', '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, '11', 'Brain', '0');addOption(document.frm_item.categoryId, '12', 'Bullying', '0');addOption(document.frm_item.categoryId, '14', 'Child and Youth', '0');addOption(document.frm_item.categoryId, '15', 'Childrens Books', '0');addOption(document.frm_item.categoryId, '16', 'Chronic Illness', '0');addOption(document.frm_item.categoryId, '19', 'Color Cards', '0');addOption(document.frm_item.categoryId, '20', 'Communication/Life Skills/Social Skills', '0');addOption(document.frm_item.categoryId, '21', 'Conduct Disorder', '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, '25', 'Disabilities', '0');addOption(document.frm_item.categoryId, '27', 'Divorce', '0');addOption(document.frm_item.categoryId, '28', 'DVD/CD', '0');addOption(document.frm_item.categoryId, '29', 'Early Childhood', '0');addOption(document.frm_item.categoryId, '30', 'Eating Disorders', '0');addOption(document.frm_item.categoryId, '78', 'Eldercare', '0');addOption(document.frm_item.categoryId, '31', 'EMDR/Energy', '0');addOption(document.frm_item.categoryId, '32', 'Family of Origin', '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, '37', 'Gifted', '0');addOption(document.frm_item.categoryId, '38', 'Grief', '0');addOption(document.frm_item.categoryId, '39', 'Group Therapy', '0');addOption(document.frm_item.categoryId, '106', 'Hawthorne', '0');addOption(document.frm_item.categoryId, '40', 'Health/Wellness', '0');addOption(document.frm_item.categoryId, '82', 'Hypnotism', '0');addOption(document.frm_item.categoryId, '41', 'Learning Differences', '0');addOption(document.frm_item.categoryId, '42', 'Meditation', '0');addOption(document.frm_item.categoryId, '44', 'Mental Illness', '0');addOption(document.frm_item.categoryId, '45', 'Mind - Body', '0');addOption(document.frm_item.categoryId, '46', 'New Item', '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, '51', 'Posters', '0');addOption(document.frm_item.categoryId, '92', 'Psychiatry/Psychology/Psychotherapy', '0');addOption(document.frm_item.categoryId, '107', 'Puppets & Toys', '0');addOption(document.frm_item.categoryId, '55', 'Restorative Practice', '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, '58', 'Software', '0');addOption(document.frm_item.categoryId, '98', 'Special Needs', '0');addOption(document.frm_item.categoryId, '59', 'Special Order', '0');addOption(document.frm_item.categoryId, '61', 'Speechmark', '0');addOption(document.frm_item.categoryId, '101', 'Teenagers and Pre-teens', '0');addOption(document.frm_item.categoryId, '63', 'Therapy', '0');addOption(document.frm_item.categoryId, '64', 'Time Timers', '0');addOption(document.frm_item.categoryId, '110', 'Toys', '0');addOption(document.frm_item.categoryId, '68', 'Trauma', '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 == '92'){addOption(document.frm_item.subCategoryId,'159', 'Acceptance & Commitment (ACT)','0');addOption(document.frm_item.subCategoryId,'94', 'Adler','0');addOption(document.frm_item.subCategoryId,'184', 'Anger','0');addOption(document.frm_item.subCategoryId,'183', 'Anxiety/OCD','0');addOption(document.frm_item.subCategoryId,'162', 'Art/Play/Drama Therapy','0');addOption(document.frm_item.subCategoryId,'161', 'Brief/Narrative','0');addOption(document.frm_item.subCategoryId,'185', 'Child and Youth','0');addOption(document.frm_item.subCategoryId,'160', 'EMDR/Energy','0');addOption(document.frm_item.subCategoryId,'108', 'Family Therapy','0');addOption(document.frm_item.subCategoryId,'86', 'Reference','0');addOption(document.frm_item.subCategoryId,'117', 'Treatment','0');}if(document.frm_item.categoryId.value == '2'){addOption(document.frm_item.subCategoryId,'175', 'Adults/Teens','0');addOption(document.frm_item.subCategoryId,'2', 'All Ages','0');}if(document.frm_item.categoryId.value == '3'){addOption(document.frm_item.subCategoryId,'3', 'Clients','0');addOption(document.frm_item.subCategoryId,'4', 'Clinical','0');addOption(document.frm_item.subCategoryId,'98', 'Co-occuring','0');addOption(document.frm_item.subCategoryId,'5', 'Codependency','0');addOption(document.frm_item.subCategoryId,'6', 'Dual Disorder','0');addOption(document.frm_item.subCategoryId,'165', 'Youth','0');}if(document.frm_item.categoryId.value == '5'){addOption(document.frm_item.subCategoryId,'7', 'General','0');}if(document.frm_item.categoryId.value == '7'){addOption(document.frm_item.subCategoryId,'8', 'Adult Books/Workbooks','0');addOption(document.frm_item.subCategoryId,'9', 'Obsessive Compulsive Disorder','0');addOption(document.frm_item.subCategoryId,'10', 'Perfectionism','0');addOption(document.frm_item.subCategoryId,'11', 'Shyness','0');addOption(document.frm_item.subCategoryId,'13', 'Youth','0');}if(document.frm_item.categoryId.value == '40'){addOption(document.frm_item.subCategoryId,'101', 'Balanced Living','0');addOption(document.frm_item.subCategoryId,'78', 'Cancer','0');addOption(document.frm_item.subCategoryId,'79', 'Disorder','0');addOption(document.frm_item.subCategoryId,'80', 'General','0');addOption(document.frm_item.subCategoryId,'170', 'Meditation','0');addOption(document.frm_item.subCategoryId,'169', 'Mind - Body','0');addOption(document.frm_item.subCategoryId,'83', 'Pain','0');addOption(document.frm_item.subCategoryId,'113', 'Personal Growth','0');addOption(document.frm_item.subCategoryId,'115', 'Self-Help','0');addOption(document.frm_item.subCategoryId,'100', 'Sleep Disorders','0');addOption(document.frm_item.subCategoryId,'114', 'Stress/Relaxation','0');addOption(document.frm_item.subCategoryId,'84', 'Women','0');addOption(document.frm_item.subCategoryId,'171', 'Workplace','0');}if(document.frm_item.categoryId.value == '63'){addOption(document.frm_item.subCategoryId,'14', 'Art/Play/Drama','0');addOption(document.frm_item.subCategoryId,'16', 'Brief/Narrative','0');}if(document.frm_item.categoryId.value == '50'){addOption(document.frm_item.subCategoryId,'15', 'Borderline/Narcissism','0');addOption(document.frm_item.subCategoryId,'110', 'Conduct Disorder','0');addOption(document.frm_item.subCategoryId,'111', 'Oppositional Defiant Disorder','0');addOption(document.frm_item.subCategoryId,'93', 'Schizophrenia','0');}if(document.frm_item.categoryId.value == '15'){addOption(document.frm_item.subCategoryId,'77', 'Abuse','0');addOption(document.frm_item.subCategoryId,'18', 'Adoption','0');addOption(document.frm_item.subCategoryId,'19', 'Anger','0');addOption(document.frm_item.subCategoryId,'103', 'Anxiety','0');addOption(document.frm_item.subCategoryId,'21', 'Bullying','0');addOption(document.frm_item.subCategoryId,'22', 'Disabilities','0');addOption(document.frm_item.subCategoryId,'104', 'Divorce','0');addOption(document.frm_item.subCategoryId,'24', 'Empathy','0');addOption(document.frm_item.subCategoryId,'25', 'Feelings','0');addOption(document.frm_item.subCategoryId,'26', 'Grief','0');addOption(document.frm_item.subCategoryId,'27', 'Illness','0');addOption(document.frm_item.subCategoryId,'28', 'Lessons','0');addOption(document.frm_item.subCategoryId,'29', 'Mental Health','0');addOption(document.frm_item.subCategoryId,'118', 'Safety','0');addOption(document.frm_item.subCategoryId,'105', 'Self-Esteem','0');addOption(document.frm_item.subCategoryId,'107', 'Sex Education','0');addOption(document.frm_item.subCategoryId,'106', 'Violence','0');}if(document.frm_item.categoryId.value == '14'){addOption(document.frm_item.subCategoryId,'20', 'Anxiety/Stress/OCD','0');addOption(document.frm_item.subCategoryId,'163', 'Behavior/Emotions','0');addOption(document.frm_item.subCategoryId,'23', 'Divorce','0');addOption(document.frm_item.subCategoryId,'31', 'Self Esteem/Social Skills','0');addOption(document.frm_item.subCategoryId,'32', 'Sex Education','0');}if(document.frm_item.categoryId.value == '20'){addOption(document.frm_item.subCategoryId,'34', 'Adults','0');addOption(document.frm_item.subCategoryId,'112', 'Workplace','0');}if(document.frm_item.categoryId.value == '22'){addOption(document.frm_item.subCategoryId,'35', 'Adult','0');addOption(document.frm_item.subCategoryId,'42', 'Child & Youth','0');addOption(document.frm_item.subCategoryId,'36', 'Conflict/Bullying','0');addOption(document.frm_item.subCategoryId,'37', 'Educator','0');addOption(document.frm_item.subCategoryId,'38', 'Grief/Suicide','0');addOption(document.frm_item.subCategoryId,'39', 'Life Skills','0');addOption(document.frm_item.subCategoryId,'40', 'Social Skills','0');addOption(document.frm_item.subCategoryId,'41', 'Sopris','0');}if(document.frm_item.categoryId.value == '23'){addOption(document.frm_item.subCategoryId,'43', 'Abusive','0');addOption(document.frm_item.subCategoryId,'44', 'Relationships','0');addOption(document.frm_item.subCategoryId,'45', 'Therapy','0');}if(document.frm_item.categoryId.value == '24'){addOption(document.frm_item.subCategoryId,'46', 'Adult','0');addOption(document.frm_item.subCategoryId,'47', 'Bipolar','0');addOption(document.frm_item.subCategoryId,'48', 'Suicide','0');addOption(document.frm_item.subCategoryId,'49', 'Youth','0');}if(document.frm_item.categoryId.value == '27'){addOption(document.frm_item.subCategoryId,'172', 'Adults','0');addOption(document.frm_item.subCategoryId,'50', 'All Ages','0');}if(document.frm_item.categoryId.value == '36'){addOption(document.frm_item.subCategoryId,'109', 'Activity Books','0');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 == '38'){addOption(document.frm_item.subCategoryId,'54', 'Adult','0');addOption(document.frm_item.subCategoryId,'55', 'Youth','0');}if(document.frm_item.categoryId.value == '47'){addOption(document.frm_item.subCategoryId,'56', 'Adults','0');addOption(document.frm_item.subCategoryId,'57', 'Youth','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', 'Teens','0');}if(document.frm_item.categoryId.value == '57'){addOption(document.frm_item.subCategoryId,'64', 'Adult','0');addOption(document.frm_item.subCategoryId,'63', 'Child/Adolescent','0');}if(document.frm_item.categoryId.value == '68'){addOption(document.frm_item.subCategoryId,'65', 'Abuse','0');addOption(document.frm_item.subCategoryId,'66', 'Client','0');addOption(document.frm_item.subCategoryId,'67', 'Clinical','0');addOption(document.frm_item.subCategoryId,'68', 'Dissociation','0');addOption(document.frm_item.subCategoryId,'96', 'PTSD','0');addOption(document.frm_item.subCategoryId,'69', 'Secondary','0');addOption(document.frm_item.subCategoryId,'70', 'Self-Harm','0');addOption(document.frm_item.subCategoryId,'97', 'Violence','0');addOption(document.frm_item.subCategoryId,'71', 'Youth','0');}if(document.frm_item.categoryId.value == '102'){addOption(document.frm_item.subCategoryId,'121', 'Anxiety','0');}if(document.frm_item.categoryId.value == '51'){addOption(document.frm_item.subCategoryId,'88', 'Autism/Asperger','0');}if(document.frm_item.categoryId.value == '106'){addOption(document.frm_item.subCategoryId,'91', 'ADD/ADHD','0');addOption(document.frm_item.subCategoryId,'89', 'Behavior','0');addOption(document.frm_item.subCategoryId,'92', 'Learning Disorders','0');}if(document.frm_item.categoryId.value == '32'){addOption(document.frm_item.subCategoryId,'99', 'Adult Child','0');}if(document.frm_item.categoryId.value == '71'){addOption(document.frm_item.subCategoryId,'153', 'Adult','0');addOption(document.frm_item.subCategoryId,'152', 'Child & Youth','0');}if(document.frm_item.categoryId.value == '82'){addOption(document.frm_item.subCategoryId,'116', 'Treatment Techniques','0');}if(document.frm_item.categoryId.value == '97'){addOption(document.frm_item.subCategoryId,'174', 'Children','0');addOption(document.frm_item.subCategoryId,'173', 'Youth (Pre-teen and Teen)','0');}if(document.frm_item.categoryId.value == '101'){addOption(document.frm_item.subCategoryId,'147', 'Lessons Life and School','0');addOption(document.frm_item.subCategoryId,'148', 'Self Esteem/Social Skills','0');}if(document.frm_item.categoryId.value == '107'){addOption(document.frm_item.subCategoryId,'150', 'Puppets','0');addOption(document.frm_item.subCategoryId,'151', 'Toys/Miscellaneous','0');}if(document.frm_item.categoryId.value == '41'){addOption(document.frm_item.subCategoryId,'182', 'Educators/Professionals','0');}if(document.frm_item.categoryId.value == '10'){addOption(document.frm_item.subCategoryId,'155', 'Anger','0');addOption(document.frm_item.subCategoryId,'166', 'Books for Children','0');addOption(document.frm_item.subCategoryId,'156', 'DVDs/CDs','0');}if(document.frm_item.categoryId.value == '19'){addOption(document.frm_item.subCategoryId,'158', 'Cards','0');addOption(document.frm_item.subCategoryId,'157', 'Speechmark','0');}if(document.frm_item.categoryId.value == '111'){addOption(document.frm_item.subCategoryId,'167', 'Adult/All Ages','0');addOption(document.frm_item.subCategoryId,'168', 'Child & Youth','0');}if(document.frm_item.categoryId.value == '0'){addOption(document.frm_item.subCategoryId,'181', 'a test run','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); }