﻿// JScript 文件

function switchMoreCodition(obj)
{    
    var divObj = document.getElementById("divMoreCondition");
    if(divObj != null)
    {
        //alert(divObj.outerHTML);
        var img = findNodeByIdx(obj.childNodes, 1);
        if(divObj.style.display == "none")
        {
            divObj.style.display = "";
            img.src = "/Skin/Images/common/fold.gif";
        }
        else
        {
            divObj.style.display = "none";
            img.src = "/Skin/Images/common/unfold.gif";
        }
    }
}
    
function DisplayDescription(idx)
{
    var obj=$get(idx);
    if(obj.style.display=="")
    {
        obj.style.display="none";
    }
    else
    {
        obj.style.display="";
    }
}

var _isIe = navigator.appName == "Microsoft Internet Explorer" ? true : false;
function showTagDiv(obj, showIndex, containerIdx, showClassName, hideClassName)
{    
    var count = 0;
    
    // 修改li的样式    
    var lis = obj.parentNode.childNodes;
    var startIndex = _isIe ? 0 : 1;    
    
    for(var i = startIndex; i < lis.length; i++)    
    {
        if(lis[i].nodeType != 3)
        {   
            lis[i].className = hideClassName;
        }
    }
    
    obj.className = showClassName;
    
    // 控制内容层的显示
    var contentDivs = document.getElementById(containerIdx).childNodes;

    for(var j = startIndex ; j < contentDivs.length; j++)
    {       
        // 查找有效节点    
        if(contentDivs[j].nodeType != 3)
        {   
            if(count == showIndex)
            {
                contentDivs[j].style.display = "";
            }
            else
            {
                contentDivs[j].style.display = "none";
            }            
            count++;
        }        
    }
}