GenerateMenu = function (container, name, x, y, depth, node_xml) { // variable declarations var curr_node; var curr_item; var curr_menu = container.createEmptyMovieClip(name, depth); // for all items or XML nodes (items and menus) // within this node_xml passed for this menu for (var i = 0; i