function expand(id)
{
    for (var i = 0; i < trees.length; i++)
        if (trees[i].id == id)
            trees[i].expandAll();
}

function grow(el)
{
    (new YAHOO.util.Anim(el, { fontSize: { from: 1, to: 2, unit: 'em' } }, 0.10)).animate();
    alert(YAHOO.util.Element.getStyle(el, "fontSize"));
}

function shrink(el)
{
    (new YAHOO.util.Anim(el, { fontSize: { from: 2, to: 1, unit: 'em' } }, 0.10)).animate();
    //(new YAHOO.util.Anim(el, { fontSize: { to: 125, unit: '%' } }, 0.10)).animate();
}

YAHOO.util.Event.onDOMReady(function() {

    trees = [];

    var divs = YAHOO.util.Dom.getElementsByClassName("tree");
    for (var i = 0; i < divs.length; i++)
    {
        trees[i] = new YAHOO.widget.TreeView(divs[i]);
        trees[i].subscribe("clickEvent", function(o) { 
            if (o.node._type == "HTMLNode")
                return false;
        });
        divs[i].style.display = "block";
        trees[i].render();
    }

    fyi1();
});

function fyi1()
{
    connection = YAHOO.util.Connect.asyncRequest("GET", "/ajax/fyi.php", { success: fyi2 });
}

function fyi2(o)
{
    var fyi = YAHOO.util.Dom.get("fyi");
    if (o.responseXML && fyi)
        fyi.innerHTML = o.responseXML.documentElement.firstChild.data;
    window.setTimeout("fyi1()", 60000);
}

