<!--
function addSubCats (subCats) {
	var myEle;
	var cats = document.getElementById('scatid');
	cats.options.length = 0;
	for (var subCat=0; subCat<subCats.length; subCat++) {
		myEle = document.createElement("option") ;
		myEle.setAttribute('value',subCats[subCat].optionValue);
		var txt = document.createTextNode(subCats[subCat].optionText);
		myEle.appendChild(txt);
		cats.appendChild(myEle);
	}
    cats.disabled=false;
}
function moochained(parentDDL) {
	var parentDDL = document.getElementById('type_of_meal');
	Setidtext();
	switch(parentDDL.options[parentDDL.selectedIndex].value)
	{
    case "6":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"442","optionText":"Bruschetta/Crostini/Toasts"},{"optionValue":"49","optionText":"Cold Dips"},{"optionValue":"130","optionText":"Crackers with Toppings"},{"optionValue":"126","optionText":"Hot Dips"},{"optionValue":"443","optionText":"Kabobs/Roll-Ups"},{"optionValue":"444","optionText":"Meatballs/Wieners/Wings"},{"optionValue":"445","optionText":"Mexican Dips"},{"optionValue":"127","optionText":"Nachos/Quesadillas"},{"optionValue":"24","optionText":"Other Cold Appetizers"},{"optionValue":"23","optionText":"Other Hot Appetizers"},{"optionValue":"446","optionText":"Puffs/Quiches"},{"optionValue":"129","optionText":"Snacks/Nut Mixes"},{"optionValue":"128","optionText":"Spreads & Cheeseballs"}])
        break;
    case "5":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"133","optionText":"Iced Coffees/Teas"},{"optionValue":"131","optionText":"Hot Coffees/Teas"},{"optionValue":"132","optionText":"Hot Chocolate/Other Sweets"},{"optionValue":"21","optionText":"Other Cold Beverages"},{"optionValue":"452","optionText":"Punches"},{"optionValue":"134","optionText":"Shakes/Smoothies"}])
        break;
    case "10":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"440","optionText":"Biscuits"},{"optionValue":"439","optionText":"Breadsticks"},{"optionValue":"438","optionText":"Coffeecakes"},{"optionValue":"43","optionText":"Dinner Breads"},{"optionValue":"135","optionText":"Muffins"},{"optionValue":"41","optionText":"Quick Breads"},{"optionValue":"441","optionText":"Sweet Rolls"},{"optionValue":"42","optionText":"Yeast Breads"}])
        break;
    case "1":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"32","optionText":"Casseroles/Skillets"},{"optionValue":"139","optionText":"Hot Cereals"},{"optionValue":"420","optionText":"Omelets/Quiche/Souffles"},{"optionValue":"421","optionText":"Other Entrees"},{"optionValue":"138","optionText":"Pancakes/Waffles"},{"optionValue":"137","optionText":"Sandwiches/Breakfast Bars"}])
        break;
    case "4":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"12","optionText":"Cakes: Layer"},{"optionValue":"359","optionText":"Cakes: Other"},{"optionValue":"355","optionText":"Cakes: Pound/Tube"},{"optionValue":"200","optionText":"Cheesecakes: Bars"},{"optionValue":"124","optionText":"Cheesecakes: No-Bake"},{"optionValue":"123","optionText":"Cheesecakes: Baked"},{"optionValue":"353","optionText":"Cupcakes"},{"optionValue":"142","optionText":"Frostings/Fillings"},{"optionValue":"356","optionText":"Pie Crusts"},{"optionValue":"15","optionText":"Pies/Tarts: Fruits"},{"optionValue":"354","optionText":"Pies: Frozen"},{"optionValue":"357","optionText":"Pies: Nut"},{"optionValue":"358","optionText":"Pies: Other"},{"optionValue":"14","optionText":"Pies: Pudding"}])
        break;
    case "3":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"361","optionText":"Other Candies"},{"optionValue":"45","optionText":"Bark/Fudge/Truffles"},{"optionValue":"360","optionText":"Brownies"},{"optionValue":"365","optionText":"Crisps/Cobblers"},{"optionValue":"140","optionText":"Drop Cookies"},{"optionValue":"371","optionText":"Frozen Pops/Sandwiches"},{"optionValue":"373","optionText":"Gelatin Molds"},{"optionValue":"370","optionText":"Ice Cream Desserts"},{"optionValue":"366","optionText":"Mousse/Triffles"},{"optionValue":"363","optionText":"No Bake Cookies/Bars"},{"optionValue":"362","optionText":"Bar Cookies"},{"optionValue":"17","optionText":"Other Frozen Desserts"},{"optionValue":"173","optionText":"Other Fruit Desserts"},{"optionValue":"122","optionText":"Other Gelatin Desserts"},{"optionValue":"368","optionText":"Other Refrigerated Desserts"},{"optionValue":"369","optionText":"Parfaits"},{"optionValue":"120","optionText":"Puddings/Custard"},{"optionValue":"364","optionText":"Shaped Cookies"},{"optionValue":"372","optionText":"Sorbets/Ices"},{"optionValue":"143","optionText":"Sweet Dips & Sauces"}])
        break;
    case "12":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"153","optionText":"Beverages"},{"optionValue":"154","optionText":"Craft Ideas"},{"optionValue":"151","optionText":"Desserts"},{"optionValue":"150","optionText":"Entrees"},{"optionValue":"152","optionText":"Snacks"}])
        break;
    case "13":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"175","optionText":"Apple, Peach, Pear & Other"},{"optionValue":"176","optionText":"Berry, Cherry & Grape"},{"optionValue":"155","optionText":"Citrus"},{"optionValue":"158","optionText":"Freezer Jams/Jellies"},{"optionValue":"157","optionText":"Savory"},{"optionValue":"156","optionText":"Tropical/Exotic"}])
        break;
    case "15":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"384","optionText":"Lasagnas"},{"optionValue":"389","optionText":"Macaroni & Cheese"},{"optionValue":"385","optionText":"Pasta: Alfredo"},{"optionValue":"390","optionText":"Pasta: Beef/Pork"},{"optionValue":"386","optionText":"Pasta: Meatless"},{"optionValue":"391","optionText":"Pasta: Poultry"},{"optionValue":"387","optionText":"Pasta: Seafood"},{"optionValue":"392","optionText":"Pizza: Beef/Pork"},{"optionValue":"388","optionText":"Pizza: Meatless"},{"optionValue":"393","optionText":"Pizza: Poultry"}])
        break;
    case "7":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"404","optionText":"Beef: Casseroles"},{"optionValue":"408","optionText":"Beef: Grilled/Broiled"},{"optionValue":"409","optionText":"Beef: Other"},{"optionValue":"410","optionText":"Beef: Stews"},{"optionValue":"411","optionText":"Beef: Top of Stove"},{"optionValue":"453","optionText":"Enchiladas/Fajitas/Tacos"},{"optionValue":"454","optionText":"Ground Beef: Skillets"},{"optionValue":"412","optionText":"Ground Beef: Other"},{"optionValue":"413","optionText":"Ham"},{"optionValue":"414","optionText":"Lamb"},{"optionValue":"415","optionText":"Marinades/Sauces"},{"optionValue":"416","optionText":"Meatloaf"},{"optionValue":"417","optionText":"Pork Chops"},{"optionValue":"418","optionText":"Pork: Other"},{"optionValue":"419","optionText":"Salads"}])
        break;
    case "2":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"379","optionText":"Baked"},{"optionValue":"378","optionText":"Casseroles"},{"optionValue":"381","optionText":"Enchiladas/Fajitas/Tacos"},{"optionValue":"380","optionText":"Grilled/Broiled"},{"optionValue":"382","optionText":"Marinades/Sauces"},{"optionValue":"383","optionText":"Salads"},{"optionValue":"375","optionText":"Skillets: Pasta"},{"optionValue":"374","optionText":"Skillets: Rice"},{"optionValue":"376","optionText":"Skillets: Other"},{"optionValue":"377","optionText":"Top of Stove"}])
        break;
    case "8":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"394","optionText":"Macaroni & Cheese"},{"optionValue":"399","optionText":"Meatless: Casseroles"},{"optionValue":"395","optionText":"Meatless: Lasagna"},{"optionValue":"400","optionText":"Meatless: Other"},{"optionValue":"48","optionText":"Meatless: Pasta"},{"optionValue":"401","optionText":"Meatless: Pizza"},{"optionValue":"34","optionText":"Seafood: Fillets/Steaks"},{"optionValue":"402","optionText":"Seafood: Salads"},{"optionValue":"398","optionText":"Seafood: Shellfish"},{"optionValue":"403","optionText":"Seafood: Tuna"}])
        break;
    case "9":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"167","optionText":"Bean Side Dishes"},{"optionValue":"422","optionText":"Bread Salads"},{"optionValue":"28","optionText":"Fruit Salads"},{"optionValue":"168","optionText":"Gelatin Salads/Molds"},{"optionValue":"423","optionText":"Main Dish Salads: Beef"},{"optionValue":"171","optionText":"Main Dish Salads: Chicken"},{"optionValue":"424","optionText":"Main Dish Salads: Other"},{"optionValue":"425","optionText":"Main Dish Salads: Seafood"},{"optionValue":"426","optionText":"Pasta Salads"},{"optionValue":"40","optionText":"Pasta Side Dishes"},{"optionValue":"428","optionText":"Potato Salads"},{"optionValue":"429","optionText":"Potato Side Dishes"},{"optionValue":"430","optionText":"Rice/Grain Salads"},{"optionValue":"37","optionText":"Rice/Grain Side Dishes"},{"optionValue":"432","optionText":"Salad Dressings"},{"optionValue":"166","optionText":"Stuffing Side Dishes"},{"optionValue":"433","optionText":"Tossed Green Salads"},{"optionValue":"435","optionText":"Tuna/Chicken/Egg Salads"},{"optionValue":"436","optionText":"Vegetable Salads"},{"optionValue":"39","optionText":"Vegetables Side Dishes"}])
        break;
    case "14":
        addSubCats([{"optionValue":"0","optionText":"Select One"},{"optionValue":"447","optionText":"Calzones"},{"optionValue":"448","optionText":"Chili"},{"optionValue":"449","optionText":"Chowders"},{"optionValue":"159","optionText":"Cold Sandwiches"},{"optionValue":"164","optionText":"Hamburgers"},{"optionValue":"163","optionText":"Hot Dogs"},{"optionValue":"160","optionText":"Hot Sandwiches"},{"optionValue":"165","optionText":"Meatless Sandwiches"},{"optionValue":"450","optionText":"Pita Sandwiches"},{"optionValue":"451","optionText":"Soups"},{"optionValue":"161","optionText":"Subs/Hoagies"},{"optionValue":"162","optionText":"Wrapped Sandwiches"}])
        break;
    }
}
        function Setidtext()
        {
            var strValue;
            strValue = ''

            document.getElementById('idtext').value = '';

            if (document.getElementById('type_of_meal').value != 0)
            {
                strValue = document.getElementById('type_of_meal').options[document.getElementById('type_of_meal').selectedIndex].text;
                
                //strValue = strValue.replace(/î/g, '&#238')
                //strValue = strValue.replace(/é/g, '&#233')
                //strValue = strValue.replace(/û/g, '&#251')
                //strValue = strValue.replace(/â/g, '&#226')
                //strValue = strValue.replace(/'/g, '&#39')
                document.getElementById('idtext').value = strValue

            }

            if (document.getElementById('scatid').value != 0)
            {
                strValue = document.getElementById('scatid').options[document.getElementById('scatid').selectedIndex].text
                //strValue = strValue.replace(/î/g, '&#238')
                //strValue = strValue.replace(/é/g, '&#233')
                //strValue = strValue.replace(/û/g, '&#251')
                //strValue = strValue.replace(/â/g, '&#226')
                //strValue = strValue.replace(/'/g, '&#39')
                document.getElementById('idtext').value = document.getElementById('idtext').value + '|' + strValue
            }

        }

        window.addEvent('domready', init);
-->