﻿//添加标签栏
function addTab(_title, _url) {
    var _exists = $('#TabPanel').tabs('exists', _title);
    if (!_exists) {
        $('#TabPanel').tabs('add', {
            title: _title,
            content: '<iframe scrolling="yes" frameborder="0"  src="' + _url + '" style="width:100%;height:100%;"></iframe>',
            closable: true
        });
    }
    else {
        $('#TabPanel').tabs('select', _title);
    }
}

//$(function() {
//    $('#CategoryPanel').tree({
//        url: 'article_data.json',
//        onClick: function(node) {
//            if (node.attributes != undefined) {
//                alert("node's attributes is:" + node.attributes.url + "--" + node.attributes.name)
//            }
//            alert('you click ' + node.url);
//        }
//    });
//});
function login(msg) {
    $("#LoginPanel").hide();
    $("#LogoutPanel").show();
    $("#LoginWelcome").text(msg);
}
function logout() {
    $("#LoginPanel").show();
    $("#LogoutPanel").hide();
    $("#LoginWelcome").text();
}

