var todayDate = new Date();
var mydate = todayDate.getDate();
var mymonth= todayDate.getMonth() + 1;
var myyear= todayDate.getFullYear();

var curday = myyear + "-" + mymonth + "-" + mydate;


function toPage(url){
    document.location=url;
}

function Coach() {
}

function Judgment() {
}

//function $(str){
//    return document.getElementById(str);
//}
//function _(str){
//    return document.getElementsByTagName(str);
//}
function confirmX(title,content,afterclickOK,focusIndex,okText,cancelText,okWidth,cancelWidth) {
    msg(title,2,content,afterclickOK,focusIndex,okText,cancelText,okWidth,cancelWidth);
}

function msg(boxtitle,boxtype,msg,afterclickOK,focusIndex,okText,cancelText,okWidth,cancelWidth){
    if(typeof(okText) == 'undefined' || okText == '') {
        okText = '确 定';
		}
    if(typeof(cancelText) == 'undefined' || cancelText == '') {
        cancelText = '取 消';
		}

    document.getElementById("msg_div_main").style.left = (document.getElementsByTagName("body")[0].clientWidth - 424) / 2;
    document.getElementById("msg_div_main").style.top  = (document.getElementsByTagName("body")[0].clientHeight - 200) / 2;
    var msg_div_main_btnSysMsgOk = "<input class=\"syBtn\" style=\"width:" + okWidth + "px;\" id=\"btnSysMsgOk\" type=\"button\" value=\"" + okText + "\" onclick=\"msg_close_tmp_biyuan();" + afterclickOK +"\" />";
    var msg_div_main_MsgCancel = "<input class=\"syBtn\" style=\"width:" + cancelWidth + "px;\" id=\"btnSysMsgCancel\" type=\"button\" value=\"" + cancelText + "\" onclick=\"msg_close_tmp_biyuan();\" />";   
    switch(boxtype * 1){
        case 1:
            document.getElementById("msg_div_main_content").innerHTML = msg;
            document.getElementById("msg_div_main_title").innerHTML = boxtitle;
            document.getElementById("msg_div_main_btn").innerHTML = msg_div_main_btnSysMsgOk;
            break;
        case 2:
            document.getElementById("msg_div_main_content").innerHTML =  msg;
            document.getElementById("msg_div_main_title").innerHTML = boxtitle;
            document.getElementById("msg_div_main_btn").innerHTML = msg_div_main_MsgCancel + msg_div_main_btnSysMsgOk;
            break;
        case 3:
            document.getElementById("msg_div_main_content").innerHTML =  msg;
            document.getElementById("msg_div_main_title").innerHTML = boxtitle;
            document.getElementById("msg_div_main_btn").innerHTML = "";
            break;
        defualt:
            document.getElementById("msg_div_main_content").innerHTML =  msg;
            document.getElementById("msg_div_main_title").innerHTML = boxtitle;
            document.getElementById("msg_div_main_btn").innerHTML = msg_div_main_btnSysMsgOk;
            break;
    }
    document.getElementById("msg_div_main_title").innerHTML =  boxtitle;
    document.getElementById("msg_div_all").style.zIndex  = 100;
    document.getElementById("msg_div_main").style.zIndex = 200;
    document.getElementById("msg_div_all").style.display = "";
    document.getElementById("msg_div_main").style.display = "";
    document.getElementById("msg_div_all").style.height = "100%";
    document.getElementById("msg_div_all").oncontextmenu = function(){
        return false;
    }
    document.getElementById("msg_div_main").oncontextmenu = function(){
        return false;
    }
    if(typeof(focusIndex) == 'undefined' || focusIndex == 1) {
        document.getElementById("btnSysMsgOk").focus();
		}
    else {
        document.getElementById("btnSysMsgCancel").focus();
		}
}
function msg_close_tmp_biyuan(){
    document.getElementById('msg_div_all').style.display='none';
    document.getElementById('msg_div_main').style.display='none';
}
var ie = document.all;
var nn6 = document.getElementById && !document.all;
var topElement = "HTML";
var y,x;
//加入对话框移动代码
var msg_md = false,msg_mobj,msg_ox,msg_oy;
document.onmousedown = function(e){
    var oDragHandle = nn6 ? e.target : event.srcElement;
    
    while (oDragHandle != null && oDragHandle.tagName != topElement && oDragHandle.className != "dragAble") {
        oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement;
    }

    if(oDragHandle != null && oDragHandle.className=="dragAble"){
        msg_md = true;
        msg_mobj = oDragHandle;
        x = nn6 ? e.clientX : event.x;
        y = nn6 ? e.clientY : event.y;
        msg_ox = msg_mobj.offsetLeft - x;
        msg_oy = msg_mobj.offsetTop - y;
    }
}
document.onmouseup = function(){
    msg_md = false;
}

