﻿function over(obj)
{
    if(obj.style.color=="white")
    {
        obj.style.color="#990000";
        return;
    }
   //obj.style.textDecoration='underline';
   //obj.style.border="1px solid #333";
  
}
function out(obj)
{
    if(obj.style.color=="white")
    {
        return;
    }
    if(obj.style.color=="#99000")
    {
        obj.style.color="white";
    }
    if(a==0 && obj.style.color=="#990000")
    {
        obj.style.color="white";
    }
    if(a==1 && obj.style.color=="#990000")
    {
        obj.style.color="white";
    }
    if(a==1 && obj.style.color=="white")
    {
        obj.style.color="white";
        a=0;
    }
    //obj.style.textDecoration='none';
	//obj.style.border="";
}
var a=0;
function show(obj)
{
    obj.style.color="black";    
    a=1;
    
    
        
    if(document.getElementById("cid").value!=""){
    document.getElementById(document.getElementById("cid").value).style.color = "white";}
    
    /*以上为保留选中状态*/
    
    document.getElementById("cid").value = obj.id; //小类id
    
    
    //alert(document.getElementById(document.getElementById("cid").value).style.color)
            
    if (window.ActiveXObject && !window.XMLHttpRequest) 
    { 
        window.XMLHttpRequest=function() 
        { 
            return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
        }
    }
    var req=new XMLHttpRequest();
    if (req) 
    { 
        req.open('POST','class_text.aspx',true);
        req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
        req.send('sid='+obj.id);
    }
    req.onreadystatechange=function() 
    {
        if (req.readyState==4 && req.status==200)
        {
            var str = req.responseText.split("<!")[0];
            if(str!=null)
            {
//                document.getElementById("divmain").innerHTML = "";
//                for(var i=0;i<str.split('☆').length;i++)
//                {
//                    if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
//                    {
//                        document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
//                        document.getElementById("divmain").innerHTML += "<li style='color:black;padding-left:15px;width:90%;line-height:30px;'><a href='class_text.aspx?id=" + str.split('☆')[i].split('-')[1] + "' style='color:black' class='a' target='_blank'>" + str.split('☆')[i].split('-')[0] + "</a></li>";
//                        document.getElementById("divmain").innerHTML += "</td></tr></table>";
//                    }
//                }


                document.getElementById("divmain").innerHTML = "";
                for(var i=0;i<str.split('☆').length;i++)
                {
                    if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
                    {
                        document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
                        document.getElementById("divmain").innerHTML += str;
                        document.getElementById("divmain").innerHTML += "</td></tr></table>";
                    }
                }

            }
        }
    };
}

