<%@ page language="C#" autoeventwireup="true" inherits="DH_leftframe, App_Web_leftframe.aspx.578e71dc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;" />
<link rel="stylesheet" href="css/common.css" type="text/css" />

<title>左侧导航栏</title>
</head>
<script  type="text/javascript">

var outlookbar=new outlook();;
var t;
t=outlookbar.addtitle('教师档案','教师档案',1);
outlookbar.additem('教师档案',t,'../_school/J1_SchoolTeacherList.aspx');
outlookbar.additem('教师档案Excal导入',t,'../_school/J1_TeacherInfoImport.aspx');

t=outlookbar.addtitle('业绩档案','教师档案',1);
outlookbar.additem('教师业绩档案',t,'../_school/J1_TeacherDir.aspx');
outlookbar.additem('教师业绩录入',t,'../_school/J1_AddTeacherPerformance.aspx');
outlookbar.additem('教师业绩查询',t,'../_school/J1_QuerySchoolPerformance.aspx');

t=outlookbar.addtitle('业绩统计','教师档案',1);
outlookbar.additem('教师各学期成绩统计表',t,'../_school/J1_SchoolStatistics_1.aspx');
outlookbar.additem('各学期期成绩统计表',t,'../_school/J1_SchoolStatistics_2.aspx');
outlookbar.additem('各科目成绩统计表',t,'../_school/J1_SchoolStatistics_3.aspx');
t=outlookbar.addtitle('系统','教师档案',1);
outlookbar.additem('修改密码',t,'../_school/J1_SchoolUpdatedatePassword.aspx');


var preClassName = "";
function list_sub_detail(Id, item) {
    if (preClassName != "") {
        getObject(preClassName).className = "left_back"
    }
    if (getObject(Id).className == "left_back") {
        getObject(Id).className = "left_back_onclick";
        outlookbar.getbyitem(item);
        preClassName = Id
    }
}
function getObject(objectId) {
    if (document.getElementById && document.getElementById(objectId)) {
        return document.getElementById(objectId)
    } else if (document.all && document.all(objectId)) {
        return document.all(objectId)
    } else if (document.layers && document.layers[objectId]) {
        return document.layers[objectId]
    } else {
        return false
    }
}
function outlook() {
    this.titlelist = new Array();
    this.itemlist = new Array();
    this.addtitle = addtitle;
    this.additem = additem;
    this.getbytitle = getbytitle;
    this.getbyitem = getbyitem;
    this.getdefaultnav = getdefaultnav
}
function theitem(intitle, insort, inkey, inisdefault) {
    this.sortname = insort;
    this.key = inkey;
    this.title = intitle;
    this.isdefault = inisdefault
}
function addtitle(intitle, sortname, inisdefault) {
    outlookbar.itemlist[outlookbar.titlelist.length] = new Array();
    outlookbar.titlelist[outlookbar.titlelist.length] = new theitem(intitle, sortname, 0, inisdefault);
    return (outlookbar.titlelist.length - 1)
}
function additem(intitle, parentid, inkey) {
    if (parentid >= 0 && parentid <= outlookbar.titlelist.length) {
        insort = "item_" + parentid;
        outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length] = new theitem(intitle, insort, inkey, 0);
        return (outlookbar.itemlist[parentid].length - 1)
    } else additem = -1
}
function getdefaultnav(sortname) {
    var output = "";
    for (i = 0; i < outlookbar.titlelist.length; i++) {
        if (outlookbar.titlelist[i].isdefault == 1 && outlookbar.titlelist[i].sortname == sortname) {
            output += "<div class=list_tilte id=sub_sort_" + i + " onclick=\"hideorshow('sub_detail_" + i + "')\">";
            output += "<span>" + outlookbar.titlelist[i].title + "</span>";
            output += "</div>";
            output += "<div class=list_detail id=sub_detail_" + i + "><ul>";
            for (j = 0; j < outlookbar.itemlist[i].length; j++) {
                output += "<li id=" + outlookbar.itemlist[i][j].sortname + j + ">"
                if(outlookbar.itemlist[i][j].title=="客户列表")
                output+="<a href=# onclick=\"changeframe('" + outlookbar.itemlist[i][j].title + "','" + outlookbar.titlelist[i].title + "','" + outlookbar.itemlist[i][j].key + "')\" >" + outlookbar.itemlist[i][j].title + "</a><div style='display:none'><div>";
                else
                output+="<a href=# onclick=\"changeframe('" + outlookbar.itemlist[i][j].title + "','" + outlookbar.titlelist[i].title + "','" + outlookbar.itemlist[i][j].key + "')\" >" + outlookbar.itemlist[i][j].title + "</a>";
                output += "</li>"
            }
            output += "</ul></div>"
        }
    }
    getObject('right_main_nav').innerHTML = output
}
//function showClass(obj){
//    var divc = $(obj).siblings("div")
//    if(divc.get(0).style.display == "none"){
//    
//        $.ajax({
//               type: "POST",
//               dataType:"text",
//               processData:false,
//               async:false,
//               url: "QueryCustClass.ashx",
//               success: function(msg){
//                   divc.show();
//                   divc.html(msg);
//                   $(obj).text("[-]");
//               },
//               error:function (XMLHttpRequest, textStatus, errorThrown) { 
//                   divc.html("加载失败");
//                   $(obj).text("[-]");
//               }
//            });
//     }else{
//         divc.hide();
//         $(obj).text("[+]");
//     }
//}

