// JavaScript Document
//控制左栏展开收起的
var flag = false;
function slide(elem) {

    var elemLi = elem.parentNode.parentNode;
    var target_li = elemLi.getElementsByTagName("ul")[0].getElementsByTagName("li");
    if (flag) {
        //收缩	
        flag = false;
        target_li[3].style.display = "none";
        for (var i = 5; i < target_li.length - 1; i++) {

            target_li[i].style.display = "none";

        }
        elem.className = "close";
        if (elem.firstChild.nodeValue == "收起")
            elem.firstChild.nodeValue = "全部产业";
        else if (elem.firstChild.nodeValue == "Save")
            elem.firstChild.nodeValue = "All Industries";
        else if (elem.firstChild.nodeValue == "Relevage")
            elem.firstChild.nodeValue = "Toutes industries";
        else if (elem.firstChild.nodeValue == "Zusammenfalten")
            elem.firstChild.nodeValue = "Alle Branchen";
        else if (elem.firstChild.nodeValue == "控える")
            elem.firstChild.nodeValue = "全産業";
        else if (elem.firstChild.nodeValue == "Guardar")
            elem.firstChild.nodeValue = "Todas las industrias";
    } else {
        //展开
        flag = true;
        target_li[3].style.display = "block";
        for (var i = 5; i < target_li.length - 1; i++) {

            target_li[i].style.display = "block";

        }
        elem.className = "open";
        if (elem.firstChild.nodeValue == "全部产业")
            elem.firstChild.nodeValue = "收起";
        else if (elem.firstChild.nodeValue == "All Industries")
            elem.firstChild.nodeValue = "Save";
        else if (elem.firstChild.nodeValue == "Toutes industries")
            elem.firstChild.nodeValue = "Relevage";
        else if (elem.firstChild.nodeValue == "Alle Branchen")
            elem.firstChild.nodeValue = "Zusammenfalten";
        else if (elem.firstChild.nodeValue == "全産業")
            elem.firstChild.nodeValue = "控える";
        else if (elem.firstChild.nodeValue == "Todas las industrias")
            elem.firstChild.nodeValue = "Guardar";
    }
}
