DHTMLXMenu and calling Javascript function


I initialize the dhtmlxmenu with menu.loadXML(��); and calling the userdata like that



My xml:
<?xml version='1.0' encoding='iso-8859-1'?>


slides/slide1.html
how to calling function writeToDoc???




Menu init:
var menu;
function initMenu() {
 menu = new dhtmlXMenuObject(“menuObj”);
 menu.setIconsPath(“codebase/imgs/csh_bluebooks/”);
 menu.attachEvent(“onClick”, menuClick);  
 menu.loadXML(“common/myMenu.xml?etc=” + new Date().getTime());
}



Menu onClick
function menuClick(id) {
ud = menu.getUserData(id, ‘url’);
 document.getElementById(‘ifrm’).src=ud;
}



Now I need to know how to calling javascript form xml tag which it looks like that:



function  writeToDoc() {
 document.getElementById(“status”).innerHTML = �Some trxt�;
}



Thank you in advance


possibly the following can be used:


<?xml version='1.0' encoding='iso-8859-1'?>


slides/slide1.html
writeToDoc()





function menuClick(id) {
ud = menu.getUserData(id, ‘url’);


if(ud) document.getElementById(‘ifrm’).src=ud;


func = menu.getUserData(id, ‘function’);


if(func) eval(func);
}




Alex, It works perfect!



Thanks a lot for your kind support!



Alfred