var yana_menu_open;
var yana_menu_auto_close = false;

function yanaMenu(o, defaultDisplay)
{
    var i = 0;
    while (o.nextSibling != null && o.nodeName != 'ul' && o.className != 'menu' && i < 500) 
    {
        o = o.nextSibling;
        i++;
    }
    if (!o || !o.style) {
        return;
    }
    if (yana_menu_auto_close && yana_menu_open && yana_menu_open.style) {
        var test = o;
        var is_ancestor = false;
        while (test.parentNode) 
        {
            if (test.parentNode == yana_menu_open) {
                is_ancestor = true;
                break;
            }
            test = test.parentNode;
        }
        if (!is_ancestor) {
            yana_menu_open.style.display = 'none';
        }
    }
    if (o.style.display == 'none') {
        if (defaultDisplay) {
            o.style.display = defaultDisplay;
        } else {
            o.style.display = 'block';
            yana_menu_open = o;
        }
    } else {
        o.style.display = 'none';
    }
}

function yanaCloseAll()
{
    var nodelist = document.getElementsByTagName('ul');
    for (var i=0; i < nodelist.length; i++)
    {        alert(nodelist[i]);
        if (nodelist[i].className == 'menu') {
            nodelist[i].style.display = 'none';
        }
    }
}

function preview(ziel, quelle) 
{
    quelle = document.getElementById(quelle).value;
    ziel = document.getElementById(ziel);
    ziel.innerHTML = '<span style="font-size:11px;font-weight:bold">&nbsp; '+preview_js+'</span><br><iframe src="'+php_self+'?action=preview&eintraege='+escape(quelle)+'" name="preview_window" height="80" width="380" style="border: 2px inset #EEEEEE;" scrolling="no"></iframe>';
}

/******************************************
 © Thomas Meyer www.All-Community.de
 Copyright Hinweis nicht entfernen!
******************************************/