//培训课堂----小类
function showjob() //岗位
{
    var cid = document.getElementById("cid").value;
    if(cid=="")
    {
        alert("请先选择职务！");
        return;
    }
    else
    {
        if (window.ActiveXObject && !window.XMLHttpRequest) 
        { 
            window.XMLHttpRequest=function() 
            { 
                return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
            }
        }
        var req=new XMLHttpRequest();
        if (req) 
        { 
            req.open('POST','class_text.aspx',true);
            req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
            req.send('sidjob='+cid);
        }
        req.onreadystatechange=function() 
        {
            if (req.readyState==4 && req.status==200)
            {
                var str = req.responseText.split("<!")[0];
                if(str!=null)
                {
                    document.getElementById("divmain").innerHTML = "";
                    for(var i=0;i<str.split('☆').length;i++)
                    {
                        if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
                        {
                            document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
                            document.getElementById("divmain").innerHTML += str;
                            document.getElementById("divmain").innerHTML += "</td></tr></table>";
                        }
                    }
                }
            }
        };
    }
}
function showwork() //工作内容
{
    var cid = document.getElementById("cid").value;
    if(cid=="")
    {
        alert("请先选择职务！");
        return;
    }
    else
    {
        if (window.ActiveXObject && !window.XMLHttpRequest) 
        { 
            window.XMLHttpRequest=function() 
            { 
                return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
            }
        }
        var req=new XMLHttpRequest();
        if (req) 
        { 
            req.open('POST','class_text.aspx',true);
            req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
            req.send('sidwork='+cid);
        }
        req.onreadystatechange=function() 
        {
            if (req.readyState==4 && req.status==200)
            {
                var str = req.responseText.split("<!")[0];
                if(str!=null)
                {
                    document.getElementById("divmain").innerHTML = "";
                    for(var i=0;i<str.split('☆').length;i++)
                    {
                        if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
                        {
                            document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
                            document.getElementById("divmain").innerHTML += str;
                            document.getElementById("divmain").innerHTML += "</td></tr></table>";
                        }
                    }
                }
            }
        };
    }
}
function showknow() //应知
{
    var cid = document.getElementById("cid").value;
    if(cid=="")
    {
        alert("请先选择职务！");
        return;
    }
    else
    {
        if (window.ActiveXObject && !window.XMLHttpRequest) 
        { 
            window.XMLHttpRequest=function() 
            { 
                return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
            }
        }
        var req=new XMLHttpRequest();
        if (req) 
        { 
            req.open('POST','class_text.aspx',true);
            req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
            req.send('sidknow='+cid);
        }
        req.onreadystatechange=function() 
        {
            if (req.readyState==4 && req.status==200)
            {
                var str = req.responseText.split("<!")[0];
                if(str!=null)
                {
                    document.getElementById("divmain").innerHTML = "";
                    for(var i=0;i<str.split('☆').length;i++)
                    {
                        if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
                        {
                            document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
                            document.getElementById("divmain").innerHTML += str;
                            document.getElementById("divmain").innerHTML += "</td></tr></table>";
                        }
                    }
                }
            }
        };
    }
}
function showclass() //教材
{
    var cid = document.getElementById("cid").value;
    if(cid=="")
    {
        alert("请先选择职务！");
        return;
    }
    else
    {
        if (window.ActiveXObject && !window.XMLHttpRequest) 
        { 
            window.XMLHttpRequest=function() 
            { 
                return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
            }
        }
        var req=new XMLHttpRequest();
        if (req) 
        { 
            req.open('POST','class_text.aspx',true);
            req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
            req.send('sidclass='+cid);
        }
        req.onreadystatechange=function() 
        {
            if (req.readyState==4 && req.status==200)
            {
                var str = req.responseText.split("<!")[0];
                if(str!=null)
                {
                    document.getElementById("divmain").innerHTML = "";
                    for(var i=0;i<str.split('☆').length;i++)
                    {
                        if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
                        {
                            document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
                            document.getElementById("divmain").innerHTML += str;
                            document.getElementById("divmain").innerHTML += "</td></tr></table>";
                        }
                    }
                }
            }
        };
    }
}
function showshe() //课程设置
{
    var cid = document.getElementById("cid").value;
    if(cid=="")
    {
        alert("请先选择职务！");
        return;
    }
    else
    {
        if (window.ActiveXObject && !window.XMLHttpRequest) 
        { 
            window.XMLHttpRequest=function() 
            { 
                return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
            }
        }
        var req=new XMLHttpRequest();
        if (req) 
        { 
            req.open('POST','class_text.aspx',true);
            req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
            req.send('ssid='+cid);
        }
        req.onreadystatechange=function() 
        {
            if (req.readyState==4 && req.status==200)
            {
                var str = req.responseText.split("<!")[0].split('\r\n')[0];
                if(str!=null)
                {
                    document.getElementById("divmain").innerHTML = "";
                    for(var i=0;i<str.split('☆').length;i++)
                    {
                        if(str.split('☆')[i]!="" && str.split('☆')[i]!=null)
                        {
                            document.getElementById("divmain").innerHTML += "<table width='98%' style='top:0px;'><tr><td align='left'>";
                            
                            if(str.split('☆')[i].split('-')[2]!="" && str.split('☆')[i].split('-')[1]!=null)
                            {
                                document.getElementById("divmain").innerHTML += "<li style='color:black;padding-left:15px;width:90%;line-height:30px;'><a href='" + str.split('☆')[i].split('-')[2] + "' style='color:black' class='a' target='_blank'>" + str.split('☆')[i].split('-')[0] + "</a></li>";
                            }
                            else
                            {                            
                                document.getElementById("divmain").innerHTML += "<li style='color:black;padding-left:15px;width:90%;line-height:30px;'><a href='class_text.aspx?id=" + str.split('☆')[i].split('-')[1] + "' style='color:black' class='a' target='_blank'>" + str.split('☆')[i].split('-')[0] + "</a></li>";
                            }
                            document.getElementById("divmain").innerHTML += "</td></tr></table>";
                        }
                    }
                }
            }
        };
    }  
}
////特许加盟
function showtex(obj)
{
    obj.style.color="black";    
    a=1;   
        
    if(document.getElementById("cid").value!=""){
    document.getElementById(document.getElementById("cid").value).style.color = "white";}
    
    /*以上为保留选中状态*/
    
    document.getElementById("cid").value = obj.id; //小类id
    
        
    window.location.href='../'+obj.id;
    
    return;


    if (window.ActiveXObject && !window.XMLHttpRequest) 
    { 
        window.XMLHttpRequest=function() 
        { 
            return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
        }
    }
    var req=new XMLHttpRequest();
    if (req) 
    { 
        req.open('POST','sustrin.aspx',true);
        req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
        req.send('texid='+obj.id);
    }
    req.onreadystatechange=function() 
    {
        if (req.readyState==4 && req.status==200)
        {
            var str1 = req.responseText.split("<!")[0].split("\r\n")[0];
            if(str1!=null && str1!="" && str1!="none")
            {
                var str = req.responseText.split("<!")[0];
                document.getElementById("divmain").innerHTML = "";
                var sing = "<table style='position:absolute;left:20px;' width='90%'>";
                sing += "<tr><td align='center'><strong><span style='font-size:24px'>" + str.split('＃')[0] + "</span></strong><hr style='BORDER-BOTTOM-STYLE: dotted; BORDER-LEFT-STYLE: dotted; BORDER-RIGHT-STYLE: dotted; BORDER-TOP-STYLE: dotted' color='#000000' size='1' /><br/></td></tr>";
                
                sing += str.split('＃')[2];
                
                sing += "<tr><td align='left'><span>" + str.split('＃')[1] + "</span></td></tr>";
                sing += "</table>";
                document.getElementById("divmain").innerHTML = sing;
            }
            else
            {
                alert("暂无任何信息！");
            }
        }
    };
}

//招聘
function showjobs(obj)
{
    obj.style.color="black";    
    a=1;
    
    
        
    if(document.getElementById("cid").value!=""){
    document.getElementById(document.getElementById("cid").value).style.color = "white";}
    
    /*以上为保留选中状态*/
    
    document.getElementById("cid").value = obj.id; //小类id
    
    //window.location.href='http://www.jutailong.com/'+obj.id.replace("E:\\wwwjutailong\\","").replace("\\","/");    
    //return;
    
    
    if (window.ActiveXObject && !window.XMLHttpRequest) 
    { 
        window.XMLHttpRequest=function() 
        { 
            return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP') 
        }
    }
    var req=new XMLHttpRequest();
    if (req) 
    { 
        req.open('POST','sustrin.aspx',true);
        req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
        req.send('jobid='+obj.id);
    }
    req.onreadystatechange=function() 
    {
        if (req.readyState==4 && req.status==200)
        {
            var str = req.responseText.split("<!")[0];
            if(str!=null && str!="")
            {
                document.getElementById("divmain").innerHTML = "";
                               
                document.getElementById("divmain").innerHTML = str;
                
            }
        }
    };
}