document.onmousemove = function(e){
    if(msg_md){
        x = nn6 ? e.clientX : event.x;
        y = nn6 ? e.clientY : event.y;
        msg_mobj.style.left = x + msg_ox;
        msg_mobj.style.top  = y + msg_oy;
    }
}

document.writeln("<style type='text/css'>"
+ " #msg_div_all {width:0px;height:0px;position:absolute;background:#FFFFFF;}"
+ " #msg_div_main {position:absolute;background:#FFFFFF;border:1px solid #b1770b;}"
+ " #msg_div_main_title {font-size:14px;color:#1a3d5b;font-family:verdana;font-weight:bold;cursor:default;}"
+ " #msg_div_main_content {font-size:14px;color:#143b5d;padding-left:8px;}"
+ " #msg_div_main_btn {float:right;}"
+ " span,h2,table,tr,td"
+ " {margin:0;padding:0;font-family:verdana,Arial, Helvetica, sans-serif;list-style-type:none;font-size:inherit;color:inherit;z-index:inherit}"
+ " table{border:0;border-collapse:collapse}"
+ " .syBtn{float:right;background-position:-1198px -13px;cursor:pointer;height:26px;padding:0 5px;font-size:12px;line-height:26px;border:0.05em solid #0a2139;text-align:center;background-color:#1f68ac;color:white !important;font-weight:bold;}"
+ " .fLe,.fLeft{float:left}"
+ " .fRi,.fRig{float:right}"
+ " .sysWin{width:424px;z-index:100000!important}"
+ " .sysWin h2{height:28px;background-position:0 -649px}"
+ " .sysWin h2 .fLe{width:5px;height:28px;background-position:-1069px -5px}"
+ " .sysWin h2 .fRi{width:5px;height:28px;background-position:-1089px -5px}"
+ " .sysWin .icoSw{display:block;width:14px;height:14px;margin:6px 6px 0 2px;background-position:-1147px -39px;float:left}"
+ " .sysWin .icoSwAdb{background-position:-200px -6px}"
+ " .sysWin h2 span{float:left;padding-top:8px;font-weight:normal;cursor:default}"
+ " a.clsWin{width:14px;height:14px;font-weight:bold;display:block;color:#1a3d5b;float:right;background-position:-1181px -38px;margin:6px 4px 0 0}"
+ " a.clsWin:hover{background-position:-1199px -38px;color:#1a3d5b;}"
+ " .sysWin div.bdy{background-position:-747px 0;background-repeat:repeat-y;background-color:#FFF}"
+ " .sysWin div.bdyCtn{padding:20px;margin:0 3px;color:#000}"
+ " .swTb{line-height:160%}"
+ " .swTb tr{vertical-align:middle}"
+ " .swTb th{width:70px}"
+ " *:lang(zh) .swTb th{width:55px}"
+ " .icoIfo{width:20px;height:20px;background-position:-324px -42px;display:block}"
+ " .swTit{cursor:default}"
+ " .swTit p,.swTit span{cursor:default; color:000;}"
+ " .sysWin div.bot{height:45px;background-position:0 -705px;position:relative;border:0}"
+ " .sysWin .bot .fLe{width:5px;height:45px;background-position:-1070px -48px;position:absolute;left:0;top:0}"
+ " .sysWin .bot .fRi{width:5px;height:45px;background-position:-1089px -48px;position:absolute;right:0;top:0}"
+ " .sysWin .bot .syBtn{float:right;margin:5px 10px 0 5px}"
+ " .sysWin .msg1{height:120px;text-align:center;line-height:120px}"
+ " .msg1Tb{height:120px;text-align:center;width:99%;line-height:180%}"
+ " .msg1Tb tr{vertical-align:middle}"
+ " .msg1Tb td{padding-top:10px;padding-bottom:15px} .sysWin .bot{text-align:center;padding:4px;border-top:1px solid #E5E5E5}"
+ " .sysWin .btnFnt{width:80px}"
+ " .swEroMsg{font-size:12px;margin-left:110px;color:#990000}"
+ " h2{font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif,\"宋体\"}"
+ " .sysWin h2 span{color:#000}"
+ " .swTit{color:#000}"
+ " .f12{ font-size:12px}"
+ " .f14,.gNav li a,.swTit"
+ " {font-size:14px}"
+ " .sysWin div.bdyCtn{background-color:#FFFFFF}"
+ " .sysWin h2 .fLe,.sysWin h2 .fRi,.sysWin .bdy,.sysWin .bot .fLe,.sysWin .bot .fRi,.syBtn,"
+ " { background-image:url(images/f1.gif); background-repeat:no-repeat}"
+ " body.gb{ background-repeat:repeat-y}"
+ " .icoIfo"
+ " { background-image:url(images/f1png.png); background-repeat:no-repeat}"
+ " .sysWin h2,.sysWin .bot"
+ " { background-image:url(images/f2.gif); background-repeat:repeat-x}"
+ " .icoSw,a.clsWin"
+ " { background-image:url(images/ico.gif); background-repeat:no-repeat; color:#1a3d5b;}"
+ "</style>"
+ "<div id='msg_div_all' style='display:none;'></div>"
+ "<div id='msg_div_main' style='display:none;' class=\"dragAble\">"
+ "  <div class=\"sysWin\" id=\"sysMsgWin\" style=\"z-index: 999; \">"
+ "    <h2 msg_canmove=\"true\" msg_forid=\"msg_div_main\">"
+ "      <div class=\"fLe\"></div>"
+ "      <b class=\"icoSw\" id=\"icoSw\" msg_canmove=\"true\" msg_forid=\"msg_div_main\"></b><span id=\"msg_div_main_title\" msg_canmove=\"true\" msg_forid=\"msg_div_main\">系统提示</span><div class=\"fRi\"></div>"
+ "      <a class=\"clsWin\" id=\"btnSysInfoClose\" title=\"关闭\" href=\"javascript:msg_close_tmp_biyuan();\"> X </a>"
+ "    </h2>"
+ "    <div class=\"bdy\">"
+ "      <div class=\"bdyCtn\">"
+ "        <table width='100%' border=0 cellspacing=0 cellpadding=0 class=\"swTb\">"
+ "          <tbody>"
+ "            <tr>"
+ "              <th>"
+ "                <b class=\"icoIfo\" id=\"icoIfo\"></b>"
+ "              </th>"
+ "              <td align=left>"
+ "                <span style=\"text-align:left;color:000;\" class=\"swTit\" id=\"msg_div_main_content\"></span>"
+ "              </td>"
+ "            </tr>"
+ "          </tbody>"
+ "        </table>"
+ "        <div class=\"clear\"></div>"
+ "      </div>"
+ "    </div>"
+ "    <div class=\"bot\">"
+ "      <div class=\"fLe\"></div>"
+ "      <div id=\"msg_div_main_btn\"></div>"
+ "      <div class=\"fRi\"></div>"
+ "    </div>"
+ "  </div>"
+ "</div>");
