function fillCategory(){ // this function is used to fill the category list on load addOption(document.frm_item.categoryId, '2', 'ADD/ADHD', '0');addOption(document.frm_item.categoryId, '3', 'Addictions', '0');addOption(document.frm_item.categoryId, '5', 'Adoption', '0');addOption(document.frm_item.categoryId, '69', 'Adult Child', '0');addOption(document.frm_item.categoryId, '70', 'Aging', '0');addOption(document.frm_item.categoryId, '71', 'Anger', '0');addOption(document.frm_item.categoryId, '7', 'Anxiety', '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 (ages 0 to 7)', '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', '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 ', '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, '80', 'Healthy Living', '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, '85', 'Memory', '0');addOption(document.frm_item.categoryId, '43', 'Mental Health', '0');addOption(document.frm_item.categoryId, '44', 'Mental Illness', '0');addOption(document.frm_item.categoryId, '45', 'Mind - Body', '0');addOption(document.frm_item.categoryId, '87', 'Motherhood', '0');addOption(document.frm_item.categoryId, '46', 'New Item', '0');addOption(document.frm_item.categoryId, '88', 'OCD', '0');addOption(document.frm_item.categoryId, '47', 'Offender', '0');addOption(document.frm_item.categoryId, '48', 'Parenting', '0');addOption(document.frm_item.categoryId, '49', 'Personal Care', '0');addOption(document.frm_item.categoryId, '90', 'Personal Growth', '0');addOption(document.frm_item.categoryId, '50', 'Personality Disorder', '0');addOption(document.frm_item.categoryId, '51', 'Posters', '0');addOption(document.frm_item.categoryId, '52', 'Pre-teen', '0');addOption(document.frm_item.categoryId, '91', 'Pregnancy/Childcare', '0');addOption(document.frm_item.categoryId, '92', 'Psychology/Psychiatry', '0');addOption(document.frm_item.categoryId, '95', 'Psychotherapy', '0');addOption(document.frm_item.categoryId, '53', 'PTSD/Trauma', '0');addOption(document.frm_item.categoryId, '107', 'Puppets & Toys', '0');addOption(document.frm_item.categoryId, '96', 'Relationships', '0');addOption(document.frm_item.categoryId, '54', 'Relaxation', '0');addOption(document.frm_item.categoryId, '55', 'Restorative Practice', '0');addOption(document.frm_item.categoryId, '56', 'Schizophrenia', '0');addOption(document.frm_item.categoryId, '97', 'Self-Esteem', '0');addOption(document.frm_item.categoryId, '57', '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, '99', 'Spirituality', '0');addOption(document.frm_item.categoryId, '100', 'Stress', '0');addOption(document.frm_item.categoryId, '62', 'Teen', '0');addOption(document.frm_item.categoryId, '101', 'Teen/Self-Help', '0');addOption(document.frm_item.categoryId, '102', 'Teenagers', '0');addOption(document.frm_item.categoryId, '63', 'Therapy', '0');addOption(document.frm_item.categoryId, '64', 'Time Timers', '0');addOption(document.frm_item.categoryId, '103', 'Tools for Change', '0');addOption(document.frm_item.categoryId, '68', 'Trauma', '0');addOption(document.frm_item.categoryId, '66', 'Treatment', '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,'94', 'Adler','0');addOption(document.frm_item.subCategoryId,'85', 'Disorder','0');addOption(document.frm_item.subCategoryId,'108', 'Family Therapy','0');addOption(document.frm_item.subCategoryId,'86', 'Reference','0');addOption(document.frm_item.subCategoryId,'87', 'Symptom','0');}if(document.frm_item.categoryId.value == '2'){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');}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','0');addOption(document.frm_item.subCategoryId,'9', 'OCD','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,'83', 'Pain','0');addOption(document.frm_item.subCategoryId,'100', 'Sleep Disorders','0');addOption(document.frm_item.subCategoryId,'84', 'Women','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,'102', 'BPD','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,'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','0');addOption(document.frm_item.subCategoryId,'23', 'Divorce','0');addOption(document.frm_item.subCategoryId,'31', 'Self Esteem','0');addOption(document.frm_item.subCategoryId,'32', 'Sex Education','0');addOption(document.frm_item.subCategoryId,'33', 'Violence','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,'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 == '66'){addOption(document.frm_item.subCategoryId,'72', 'Planners','0');addOption(document.frm_item.subCategoryId,'73', 'Resources','0');addOption(document.frm_item.subCategoryId,'74', 'Techniques','0');addOption(document.frm_item.subCategoryId,'75', 'Youth','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');} } ////////////////// 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); }