<!--
function addSubCats (subCats) {
	var myEle;
	var cats = document.getElementById('ddlSubCategory');
	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('ddlTypeOfMeal');
	Setidtext();
	switch(parentDDL.options[parentDDL.selectedIndex].value)
	{
		case "734":
			addSubCats([{"optionValue":"0","optionText":"En choisir un"},{"optionValue":"911","optionText":"Amuse-gueule"},{"optionValue":"912","optionText":"Boeuf"},{"optionValue":"913","optionText":"Poulet"},{"optionValue":"914","optionText":"Poisson"},{"optionValue":"915","optionText":"Marinades et sauces"},{"optionValue":"916","optionText":"Sans viande"},{"optionValue":"917","optionText":"Repas en un seul plat"},{"optionValue":"918","optionText":"Pâtes et riz"},{"optionValue":"919","optionText":"Porc"},{"optionValue":"920","optionText":"Salades"},{"optionValue":"921","optionText":"Plats d'accompagnement"},{"optionValue":"922","optionText":"Soupes"}])
			break;
		case "731":
			addSubCats([{"optionValue":"0","optionText":"En choisir un"},{"optionValue":"905","optionText":"Boissons"},{"optionValue":"906","optionText":"Plats de résistance"},{"optionValue":"907","optionText":"Salades principales"},{"optionValue":"908","optionText":"Sandwichs"},{"optionValue":"909","optionText":"Salades d'accompagnement"},{"optionValue":"910","optionText":"Soupes"}])
			break;
		case "733":
			addSubCats([{"optionValue":"0","optionText":"En choisir un"},{"optionValue":"900","optionText":"Boissons"},{"optionValue":"901","optionText":"Pains/Muffins"},{"optionValue":"902","optionText":"Céréales"},{"optionValue":"903","optionText":"Plats de résistance"},{"optionValue":"904","optionText":"Confitures/Gelées"}])
			break;
		case "730":
			addSubCats([{"optionValue":"0","optionText":"En choisir un"},{"optionValue":"931","optionText":"Gâteaux"},{"optionValue":"932","optionText":"Gâteaux au fromage"},{"optionValue":"933","optionText":"Biscuits"},{"optionValue":"934","optionText":"Desserts congelés"},{"optionValue":"935","optionText":"Desserts sans cuisson"},{"optionValue":"936","optionText":"Tartes"},{"optionValue":"937","optionText":"Sauces"},{"optionValue":"938","optionText":"Carrés"}])
			break;
		case "732":
			addSubCats([{"optionValue":"0","optionText":"En choisir un"},{"optionValue":"923","optionText":"Biscuits"},{"optionValue":"924","optionText":"Craquelins-collations"},{"optionValue":"925","optionText":"JELL-O"},{"optionValue":"926","optionText":"Muffins"},{"optionValue":"927","optionText":"Préparations pour goûters"},{"optionValue":"928","optionText":"Carrés"}])
			break;
		case "729":
			addSubCats([{"optionValue":"0","optionText":"En choisir un"},{"optionValue":"929","optionText":"Boissons froides"},{"optionValue":"930","optionText":"Boissons chaudes"}])
			break;		
	}
}
function Setidtext()
{
    var strValue;
    strValue = ''

    document.getElementById('idtext').value = '';

    if (document.getElementById('ddlTypeOfMeal').value != 0)
    {
        strValue = document.getElementById('ddlTypeOfMeal').options[document.getElementById('ddlTypeOfMeal').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('ddlSubCategory').value != 0)
    {
        strValue = document.getElementById('ddlSubCategory').options[document.getElementById('ddlSubCategory').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);
-->