//Cac ham thuc thi tab

function $TabClick(this_) 
{
    Os_Tab.$Click(this_, function() 
    {
        document.getElementById('mode').value = this_.id;
    });
};
var o_Tab = { $c: function(this_, function_) 
{
    var _parentNode = this_.parentNode;
    
    var Nodes = _parentNode.childNodes;
    
    for (var i = 0; i < Nodes.length; i++) 
    {
        var tab_ = Nodes[i]; 
        
        if (tab_.nodeName.toLowerCase() != 'a' && tab_.nodeName.toLowerCase() != 'div')
            continue; if (this_ == tab_)
            tab_.className = 'active'; 
            else
            tab_.className = '';
    }
    if (function_)
        function_();
}
};

function o_Tab3(this_, id_) 
{
    o_Tab.$c(this_,
    function() {
        var objid = $(id_);

        if (objid) {
            var objcontainer = objid.parentNode.childNodes;
            for (var i = 0; i < objcontainer.length; i++) {
                var tab_ = objcontainer[i];
                if (tab_.nodeName.toLowerCase() != 'div')
                    continue;
                if (objid.id == tab_.id)
                    tab_.style.display = 'block';
                else
                    tab_.style.display = 'none';
            }
        }
    });
};

function $(objID) 
{
    return document.getElementById(objID);
};

function openWindow(src, title, width, height) 
{
    var leftPos = (screen.availWidth - width) / 2;
    var topPos = (screen.availHeight - height) / 2;
    if (isIE) 
    {
        window.open(src, title, 'toolbar=no' + ',location=no' + ',status=yes' + ',menubar=no' + ',scrollbars=yes' + ',resizable=yes' + ',width=' + width + ',height=' + height + ',top=' + topPos + ',left=' + leftPos);
        return false;
    }
    else 
    {
        window.open(src, title, 'height=' + height + ', width=' + width + ', left=' + leftPos + ', top=' + topPos + ', resizable=yes, scrollbars=yes, toolbar=no, status=yes');
        return false;
    }
};  



