<%@ page import="com.jeeplus.common.utils.StringUtils" %>
<%@ page import="com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>首页</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(function(){
            // $("img").not(".upload_ico").each(function () {
            //     var num = 1 ;
            //     $(this).click(function () {
            //         var flag = num%2;
            //         if(flag == 1){
            //             $(this).css("width","90%");
            //             $(this).css("height","90%");
            //             num++;
            //         }else if(flag ==0){
            //             $(this).css("width","50px");
            //             $(this).css("height","50px");
            //             num++;
            //         }
            //     })
            // });
        })
        $(document).ready(function() {
            WinMove();
        });

        function openDialogre(title,url,width,height,target){
            parent.index = "";
            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url ,
                skin: 'three-btns',
                btn: ['通过','驳回','关闭'],
                btn1: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmit(1,index) ){
                        top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2:function(index,layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmit(2) ){
                        top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                    return false;
                },cancel: function(index){
                }
            });

        }
        function openDialogres(title,url,width,height,target) {
            parent.index = "";
            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端，就使用自适应大小弹窗
                width = 'auto';
                height = 'auto';
            } else {//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url,
                shin:"two-btns",
                btn: ['重新申请', '关闭'],
                btn1: function (index, layero) {
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if (target) {
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    } else {
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target", top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if (iframeWin.contentWindow.doSubmit(3)) {
                        top.layer.close(index);//关闭对话框。
                        setTimeout(function () {
                            top.layer.close(index)
                        }, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2: function(index){
                }
            });
        }
        function openDialogresExample(title,url,width,height,target) {
            parent.index = "";
            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端，就使用自适应大小弹窗
                width = 'auto';
                height = 'auto';
            } else {//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url,
                shin:"two-btns",
                btn: ['重新申请', '关闭'],
                btn1: function (index, layero) {
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if (target) {
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    } else {
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target", top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if (iframeWin.contentWindow.doSubmita(3)) {
                        //top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2: function(index){
                }
            });
        }
        function openDialogreExample(title,url,width,height,target){
            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                skin:"three-btns",
                maxmin: true, //开启最大化最小化按钮
                content: url ,
                btn: ['通过','驳回','关闭'],
                btn1: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmita(1) ){

                        //top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2:function(index,layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmita(2) ){

                        //top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                    return false;
                },
                btn3: function(index){
                }
            });

        }
        function openDialogPass(title,url,width,height,target,buttons) {

            parent.index = "";
            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端，就使用自适应大小弹窗
                width = 'auto';
                height = 'auto';
            } else {//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url,
                shin:"two-btns",
                btn: buttons.split(','),
                btn1: function (index, layero) {
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if (target) {
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    } else {
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target", top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if (iframeWin.contentWindow.doSubmit(1)) {
                        top.layer.close(index);//关闭对话框。
                        setTimeout(function () {
                            top.layer.close(index)
                        }, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2: function(index){
                }
            });
        }
        function openDialogreAttendance(title,url,width,height,target){
            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                skin:"three-btns",
                maxmin: true, //开启最大化最小化按钮
                content: url ,
                btn: ['确认','重算','关闭'],
                btn1: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmit(1) ){
                        //top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2:function(index,layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    parent.layer.confirm('确定要进行重算吗？',{icon: 3, title:'系统提示'}, function(index){
                        if(iframeWin.contentWindow.doSubmit(2) ){
                            //top.layer.close(index);//关闭对话框。
                            //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                        }
                        parent.layer.close(index);
                    }, function(index){
                        parent.layer.close(index)
                    });

                    return false;
                },
                btn3: function(index){
                }
            });

        }

        function openDialogreAttendanceAudit(title,url,width,height,target){
            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                skin:"three-btns",
                maxmin: true, //开启最大化最小化按钮
                content: url ,
                btn: ['同意','驳回','关闭'],
                btn1: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmit(1) ){
                        //top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn2: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    if(iframeWin.contentWindow.doSubmit(2) ){
                        //top.layer.close(index);//关闭对话框。
                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒，对应360 7.1版本bug
                    }
                },
                btn3: function(index){
                }
            });

        }
    </script>
    <script type="text/javascript">
       /* $(function () {
            var userId = '${fns:getUser().id}';
            var roleId = '${fns:getUser().roleIds}';
            var companyId = '${fns:getUser().company.id}';
            var officeId ='${fns:getUser().office.id}';
            var type ='2';

            var socket;
            if(typeof(WebSocket) == "undefined") {
                //top.layer.alert("您的浏览器不支持WebSocket");
                return;
            }
            socket = new WebSocket("ws://"+window.document.domain+":8670");

            //监听窗口关闭事件，当窗口关闭时，主动去关闭websocket连接，防止连接还没断开就关闭窗口，server端会抛异常。
            window.onbeforeunload = function(){
                socket.close();
            };
            //发生了错误事件
            socket.onerror = function(event) {

            };
            //关闭事件
            socket.onclose = function(event) {

            };
            //打开连接事件
            socket.onopen = function() {
                //登录成功首次刷新和点击"首页" --- 用的是{ctx}/home 方法
                //socket.send("_user_notify{\"userId\":\""+userId+"\",\"companyId\":\""+companyId+"\",\"officeId\":\""+officeId+"\",\"roleId\":\""+roleId+"\",\"type\":\""+type+"\","messageType":"_user_notify_"}");
                //以后每隔30秒 服务端向浏览器 推送消息
                //setInterval(exeMessage,30000);
            };
            function exeMessage()
            {
                socket.send("{\"userId\":\""+userId+"\",\"companyId\":\""+companyId+"\",\"officeId\":\""+officeId+"\",\"roleId\":\""+roleId+"\",\"type\":\""+type+"\",\"messageType\":\"_user_notify_\"}");
            }
            //发送消息事件
            socket.onmessage = function(event) {
                //top.layer.alert("onMessage：服务器返回的数据！");
                var resultData = event.data;
                var message = $.parseJSON(resultData);
                var resultState = message['resultState'];
                //console.log(resultState);
                if (resultState != "success") {
                    console.info("false");
                    return;
                }
                var noReadCount=message['noReadCount'],
                    mailPage=message['mailPage'],
                    count=message['count'],
                    page=message['page'],
                    notifyCount=message['notifyCount'],
                    notifyPage=message['notifyPage'],
                    notifyShowCount=message['notifyShowCount'],
                    notifyShowPage=message['notifyShowPage'];

//                    console.log("noReadCount==="+noReadCount);
//                    console.log("mailPage==="+mailPage);
//                    console.log("count==="+count);
//                    console.log("page==="+page);
//                    console.log("notifyCount==="+notifyCount);
//                    console.log("notifyPage==="+notifyPage);
//                    console.log("notifyShowCount==="+notifyShowCount);
//                    console.log("notifyShowPage==="+notifyShowPage);

                var regExp = /'/g;
                if(noReadCount.length<1){
                    noReadCount="0";
                }
                if(mailPage.length>1){
                    mailPage = mailPage.replace(regExp,"\"");
                    mailPage = $.parseJSON(mailPage);
                }else{mailPage=""}
                if(count.length<1){
                    count="0";
                }
                if(page.length>1){
                    page = page.replace(regExp,"\"");
                    page = $.parseJSON(page);
                }else{page=""}
                if(notifyCount.length<1){
                    notifyCount="0";
                }
                if(notifyPage.length>1){
                    notifyPage = notifyPage.replace(regExp,"\"");
                    notifyPage = $.parseJSON(notifyPage);
                }else{notifyPage=""}
                if(notifyShowCount.length<1){
                    notifyShowCount="0";
                }
                if(notifyShowPage.length>1){
                    notifyShowPage = notifyShowPage.replace(regExp,"\"");
                    notifyShowPage = $.parseJSON(notifyShowPage);
                }else{notifyShowPage=""}

                $("#countSpan_notifyCount").text(parseInt(notifyCount)>9?"10+":parseInt(notifyCount));
                $("#countSpan_notifyShowCount").text(parseInt(notifyShowCount)>9?"10+":parseInt(notifyShowCount));
                $("#countSpan_count").text(parseInt(count)>9?"10+":parseInt(count));
                $("#countSpan_noReadCount").text(parseInt(noReadCount)>9?"10+":parseInt(noReadCount));

                //待办
                if(parseInt(notifyCount)==0){
                    $("#contentDiv_notifyPage").html("当前暂无我的待办任务");
                }else{
                    if(notifyPage!=null&&notifyPage!=undefined&&notifyPage!="") {

                        var idArray = new Array();
                        for (var i in notifyPage) {
                            var id = notifyPage[i].id;
                            idArray[i] = id;
                        }

                        $("table#contentTable_notifyPage").find("tbody").find("tr").each(function (i,n) {
                            var trId = $(n).attr("id");
                            if($.inArray(trId,idArray)==-1){
                                $(n).nextAll().each(function (j,m) {
                                    var num = $(m).find("td:first").text().trim();
                                    $(m).find("td:first").text(parseInt(num)-1);
                                });
                                $(n).remove();
                            }
                        });
                    }
                }
                //通知
                if(parseInt(notifyShowCount)==0){
                    $("#contentDiv_notifyShowPage").html("当前暂无我的通知信息");
                }else{
                    if(notifyShowPage!=null&&notifyShowPage!=undefined&&notifyShowPage!="") {

                        var idArray = new Array();
                        for (var i in notifyShowPage) {
                            var id = notifyShowPage[i].id;
                            idArray[i] = id;
                        }

                        var trArray = new Array();
                        $("table#contentTable_notifyShowPage").find("tbody").find("tr").each(function (i,n) {
                            var trId = $(n).attr("id");
                            trArray[i] = trId;
                            if($.inArray(trId,idArray)==-1){
                                $(n).nextAll().each(function (j,m) {
                                   var num = $(m).find("td:first").text().trim();
                                    $(m).find("td:first").text(parseInt(num)-1);
                                });
                                $(n).remove();
                            }
                        });

 /!*                       for(var i in notifyShowPage){
                            var id = notifyShowPage[i].id;
                            if($.inArray(id,trArray)==-1){
                                var title = notifyShowPage[i].title;
                                var status = notifyShowPage[i].status;
                                var updateDate = notifyShowPage[i].updateDate;
                                //暂时
                                window.location.reload();


                                var aTab = '<a><span>'+
                                        '${fns:abbr(''+title+'',30)}'+
                                        '</span></a>';

                            }
                        }*!/

                    }
                }
                //公告
                if(parseInt(count)==0){
                    $("#contentDiv_oaNotify").html("当前暂无我的公告信息");
                }else{
                    if(page!=null&&page!=undefined&&page!="") {

                        var idArray = new Array();
                        for (var i in page) {
                            var id = page[i].id;
                            idArray[i] = id;
                        }

                        $("table#contentTable_oaNotify").find("tbody").find("tr").each(function (i,n) {
                            var trId = $(n).attr("id");
                            if($.inArray(trId,idArray)==-1){
                                $(n).nextAll().each(function (j,m) {
                                    var num = $(m).find("td:first").text().trim();
                                    $(m).find("td:first").text(parseInt(num)-1);
                                });
                                $(n).remove();
                            }
                        });
                    }
                }
                //邮件
                if(parseInt(noReadCount)==0){
                    $("#contentDiv_email").html("当前暂无我的邮件信息");
                }else{
                    if(mailPage!=null&&mailPage!=undefined&&mailPage!="") {

                        var idArray = new Array();
                        for (var i in mailPage) {
                            var id = mailPage[i].id;
                            idArray[i] = id;
                        }

                        $("table#contentTable_email").find("tbody").find("tr").each(function (i,n) {
                            var trId = $(n).attr("id");
                            if($.inArray(trId,idArray)==-1){
                                $(n).nextAll().each(function (j,m) {
                                    var num = $(m).find("td:first").text().trim();
                                    $(m).find("td:first").text(parseInt(num)-1);
                                });
                                $(n).remove();
                            }
                        });
                    }
                }

            }
        })*/
    </script>
    <style>
        body{
            background-color:transparent;
            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
            color:#ffffff;
            background-color:rgba(255,255,255,0);
            height:100%;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <sys:message content="${message}"/>
    <div class="homeDiv">
        <div class="layui-col-sm6 layui-col-md6 call-board">
            <div id="schedule-bord" class="call-bord-content contentShadow">
                <div class="bord-left">
                    <div class="bord-left-content">
                        <div class="bord-title">待办事项(${notifyCount1})</div>
                        <%--<div class="bord-pic"><img src="${ctxStatic}/common/img/icon01.png" height="100%" /></div>--%>
                        <%--<div class="bord-num">${notifyCount1}</div>--%>
                    </div>
                    <div class="bord-more">
                        <a href="javascript:void(0)" onclick='top.openTab("${ctx }/workprojectnotify/workProjectNotify/list","待办事项", false);'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
                <div class="bord-right">
                    <div class="bord-contents">
                        <span class="schedule-bord-nodata hide bord-nodata-info">暂无新的待办事项</span>
                        <ul class="border-ul" style="height:100%;">
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md6 call-board">
            <div id="notify-bord" class="call-bord-content contentShadow">
                <div class="bord-left">
                    <div class="bord-left-content">
                        <div class="bord-title">通知消息(${notifyShowCount1})</div>
                        <%--<div class="bord-pic"><img src="${ctxStatic}/common/img/icon02.png" height="100%" /></div>--%>
                        <%--<div class="bord-num">${notifyShowCount1}</div>--%>
                    </div>
                    <div class="bord-more">
                        <a href="javascript:void(0)" onclick='top.openTab("${ctx }/workprojectnotify/workProjectNotify/listShow","通知消息", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
                <div class="bord-right">
                    <div class="bord-contents">
                        <span class="schedule-bord-nodata hide bord-nodata-info">暂无新的通知消息</span>
                        <ul>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md6 call-board">
            <div id="msg-bord" class="call-bord-content contentShadow">
                <div class="bord-left">
                    <div class="bord-left-content">
                        <div class="bord-title">公告信息(${count1})</div>
                        <%--<div class="bord-pic"><img src="${ctxStatic}/common/img/icon03.png" height="100%" /></div>--%>
                        <%--<div class="bord-num">${count1}</div>--%>
                    </div>
                    <div class="bord-more">
                        <a href="javascript:void(0)" onclick='top.openTab("${ctx }/oa/oaNotify/self","公告信息", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
                <div class="bord-right">
                    <div class="bord-contents">
                        <span class="schedule-bord-nodata hide bord-nodata-info">暂无新的公告信息</span>
                        <ul>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md6 call-board">
            <div id="email-bord" class="call-bord-content contentShadow">
                <div class="bord-left">
                    <div class="bord-left-content">
                        <div class="bord-title">我的日程(${calendarSize})</div>
                        <%--<div class="bord-pic"><img src="${ctxStatic}/common/img/icon05.png" height="100%" /></div>--%>
                        <%--<div class="bord-num">${calendarSize}</div>--%>
                    </div>
                    <div class="bord-more">
                        <a href="javascript:void(0)" onclick='top.openTab("${ctx}/workcalendar/workCalendar","我的日程", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
                <div class="bord-right">
                    <div class="bord-contents">
                        <span class="schedule-bord-nodata hide bord-nodata-info">暂无日程信息</span>
                        <ul>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
       <%-- <div class="layui-col-sm6 layui-col-md6 call-board hide">
            <div id="email-bord" class="call-bord-content contentShadow">
                <div class="bord-left">
                    <div class="bord-left-content">
                        <div class="bord-title">邮件信息</div>
                        <div class="bord-pic"><img src="${ctxStatic}/common/img/icon05.png" height="100%" /></div>
                        <div class="bord-num">${noReadCount}</div>
                    </div>
                    <div class="bord-more">
                        <a href="javascript:void(0)" onclick='top.openTab("${ctx}/iim/mailBox/list?orderBy=sendtime desc","邮件列表", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
                <div class="bord-right">
                    <div class="bord-contents">
                        <span class="schedule-bord-nodata hide bord-nodata-info">暂无新的邮件信息</span>
                        <ul>
                        </ul>
                    </div>
                </div>
            </div>
        </div>--%>
        <div class="layui-col-sm6 layui-col-md6 call-board hide">
            <div id="statistics-bord" class="call-bord-content contentShadow">
                <div class="bord-left">
                    <div class="bord-left-content">
                        <div class="bord-title">数据统计</div>
                        <div class="bord-pic"><img src="${ctxStatic}/common/img/icon04.png" height="100%" /></div>
                        <%--<div class="bord-num">${notifyCount}</div>--%>
                    </div>
                    <div class="bord-more">
                        <a href="javascript:void(0)" onclick='top.openTab("${ctx }/workprojectnotify/workProjectNotify/list","待办任务", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
                <div class="bord-right">
                    <div class="bord-contents">
                        <ul>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div style="clear:both;"></div>
    </div>
</div>
<script>

     var padding = 16 * 2;
     var lineh = 44 + 1;
     var recordcount = 8;
     var conHeight = lineh * recordcount - 1;
     var hasSchedule = true;
     var hasMsg = true;
     var hasNotify = true;
     var hasEmail = true;

    function initBord1(){
        var elem = $("#schedule-bord .bord-right ul");
        var xml ="";

        <c:forEach items="${notifyPage}" var="workProjectNotify" varStatus="status">
            <c:if test="${status.index < 8}">
                <c:choose>
                <c:when test="${workProjectNotify.type == 6}">
                    <c:if test="${workProjectNotify.status != 1}">
                        xml = "<a href=\"javascript:void(0)\" onclick=\"openDialog('确认定投标', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                    </c:if>
                    <c:if test="${workProjectNotify.status ==1}">
                        xml ="<a href=\"javascript:void(0)\" onclick=\"openDialogView('确认定投标', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                    </c:if>
                </c:when>
                <c:when test="${workProjectNotify.type eq 76  &&  workProjectNotify.notifyRole eq '调整申请'}">
                     xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogresExample('重新申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.remarks eq '待归档'}">
                    xml = "<a href=\"javascript:void(0)\" onclick=\"top.openTab('${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','待归档',false)\">";
                </c:when>
                <c:when test="${workProjectNotify.remarks eq '再次申请' && workProjectNotify.status  != 1}">
                    xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogres('重新申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.remarks eq '重新申请'  && workProjectNotify.status != 1}">
                    xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogres('重新申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.type eq 86}">
                  xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogre('档案信息修改申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                  </c:when>
                <c:when test="${workProjectNotify.type eq 18}">
                    xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogre('企业申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>

                <c:when test="${workProjectNotify.type eq 19}">
                    xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogView('企业申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 67 && workProjectNotify.notifyRole eq '部门主任'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 67 && workProjectNotify.notifyRole eq '签约人'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 16 && workProjectNotify.notifyRole eq '合同盖章'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 44 && workProjectNotify.notifyRole eq '合同盖章'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 50 && workProjectNotify.notifyRole eq '投标专员标书编制'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 50 && workProjectNotify.notifyRole eq '投标专员调整申请'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 57 && workProjectNotify.notifyRole eq '申请人归档'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 50 && workProjectNotify.notifyRole eq '盖章人盖章'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 50 && workProjectNotify.notifyRole eq '申请人开标'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 50 && workProjectNotify.notifyRole eq '市场研发管理部负责人备案'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 71 && workProjectNotify.notifyRole eq '各级审批'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','提交,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 50 && workProjectNotify.notifyRole eq '市场研发管理部负责人'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 55 && workProjectNotify.notifyRole eq '申请人审批'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 58 && workProjectNotify.remarks eq '待处理'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','提交,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 69 && workProjectNotify.remarks eq '待处理'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','提交,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 60 && workProjectNotify.remarks eq '待审批'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 61 && workProjectNotify.notifyRole eq '行政主管'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                 <c:when test="${workProjectNotify.type == 66 && workProjectNotify.notifyRole eq '转正人补充信息'}">
                 xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                  </c:when>
                <c:when test="${workProjectNotify.type == 40 && workProjectNotify.notifyRole eq '主管会计审核'}">
                     xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 76 && workProjectNotify.notifyRole eq '案例审核人审批'}">
                  xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogreExample('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 83 }">
                  xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogreAttendanceAudit('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.type == 84 }">
                  xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogreAttendance('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>
                <c:when test="${workProjectNotify.remarks eq '待审批' && workProjectNotify.status != 1 }">
                    xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogre('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:when>

                <c:otherwise>
                    xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogView('查看通知', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
                </c:otherwise>
                </c:choose>

                elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}\">${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}</span><span class=\"bord-record\" title=\"${workProjectNotify.title}\">${workProjectNotify.title}</span>" +
                    '<span class="bord-record-time">' + '<fmt:formatDate value="${workProjectNotify.updateDate}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
            </c:if>
        </c:forEach>

        <c:if test="${notifyCount1 eq 0}">
            hasSchedule = false
        </c:if>
    }

    function initBord2(){

        var elem = $("#notify-bord .bord-right ul");
        var xml = "";

        <c:forEach items="${notifyShowPage}" var="workProjectNotify" varStatus="status">
        <c:if test="${status.index < 8}">
            <c:choose>
            <c:when test="${workProjectNotify.type == 6}">
            <c:if test="${workProjectNotify.status !=1}">
                xml = "<a href=\"javascript:void(0)\" onclick=\"openDialog('确认定投标', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
            </c:if>
            <c:if test="${workProjectNotify.status ==1}">
                xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogView('确认定投标', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
            </c:if>
            </c:when>
            <c:when test="${workProjectNotify.remarks eq '待审批!'}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialog('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
            </c:when>
            <c:when test="${workProjectNotify.remarks eq '三级校审' && workProjectNotify.status != 1}">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogre('待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">" ;
            </c:when>
            <c:when test="${workProjectNotify.remarks eq '重新申请'  && workProjectNotify.status != 1}">
                xml = "<a href=\"javascript:void(0)\" onclick=\"top.openTab('${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','重新申请信息',false)\">" ;
            </c:when>
            <c:when test="${workProjectNotify.type eq 18}">
                xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogView('企业申请','${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
            </c:when>
            <c:when test="${workProjectNotify.type eq 19}">
                xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogView('企业申请','${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
            </c:when>
            <c:when test="${workProjectNotify.remarks eq '待审批' && workProjectNotify.status != 1 }">
                xml = "<a  href=\"javascript:void(0)\" onclick=\"top.openTab('${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','待审批', false)\">";
            </c:when>
            <c:otherwise>
                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogView('查看通知', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
            </c:otherwise>
            </c:choose>

            elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}\">${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}</span><span class=\"bord-record\" title=\"${workProjectNotify.title}\">${workProjectNotify.title}</span>" +
                '<span class="bord-record-time">' + '<fmt:formatDate value="${workProjectNotify.updateDate}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
        </c:if>
        </c:forEach>

        <c:if test="${notifyShowCount1 eq 0}">
            hasNotify = false
        </c:if>
    }

    function initBord3(){
        var elem = $("#msg-bord .bord-right ul");
        var xml = "";
        <c:forEach items="${page}" var="oaNotify" varStatus="index">
        <c:if test="${index.index < 8}">
            xml ="<a href=\"javascript:void(0)\" onclick=\"openDialogView('查看公告', '${ctx}/oa/oaNotify/view?id=${oaNotify.id}&readAttr=disabled','95%','95%')\"  >";

            elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getMainDictLabel(oaNotify.type, 'oa_notify_type', '')}\">${fns:getMainDictLabel(oaNotify.type, 'oa_notify_type', '')}</span><span class=\"bord-record\" title=\"${oaNotify.title}\">${oaNotify.title}</span>" +
                '<span class="bord-record-time">' + '<fmt:formatDate value="${oaNotify.updateDate}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
        </c:if>
        </c:forEach>

        <c:if test="${count1 eq 0}">
            hasMsg = false
        </c:if>

    }
     function initBord4(){
         var elem = $("#email-bord .bord-right ul");
         var xml = "";
         <c:forEach items="${calendarCount}" var="workCalendar" varStatus="index">
         <c:if test="${index.index < 8}">
         xml ="<a href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作日历', '${ctx}/workcalendar/workCalendar/view?id=${workCalendar.id}','95%', '95%')\" >";
         elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${workCalendar.subject }\">${workCalendar.subject }</span><span class=\"bord-record\" title=\"${workCalendar.content}\">${workCalendar.content}</span>" +
             '<span class="bord-record-time">' + '<fmt:formatDate value="${workCalendar.startDate}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
         </c:if>
         </c:forEach>

         <c:if test="${calendarSize < 7}">
            hasEmail = false
         </c:if>
     }
   /*  function initBord4(){
         var elem = $("#email-bord .bord-right ul");
         var xml = "";
         <c:forEach items="${mailPage}" var="mailBox" varStatus="index">
             <c:if test="${index.index < 8}">
         xml ="<a href=\"javascript:void(0)\" onclick=\"openDialogView('${fns:abbr(mailBox.mail.title,30)}', '${ctx}/iim/mailBox/detail?id=${mailBox.id}','95%', '95%')\" >";

         elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${mailBox.sender.name }\">${mailBox.sender.name }</span><span class=\"bord-record\" title=\"${mailBox.mail.title}\">${mailBox.mail.title}</span>" +
             '<span class="bord-record-time">' + '<fmt:formatDate value="${mailBox.sendtime}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
         </c:if>
         </c:forEach>

         <c:if test="${noReadCount eq 0}">
            hasEmail = false
         </c:if>
     }*/
    function initBord()
    {
        initBord1();
        initBord2();
        initBord3();
        initBord4();
    }

    initBord();

    // function hideRecord(id,count)
    // {
    //     $("#" + id + " .bord-right ul li").each(function(index){
    //         if(index >= count)
    //         {
    //             $(this).addClass("hide");
    //         }
    //     })
    // }
    // function showRecord(id,count)
    // {
    //     $("#" + id + " .bord-right ul li").each(function(index){
    //         if(index > recordcount - 1)
    //         {
    //             if(index < count)
    //             {
    //                 $(this).removeClass("hide");
    //             }
    //         }
    //     })
    // }
    // function resizeWindow()
    // {
    //     var count = formatPadding();
    //     if(count == recordcount)
    //         return;
    //     if(count < recordcount)
    //     {
    //         ///隐藏多余的
    //         hideRecord("msg-bord",count);
    //         hideRecord("schedule-bord",count );
    //         hideRecord("notify-bord",count);
    //     }
    //     else
    //     {
    //         if(count > totalcount)///继续添加记录
    //         {
    //
    //         }
    //         showRecord("schedule-bord",count);
    //         showRecord("notify-bord",count);
    //         showRecord("msg-bord",count);
    //     }
    //     recordcount = count;
    // }

    function initScroll( div){
        var elem = $("#" + div + " .bord-right");
        var h = elem.height() - padding;
        var hideScrol = false;
        if(conHeight < h + 1 )
        {
            $("#" + div + " .bord-right .bord-contents .slimScrollDiv .slimScrollBar").css('display', 'none');
        }
        else
        {
            $("#" + div + " .bord-right .bord-contents .slimScrollDiv .slimScrollBar").css('height', (h * h / conHeight) + "px");
            // $("#" + div + ".bord-contents ").css('height',(h * h / conHeight)-20 + "px");
            $("#" + div + "  .bord-contents  ").css('padding-top', "40px");
            $("#" + div + " .bord-right .bord-contents .slimScrollDiv ").css('display', 'block');
        }
    }
    function setScroll(){
        if(hasSchedule){
            $('#schedule-bord .bord-right .bord-contents ul').slimScroll({
                height: '100%',
                railOpacity: 0.9,
                alwaysVisible: false
            });

            initScroll( "schedule-bord" );
        }

        if(hasNotify){
            $('#notify-bord .bord-right .bord-contents ul').slimScroll({
                height: '100%',
                railOpacity: 0.9,
                alwaysVisible: false
            });

            initScroll( "notify-bord" );
        }

        if(hasMsg){
            $('#msg-bord .bord-right .bord-contents ul').slimScroll({
                height: '100%',
                railOpacity: 0.9,
                alwaysVisible: false
            });

            initScroll( "msg-bord" );
        }

        if(hasEmail){
            $('#email-bord .bord-right .bord-contents ul').slimScroll({
                height: '100%',
                railOpacity: 0.9,
                alwaysVisible: false
            });

            initScroll( "email-bord" );
        }
    }

    setScroll();

    //$(window).on("resize",setScroll);

    function resizeWindow(){
        var bordHeight = document.getElementById("schedule-bord").clientHeight;
        var h = parseInt((bordHeight - padding) );

        $(".bord-right .bord-contents ul").attr("style","height:" + (h-10) + "px");
        if(hasSchedule)
            initScroll( "schedule-bord" );
        if(hasNotify)
            initScroll( "notify-bord" );
        if(hasMsg)
            initScroll( "msg-bord" );

        $(".bord-record").attr("style", "width:" + ($(".border-ul").width() - 80 - 80) + "px;");
    }
    resizeWindow();
    $(window).resize(function(){
        resizeWindow();
    });

</script>
</body>
</html>