function fillCategory(){ // this function is used to fill the category list on load addOption(document.profileform.Category, '1', 'Autos');addOption(document.profileform.Category, '2', 'Arts');addOption(document.profileform.Category, '5', 'Entertainment');addOption(document.profileform.Category, '6', 'Finance');addOption(document.profileform.Category, '8', 'Jobs');addOption(document.profileform.Category, '9', 'Movies');addOption(document.profileform.Category, '10', 'Live Music');addOption(document.profileform.Category, '25', 'Outdoors/Sports');addOption(document.profileform.Category, '12', 'Real Estate');addOption(document.profileform.Category, '13', 'Community');addOption(document.profileform.Category, '14', 'Shopping');addOption(document.profileform.Category, '15', 'Hotels/B&B');addOption(document.profileform.Category, '16', 'Food');addOption(document.profileform.Category, '17', 'Health');addOption(document.profileform.Category, '19', 'Pet Services');addOption(document.profileform.Category, '20', 'Services');addOption(document.profileform.Category, '21', 'Travel');} // end of JS function function SelectSubCat(){ // ON or after selection of category this function will work removeAllOptions(document.profileform.SubCat); addOption(document.profileform.SubCat, "", "Select A Subcategory:", ""); // Collect all element of subcategory for various cat_id if(document.profileform.Category.value == '1'){addOption(document.profileform.SubCat,'1', 'Motorcycles');addOption(document.profileform.SubCat,'5', 'Automotive Services');}if(document.profileform.Category.value == '2'){addOption(document.profileform.SubCat,'6', 'Performing Arts');addOption(document.profileform.SubCat,'9', 'Music Festivals');addOption(document.profileform.SubCat,'10', 'Movie Theaters');addOption(document.profileform.SubCat,'208', 'River District');addOption(document.profileform.SubCat,'209', 'Galleries');addOption(document.profileform.SubCat,'203', 'Theaters');}if(document.profileform.Category.value == '15'){addOption(document.profileform.SubCat,'218', 'Cabins');addOption(document.profileform.SubCat,'123', 'Hotels/Lodging');addOption(document.profileform.SubCat,'124', 'Bed & Breakfast');}if(document.profileform.Category.value == '20'){addOption(document.profileform.SubCat,'205', 'Hair/Beauty Salon');addOption(document.profileform.SubCat,'21', 'Architectects');addOption(document.profileform.SubCat,'219', 'Storage/Moving');addOption(document.profileform.SubCat,'175', 'Home/Garden');addOption(document.profileform.SubCat,'176', 'Legal/Business Services');addOption(document.profileform.SubCat,'179', 'Web Design');addOption(document.profileform.SubCat,'181', 'News/Media');addOption(document.profileform.SubCat,'182', 'Photography');addOption(document.profileform.SubCat,'183', 'Printing');addOption(document.profileform.SubCat,'187', 'Marketing/Advertising');addOption(document.profileform.SubCat,'191', 'Building Maintenance');addOption(document.profileform.SubCat,'201', 'Computers');}if(document.profileform.Category.value == '4'){addOption(document.profileform.SubCat,'17', 'Graphic Design');addOption(document.profileform.SubCat,'18', 'Web Site Design');addOption(document.profileform.SubCat,'19', 'Interior Design');addOption(document.profileform.SubCat,'20', 'Exterior Design');}if(document.profileform.Category.value == '6'){addOption(document.profileform.SubCat,'22', 'Accounting');addOption(document.profileform.SubCat,'24', 'Banks');addOption(document.profileform.SubCat,'25', 'Credit Unions');addOption(document.profileform.SubCat,'28', 'Financing');addOption(document.profileform.SubCat,'29', 'Insurance');addOption(document.profileform.SubCat,'30', 'Investment Services');addOption(document.profileform.SubCat,'32', 'Notaries');addOption(document.profileform.SubCat,'33', 'Real Estate Appraisal');addOption(document.profileform.SubCat,'34', 'Taxes');addOption(document.profileform.SubCat,'36', 'Services');}if(document.profileform.Category.value == '25'){addOption(document.profileform.SubCat,'212', 'Biking');addOption(document.profileform.SubCat,'214', 'Family Fun');addOption(document.profileform.SubCat,'211', 'Running');addOption(document.profileform.SubCat,'210', 'Fishing');addOption(document.profileform.SubCat,'216', 'Raft/Kayak/Canoe');addOption(document.profileform.SubCat,'215', 'Hiking/Climbing');}if(document.profileform.Category.value == '-1'){addOption(document.profileform.SubCat,'213', 'Golf');}if(document.profileform.Category.value == '11'){addOption(document.profileform.SubCat,'80', 'Movie Theater');addOption(document.profileform.SubCat,'81', 'Stage Theater');}if(document.profileform.Category.value == '12'){addOption(document.profileform.SubCat,'82', 'Apartment and Condominium');addOption(document.profileform.SubCat,'83', 'Complexes');addOption(document.profileform.SubCat,'84', 'Appraisal');addOption(document.profileform.SubCat,'85', 'Home Builders');addOption(document.profileform.SubCat,'86', 'Inspection Services');addOption(document.profileform.SubCat,'87', 'Home Insurance');addOption(document.profileform.SubCat,'88', 'Mortgage Loans');addOption(document.profileform.SubCat,'89', 'Planned Communities');addOption(document.profileform.SubCat,'90', 'Property Management');addOption(document.profileform.SubCat,'91', 'Real Estate Agents');addOption(document.profileform.SubCat,'92', 'Rental Agencies');addOption(document.profileform.SubCat,'94', 'Title Companies');}if(document.profileform.Category.value == '13'){addOption(document.profileform.SubCat,'95', 'Animal and Humane Societies');addOption(document.profileform.SubCat,'96', 'Community Centers');addOption(document.profileform.SubCat,'97', 'Government');addOption(document.profileform.SubCat,'98', 'Emergency Services');addOption(document.profileform.SubCat,'99', 'Family Services');addOption(document.profileform.SubCat,'100', 'Food and Hunger');addOption(document.profileform.SubCat,'101', 'Farms');addOption(document.profileform.SubCat,'103', 'Religion and Spirituality');addOption(document.profileform.SubCat,'105', 'Social Services');addOption(document.profileform.SubCat,'207', 'The Environment');addOption(document.profileform.SubCat,'199', 'Groups');addOption(document.profileform.SubCat,'200', 'Volunteer');}if(document.profileform.Category.value == '14'){addOption(document.profileform.SubCat,'109', 'Antiques and Collectibles');addOption(document.profileform.SubCat,'110', 'Apparel');addOption(document.profileform.SubCat,'111', 'Arts and Crafts');addOption(document.profileform.SubCat,'112', 'Consignment Shops');addOption(document.profileform.SubCat,'113', 'Bookstores');addOption(document.profileform.SubCat,'115', 'Flowers');addOption(document.profileform.SubCat,'116', 'Home Electronics');addOption(document.profileform.SubCat,'117', 'Jewelry');addOption(document.profileform.SubCat,'119', 'Office Supplies');addOption(document.profileform.SubCat,'121', 'Toys and Games');}if(document.profileform.Category.value == '16'){addOption(document.profileform.SubCat,'125', 'American Casual');addOption(document.profileform.SubCat,'126', 'Bakery');addOption(document.profileform.SubCat,'127', 'Bar/Club');addOption(document.profileform.SubCat,'128', 'Barbecue');addOption(document.profileform.SubCat,'129', 'Cafe/Coffeehouse');addOption(document.profileform.SubCat,'130', 'Catering');addOption(document.profileform.SubCat,'131', 'Chinese');addOption(document.profileform.SubCat,'133', 'German');addOption(document.profileform.SubCat,'134', 'Grocery');addOption(document.profileform.SubCat,'135', 'Indian');addOption(document.profileform.SubCat,'136', 'Italian');addOption(document.profileform.SubCat,'137', 'Japanese');addOption(document.profileform.SubCat,'138', 'Latin American');addOption(document.profileform.SubCat,'139', 'Mediterranean');addOption(document.profileform.SubCat,'140', 'Pizza');addOption(document.profileform.SubCat,'206', 'Beer/Wine');addOption(document.profileform.SubCat,'143', 'Seafood and steak');addOption(document.profileform.SubCat,'144', 'Southern');addOption(document.profileform.SubCat,'146', 'Sweet Treats');addOption(document.profileform.SubCat,'147', 'Thai');addOption(document.profileform.SubCat,'148', 'Vegetarian');}if(document.profileform.Category.value == '17'){addOption(document.profileform.SubCat,'149', 'Alternative Medicine');addOption(document.profileform.SubCat,'150', 'Care Providers');addOption(document.profileform.SubCat,'151', 'Dentistry');addOption(document.profileform.SubCat,'152', 'Doctors/Clinics');addOption(document.profileform.SubCat,'153', 'Therapy');addOption(document.profileform.SubCat,'154', 'Fitness');addOption(document.profileform.SubCat,'155', 'Assisted Living');addOption(document.profileform.SubCat,'156', 'Hospitals and Medical');addOption(document.profileform.SubCat,'158', 'Insurance');addOption(document.profileform.SubCat,'159', 'Laboratories');addOption(document.profileform.SubCat,'160', 'Pediatrics');addOption(document.profileform.SubCat,'161', 'Spa/Wellness');addOption(document.profileform.SubCat,'162', 'Pharmacies');}if(document.profileform.Category.value == '19'){addOption(document.profileform.SubCat,'163', 'Animal and Humane');addOption(document.profileform.SubCat,'165', 'Dogs');addOption(document.profileform.SubCat,'166', 'Cats');addOption(document.profileform.SubCat,'167', 'Fish');addOption(document.profileform.SubCat,'170', 'Pet Sitting Services');addOption(document.profileform.SubCat,'171', 'Supplies');addOption(document.profileform.SubCat,'173', 'Veterinary Medicine');}if(document.profileform.Category.value == '21'){addOption(document.profileform.SubCat,'189', 'Airports');addOption(document.profileform.SubCat,'190', 'Car Rental');addOption(document.profileform.SubCat,'192', 'Bus Schedule');addOption(document.profileform.SubCat,'193', 'Limousines and Shuttles');addOption(document.profileform.SubCat,'194', 'Taxi Services');addOption(document.profileform.SubCat,'195', 'Tour Operators');addOption(document.profileform.SubCat,'197', 'Travel Agents');} } ////////////////// 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 ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); }