

var __categories = {
"6": { name: "Accounting / Financial Services", id: 6,
      subs: [{ name: "Bookkeeping", id: 61 },{ name: "Business Planning", id: 64 },{ name: "Financial Analysis", id: 66 },{ name: "Inventory Management", id: 68 },{ name: "Investment Management", id: 65 },{ name: "Investment Research", id: 69 },{ name: "Quickbooks / Quicken", id: 71 },{ name: "Tax Preparation", id: 73 }]}
,"4": { name: "Administrative Assistant", id: 4,
      subs: [{ name: "Administrative Support", id: 36 },{ name: "Computer Services", id: 37 },{ name: "Customer Support", id: 38 },{ name: "Data Entry", id: 39 },{ name: "General Office Support", id: 41 },{ name: "Help Desk", id: 42 },{ name: "Time Management", id: 44 },{ name: "Transcription", id: 40 },{ name: "Travel Services", id: 46 },{ name: "Typing / Word processing", id: 49 }]}
,"15": { name: "Arts", id: 15,
      subs: [{ name: "Art Direction", id: 87 },{ name: "Ceramics", id: 88 },{ name: "Textiles", id: 89 }]}
,"16": { name: "Building / Construction", id: 16,
      subs: [{ name: "Carpentry / Framing", id: 90 },{ name: "Electrical / Plumbing", id: 91 },{ name: "Flooring / Tile", id: 92 },{ name: "Handyman Services", id: 93 },{ name: "Heavy Equipment Operations", id: 94 },{ name: "HVAC", id: 95 },{ name: "Ironwork / Metal Fabrication", id: 96 },{ name: "Masonry", id: 97 },{ name: "Painting", id: 99 },{ name: "Roofing", id: 100 }]}
,"2": { name: "Creative Design", id: 2,
      subs: [{ name: "Architecture", id: 5 },{ name: "Graphic Arts / Design", id: 10 },{ name: "Illustration", id: 8 },{ name: "Industrial Design", id: 7 },{ name: "Interior Design", id: 104 },{ name: "Landscape Design", id: 11 },{ name: "Logo Design", id: 12 },{ name: "Publishing", id: 103 }]}
,"3": { name: "Editorial / Writing", id: 3,
      subs: [{ name: "Business Writing", id: 21 },{ name: "Editing", id: 23 },{ name: "Financial Writing", id: 26 },{ name: "Grant Writing", id: 27 },{ name: "Legal Writing", id: 28 },{ name: "Proof Reading", id: 30 },{ name: "Resume Writing", id: 31 },{ name: "Screen Writing", id: 32 },{ name: "Sports Writing", id: 33 },{ name: "Technical Writing", id: 34 },{ name: "Translation", id: 25 },{ name: "Web Content", id: 35 }]}
,"8": { name: "Engineering / Manufacturing", id: 8,
      subs: [{ name: "CAD / Drafting", id: 79 },{ name: "Civil / Structural Engineering", id: 78 },{ name: "Electrical Engineering", id: 80 },{ name: "Environmental Engineering", id: 77 },{ name: "Manufacturing", id: 81 },{ name: "Mechanical Engineering", id: 107 }]}
,"11": { name: "Healthcare", id: 11,
      subs: [{ name: "Dental Services", id: 108 },{ name: "Healthcare Aid", id: 109 },{ name: "Mental Health", id: 110 },{ name: "Nursing", id: 111 },{ name: "Nutrition and Diet", id: 112 },{ name: "Optical Services", id: 113 }]}
,"1": { name: "Internet / Web Services", id: 1,
      subs: [{ name: "Data Modeling", id: 1 },{ name: "Network Design", id: 2 },{ name: "Software Development", id: 3 },{ name: "Technical Support", id: 86 },{ name: "Telecommunications", id: 85 },{ name: "Web Design", id: 84 },{ name: "Web Services", id: 4 }]}
,"7": { name: "Legal", id: 7,
      subs: [{ name: "Contracts Administration", id: 75 },{ name: "Legal Consulting", id: 74 },{ name: "ParaLegal / Research", id: 76 },{ name: "Patent / Trademark Law", id: 114 },{ name: "Real Estate Lar", id: 115 },{ name: "Tax Law", id: 116 }]}
,"10": { name: "Multimedia", id: 10,
      subs: [{ name: "Acting", id: 102 },{ name: "Audio / Video Editing", id: 16 },{ name: "Broadcast", id: 105 },{ name: "Computer Animation", id: 101 },{ name: "Digital / Film Photography", id: 14 },{ name: "Multimedia", id: 106 },{ name: "Music Production", id: 13 },{ name: "Photoshop", id: 15 },{ name: "Video Production", id: 17 },{ name: "Voice Acting", id: 19 }]}
,"9": { name: "Other / Not Classified", id: 9,
      subs: [{ name: "Civil / Social Organizations", id: 117 },{ name: "Environmental Services", id: 118 },{ name: "Fundraising", id: 119 },{ name: "Leisure, Travel and Tourism", id: 120 },{ name: "Music Lessons", id: 121 },{ name: "Non-profit Charitable", id: 122 },{ name: "Organizations", id: 123 },{ name: "Performing Arts", id: 124 },{ name: "Political Organizations", id: 125 },{ name: "Recreational Services", id: 126 },{ name: "Tutoring", id: 127 }]}
,"14": { name: "Personal / Household", id: 14,
      subs: [{ name: "Childcare", id: 128 },{ name: "Gardening / Landscaping", id: 129 },{ name: "House / Pet Sitting", id: 130 },{ name: "Housekeeping", id: 131 },{ name: "Meal Preparation", id: 132 },{ name: "Organizational Services", id: 133 },{ name: "Party Planning", id: 134 }]}
,"13": { name: "Real Estate", id: 13,
      subs: [{ name: "Mortgage Banking", id: 135 },{ name: "Property Leasing", id: 136 },{ name: "Property Management", id: 137 },{ name: "Real Estate Appraisal", id: 138 },{ name: "Real Estate Consulting", id: 139 },{ name: "Real Estate Development", id: 140 }]}
,"17": { name: "Restaurant / Food Services", id: 17,
      subs: [{ name: "Baker", id: 141 },{ name: "Barista", id: 142 },{ name: "Bartender", id: 143 },{ name: "Caterer", id: 144 },{ name: "Chef", id: 145 },{ name: "Dishwasher", id: 146 },{ name: "Restaurant Management", id: 147 },{ name: "Waitress", id: 148 }]}
,"5": { name: "Sales / Marketing", id: 5,
      subs: [{ name: "Advertising", id: 50 },{ name: "E-Mail Marketing", id: 53 },{ name: "Event Planning", id: 54 },{ name: "Market Research", id: 56 },{ name: "Public Relations", id: 57 },{ name: "Retail", id: 51 },{ name: "Social Media Marketing", id: 59 }]}
,"12": { name: "Wellness / Fitness", id: 12,
      subs: [{ name: "Acupuncture", id: 149 },{ name: "Counseling", id: 150 },{ name: "Massage", id: 151 },{ name: "Physical Training", id: 152 },{ name: "Sports Medicine", id: 153 }]}

};

function setCategoryOptions(optCat) {
    optCat.options.length=0;
    optCat.options[0] = new Option("select a category", "", false, false);
    for (var i = 0; i < __categories.length; i++) {
        var cat = __categories[i];
        optCat.options[i + 1] = new Option(cat.name, cat.id, "", false, false);
    }        
}

function setSubcategoryOptions(optCat, optSub) {
    optSub.options.length = 0;
    optSub.options[0] = new Option("select a category", "", false, false);

    if (optCat.selectedIndex <= 0)
        return;

    var catID = optCat.options[optCat.selectedIndex].value;
    if (catID) {
    
        var cat = __categories[catID];
    
        if (cat) {    
            optSub.options[0] = new Option("All", "", false, false);
            for (var i = 0; i < cat.subs.length; i++) {
                var sub = cat.subs[i];
                optSub.options[i + 1] = new Option(sub.name, sub.id, "", false, false);
            }        
        }
    }
}