function getbyitem(item) {
    var output = "";
    for (i = 0; i < outlookbar.titlelist.length; i++) {
        if (outlookbar.titlelist[i].title == item) {
            output = "<div class=list_tilte id=sub_sort_" + i + " onclick=\"hideorshow('sub_detail_" + i + "')\">";
            output += "<span>" + outlookbar.titlelist[i].title + "</span>";
            output += "</div>";
            output += "<div class=list_detail id=sub_detail_" + i + " style='display:block;'><ul>";
            for (j = 0; j < outlookbar.itemlist[i].length; j++) {
                output += "<li id=" + outlookbar.itemlist[i][j].sortname + "_" + j + " onclick=\"changeframe('" + outlookbar.itemlist[i][j].title + "','" + outlookbar.titlelist[i].title + "','" + outlookbar.itemlist[i][j].key + "')\"><a href=#>" + outlookbar.itemlist[i][j].title + "</a></li>"
            }
            output += "</ul></div>"
        }
    }
    getObject('right_main_nav').innerHTML = output
}

function getbytitle(sortname) {
    var output = "<ul>";
    for (i = 0; i < outlookbar.titlelist.length; i++) {
        if (outlookbar.titlelist[i].sortname == sortname) {
            output += "<li id=left_nav_" + i + " onclick=\"list_sub_detail(id,'" + outlookbar.titlelist[i].title + "')\" class=left_back>" + outlookbar.titlelist[i].title + "</li>"
        }
    }
    output += "</ul>";
    getObject('left_main_nav').innerHTML = output
}
function changeframe(item, sortname, src) {
    if (item != "" && sortname != "") {
        window.top.frames['mainFrame'].getObject('show_text').innerHTML = sortname + "&nbsp;&nbsp;<img src=images/slide.gif broder=0 />&nbsp;&nbsp;" + item
    }
    if (src != "") {
        window.top.frames['manFrame'].location = src
    }
}
function hideorshow(divid) {
    subsortid = "sub_sort_" + divid.substring(11);
    if (getObject(divid).style.display == "none") {
        getObject(divid).style.display = "block";
        getObject(subsortid).className = "list_tilte"
    } else {
        getObject(divid).style.display = "none";
        getObject(subsortid).className = "list_tilte_onclick"
    }
}
function initinav(sortname) {
    outlookbar.getdefaultnav(sortname);
    outlookbar.getbytitle(sortname);

}



</script>

<script language="JavaScript">
function CloseWin()
{
var ua=navigator.userAgent
var ie=navigator.appName=="Microsoft Internet Explorer"?true:false
if(ie){
    var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))))
 if(IEversion< 5.5){
    var str  = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
    str += '<param name="Command" value="Close"></object>';
    document.body.insertAdjacentHTML("beforeEnd", str);
    document.all.noTipClose.Click();
    }
    else{
    window.opener =null;
    window.close();
    }
}
else{
window.close()
}
}

function closeWindow() { 
window.open('','_self'); 

window.close(); 

} 

function mannav(current){
    var bar = outlookbar; 
    var output = "<ul>"; 
    var list = new Array(); 
    for(var index=0;index<bar.titlelist.length;index++) 
    {      
        var item = bar.titlelist[index]; 
        var isExist = false; 
        for(var i = 0;i<list.length;i++){ 
            if(list[i]== item.sortname){isExist = true;break;}
   
        }
        if(isExist)continue; 
        list.unshift(item.sortname);
        var img = item.sortname==current?"bg_image_onclick":"bg_image";
        output+="<li id=\"man_nav_"+index+"\" onclick=\"list_sub_nav(id,'"+
        item.sortname+"')\"  class=\""+img+"\">"+item.sortname+"</li>";
    }
    output+="</ul>";
    return output;
}
</script>

<body>
<div id="left_content">
     <div id="user_info"><%=adminName %> 您好！ <br />[<a href="#"></a><a href="../_school/J1_TeacherExist.aspx" target="_parent" >退出系统登录</a>]</div>
	 <div id="main_nav">
	     <div id="left_main_nav"></div>
		 <div id="right_main_nav" ></div>
	 </div>
</div>

</body>
</html>
