
function MP_recipeSelectPrepare(name,id,text)
{
    var sel = document.getElementById('ajaxSelectBox_Value_'+name);
    var ns = name.split('_');
    var i = ns[1];
    ajaxSelectBoxInit('MP_recipe_'+i,'recipeID_'+i,'XMLProvider.do','recipesincategory',id,'false','recipe',0,'<blink>bitte w&auml;hlen</blink>','MP_recipeSelected');
}

function MP_recipeSelected(name,id,text)
{
    // also im prinzip gibt es jetzt nichts zu tun ;-)
    // daher ist das eine dummy-funktion....
}

function MP_setupExistingRecipeInMenuPlanEntry(entry_id,recipe_id,recipecategory_id)
{
    ajaxSelectBoxInit('MP_rc_'+entry_id,'recipecategoryID_'+entry_id,'XMLProvider.do','recipecategorychildren',0,'true','recipecategory',recipecategory_id,'<blink>bitte w&auml;hlen</blink>','MP_recipeSelectPrepare');
	var categoryValueField = document.getElementById("ajaxSelectBox_Value_recipecategoryID_"+entry_id);
	categoryValueField.value = recipecategory_id;
	ajax_copyFromXML2innerHTML('XMLProvider.do?recipecategory='+recipecategory_id,'recipecategory','namepath','ajaxSelectBox_Text_recipecategoryID_'+entry_id);
	
	ajaxSelectBoxInit('MP_recipe_'+entry_id,'recipeID_'+entry_id,'XMLProvider.do','recipesincategory',recipecategory_id,'false','recipe',recipe_id,'<blink>bitte w&auml;hlen</blink>','MP_recipeSelected');
	var recipeValueField = document.getElementById("ajaxSelectBox_Value_recipeID_"+entry_id);
    recipeValueField.value = recipe_id;
    ajax_copyFromXML2innerHTML('XMLProvider.do?recipe='+recipe_id,'recipe','name','ajaxSelectBox_Text_recipeID_'+entry_id);

}






