document.write('<div id="MaskWindow" style="position:absolute;dispaly:block;FILTER: alpha(opacity=80); background-color:#EBEBEB; z-index:2; left: 0px;"><span style="display:none">maskwin</span></div>')
document.write('<iframe class="iframe_popbox" frameborder="0" style="dispaly:none;"></iframe>')
document.writeln('<div id="SystemWindow" style="display: none; position: absolute;z-index:4; ">asfsad</div>')
document.write('<div id="SystemErrWindow" style="DISPLAY: none; POSITION: absolute;z-index:5;"><span style="display:none">errwin</span></div>')
var LoadStr = '<table id="loadstr" width="218" border="0" cellpadding="1" cellspacing="1" bgcolor="#FF6600"><tr><td bgcolor="#FFF9DD"><table width="100%" border="0"><tr><td><img src="/common/images/animated_loading.gif" width="16" height="16" /></td><td>正在处理您的请求，请稍后...</td></tr></table></td></tr></table>';
var SiteTel = '400-716-1988 或 0755-28984333  ';
/*
function $(){
var elements=new Array();
for(var i=0;i<arguments.length;i++){
var element=arguments[i];
if(typeof element=='string')
element=document.getElementById(element);
if(arguments.length==1)
return element;
elements.push(element);}
return elements;}
*/
function Js_System() {
    this.Item;
}
Js_System.prototype.parentName = function(name) {
    name = (name != null) ? name : 'main'
    return name;
}
Js_System.prototype.ClientMessageBoxHtml = function(title, note, width) {
    var html = '';
    html += '<table width="' + width + '" border="0" cellpadding="1" cellspacing="1" bgcolor="#227e95">'
    html += '<tr>';
    html += '<td bgcolor="#2DA7C6">' + title + '</td>'
    html += '</tr>';
    html += '<tr>';
    html += '<td bgcolor="#FFFFFF">' + note + '</td>';
    html += '</tr>';
    html += '<tr>';
    html += '<td bgcolor="#2DA7C6" align="center"><span style="cursor:hand" onclick="javascript:document.getElementById(\'SystemWindow\').style.display=\'none\'">关闭窗口</span></td>';
    html += '</tr>';
    html += '</table>';
    return html;
}
Js_System.prototype.ClientMessageBox = function(title, note, __object, width) {
    Js_System.prototype.ClientMessageSHOW(Js_System.prototype.ClientMessageBoxHtml(title, note, width), getPosition(__object).top + 20, getPosition(__object).left);
}
Js_System.prototype.ClientMessageSHOW = function(HTML, TOP, LEFT) {
    document.getElementById('SystemWindow').innerHTML = HTML;
    document.getElementById('SystemWindow').style.top = TOP;
    document.getElementById('SystemWindow').style.left = LEFT;
    document.getElementById('SystemWindow').style.display = "block";
}
Js_System.prototype.MessageBox = function(Title, Note, BoxWidth, BoxHeight, parentifram) {
    parentifram = (parentifram != null) ? parentifram : 'main'
    var html = ""
    html = '<table border="0" cellpadding="0" cellspacing="0">';
    html += '<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="/Manage/Image/SysWindowTopBg.gif">';
    html += '<tr><td width="30"><img src="/Manage/Image/SysWindowTopLeft.gif" width="30" height="30" /></td>';
    html += '<td>$Title</td><td width="34"><img src="/Manage/Image/SysWindowTopRight.gif" width="34"   onmouseout="javascript:document.getElementById(\'SysWindowClose\').src=\'/Manage/Image/SysWindowTopRight.gif\'" id="SysWindowClose" onmouseover="javascript:document.getElementById(\'SysWindowClose\').src=\'/Manage/Image/SysWindowTopRightOnMove.gif\'"'
    html += 'onclick="javascript:document.getElementById(\'SystemWindow\').style.display=\'none\';document.getElementById(\'MaskWindow\').style.display=\'none\';document.getElementById(\'SystemErrWindow\').style.display=\'none\';if (parent.document.frames[\'' + parentifram + '\']) {parent.document.frames[\'' + parentifram + '\'].document.body.scroll = \'yes\';	}" height="30" /></td>';
    html += '</tr></table></td></tr><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0">';
    html += '<tr><td width="8" background="/Manage/Image/SysWindowLeft.gif"><img src="/Manage/Image/SysWindowLeft.gif" width="8" height="29" /></td>';
    html += '<td bgcolor=white><table width="' + BoxWidth + '" height="' + BoxHeight + '"><tr><td valign="top"><span id="SystemWindowMain">$Main</span></td></tr></table></td><td width="8" background="/Manage/Image/SysWindowRight.gif"><img src="/Manage/Image/SysWindowRight.gif" width="8" height="10" /></td>';
    html += '</tr></table></td></tr><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="/Manage/Image/SysWindowFootBg.gif">';
    html += '<tr><td width="8" height="10"><img src="/Manage/Image/SysWindowFootLeft.gif" width="8" height="10" /></td>';
    html += '<td><img src="/Manage/Image/SysWindowFootBg.gif" width="8" height="10" /></td><td width="8"><img src="/Manage/Image/SysWindowFootRight.gif" width="8" height="10" /></td>';
    html += '</tr></table></td></tr></table>';
    var SystemDiv = document.getElementById('SystemWindow')
    if (Note == "") {
        Note = LoadStr;
    }
    html = html.replace('$Title', Title);
    html = html.replace('$Main', Note);
    SystemDiv.innerHTML = html;
    var thish = parseInt(document.body.scrollTop);
    var bodyh = parseInt(document.body.clientHeight);
    if (parent.document.frames[parentifram]) { parent.document.frames[parentifram].document.body.scroll = 'no'; }
    var Mask = document.getElementById('MaskWindow');
    Mask.style.top = 0;
    Mask.style.width = document.body.scrollWidth;
    if (document.body.scrollHeight > document.body.clientHeight) {
        Mask.style.height = document.body.scrollHeight;
    }
    else {
        Mask.style.height = document.body.clientHeight;
    }
    Mask.style.display = "block";
    SystemDiv.style.top = document.body.scrollTop + bodyh / 2 - (BoxHeight / 2 + 25);
    SystemDiv.style.left = document.body.clientWidth / 2 - BoxWidth / 2;
    SystemDiv.style.display = "block";
}
Js_System.prototype.LoadWin = function(Title) {
    var html = ""
    html += '<table width="200" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">'
    html += '<tr><td bgcolor="#F3F3F3"><table width="200" border="0" cellpadding="0" cellspacing="0">'
    html += '<tr><td>&nbsp;$Title</td></tr><tr><td height="41"><img src="/common/images/loading4.gif" width="189" height="11" /></td>'
    html += '</tr></table></td></tr></table>'
    var SystemDiv = document.getElementById('SystemWindow')
    html = html.replace('$Title', Title);
    SystemDiv.innerHTML = html;
    var thish = parseInt(document.body.scrollTop);
    var bodyh = parseInt(document.body.clientHeight);
    var Mask = document.getElementById('MaskWindow');
    Mask.style.top = 0;
    Mask.style.width = document.body.scrollWidth;
    Mask.style.height = document.body.scrollHeight;
    Mask.style.display = "block";
    SystemDiv.style.top = document.body.scrollTop + bodyh / 2 - (100 / 2 + 25);
    SystemDiv.style.left = document.body.clientWidth / 2 - 200 / 2;
    SystemDiv.style.display = "block";
}
Js_System.prototype.Drag = function(sender) {
    sender.left = parseInt(sender.left) + event.x - x;
    sender.top = parseInt(sender.top) + event.y - y;
}
Js_System.prototype.ErrWin = function(msg, left, top) {
    var html = "";
    html += '<table border="0" cellpadding="0" cellspacing="0">'
    html += '<tr><td width="5" height="6"><img src="/common/images/dialog/titlewin/top_left.gif" width="5" height="6"></td>'
    html += '<td background="/common/images/dialog/titlewin/top_linebg.gif"><img src="/common/images/dialog/titlewin/top_linebg.gif" width="5" height="6"></td>'
    html += '<td width="5" height="6"><img src="/common/images/dialog/titlewin/top_right.gif" width="5" height="6"></td>'
    html += '</tr><tr><td background="/common/images/dialog/titlewin/leftbg.gif"><img src="/common/images/dialog/titlewin/leftbg.gif" width="5" height="1"></td>'
    html += '<td bgcolor="#FEFACF">$Main</td><td background="/common/images/dialog/titlewin/rightbg.gif"><img src="/common/images/dialog/titlewin/rightbg.gif" width="5" height="1"></td>'
    html += '</tr><tr><td width="5" height="4"><img src="/common/images/dialog/titlewin/boot_left.gif" width="5" height="4"></td>'
    html += '<td background="/common/images/dialog/titlewin/boot_bg.gif"><img src="/common/images/dialog/titlewin/boot_left_1.gif" width="37" height="4"></td>'
    html += '<td width="5" height="4"><img src="/common/images/dialog/titlewin/boot_right.gif" width="5" height="4"></td>'
    html += '</tr><tr><td height="4" colspan="3"><img src="/common/images/dialog/titlewin/boot_jiao.gif" width="42" height="11"></td>'
    html += '</tr></table>'
    var SystemErrWin = document.getElementById('SystemErrWindow');
    html = html.replace("$Main", msg)
    SystemErrWin.innerHTML = html;
    SystemErrWin.style.top = top - 20;
    SystemErrWin.style.left = left - 20;
    SystemErrWin.style.display = "block";
}
Js_System.prototype.ErrBottonWin = function(msg, left, top) {
    var html = "";
    html += '<table border="0" cellpadding="0" cellspacing="0"><tr>'
    html += '<td colspan="3"><img src="/common/images/dialog/titlewin/1_top_jiao.gif" width="37" height="11" /></td>'
    html += '</tr><tr><td width="4" height="4"><img src="/common/images/dialog/titlewin/1_top_left.gif" width="4" height="4" /></td>'
    html += '<td background="/common/images/dialog/titlewin/1_top_bg.gif"><img src="/common/images/dialog/titlewin/1_top_left_1.gif" width="31" height="4" /></td>'
    html += '<td width="4" height="4"><img src="/common/images/dialog/titlewin/1_top_right.gif" width="4" height="4" /></td>'
    html += '</tr><tr><td background="/common/images/dialog/titlewin/1_left_bg.gif"><img src="/common/images/dialog/titlewin/1_left_bg.gif" width="4" height="1" /></td>'
    html += '<td bgcolor="#FEFAD3">$Main</td><td background="/common/images/dialog/titlewin/1_right_bg.gif"><img src="/common/images/dialog/titlewin/1_right_bg.gif" width="4" height="1" /></td>'
    html += '</tr><tr><td width="4" height="4"><img src="/common/images/dialog/titlewin/1_foot_left.gif" width="4" height="4" /></td>'
    html += '<td background="/common/images/dialog/titlewin/1_foot_bg.gif"><img src="/common/images/dialog/titlewin/1_foot_bg.gif" width="11" height="4" /></td>'
    html += '<td width="4" height="4"><img src="/common/images/dialog/titlewin/1_foot_right.gif" width="4" height="4" /></td></tr></table>'
    var SystemErrWin = document.getElementById('SystemErrWindow');
    html = html.replace("$Main", msg)
    SystemErrWin.innerHTML = html;
    SystemErrWin.style.top = top;
    SystemErrWin.style.left = left;
    SystemErrWin.style.display = "block";
}
Js_System.prototype.ShowLoadWin = function() {
    $('SystemWindow').innerHTML = LoadStr;
    $('SystemWindow').style.top = document.documentElement.scrollTop;
    $('SystemWindow').style.left = document.body.clientWidth - 300;
    $('SystemWindow').style.display = "block";
}
Js_System.prototype.HiddenLoadWin = function() {
    $('SystemWindow').style.display = "none";
}
Js_System.prototype.HiddenErrWin = function() {
    document.getElementById('SystemErrWindow').style.display = "none";
}
Js_System.prototype.ShowErr = function(ErrName, ErrMsg) {
    alert('您在' + ErrName + '的时候，发生了错误:\r\n\r\n  ' + ErrMsg);
}
Js_System.prototype.ShowOk = function(Msg) {
    alert(Msg);
}
Js_System.prototype.ShowMarkDiv = function() {
    document.all["MarkDiv"].style.display = "block";
}
function getPosition(_object) {
    var _top = _object.offsetTop;
    var _left = _object.offsetLeft;
    while (_object = _object.offsetParent) {
        _top += _object.offsetTop;
        _left += _object.offsetLeft;
    }
    return { top: _top, left: _left };
}
function isDateString(str) {
    var reg = /^\d{4}-[0-1]?\d{1}-[0-3]?\d{1}$/;
    return reg.test(str);
}
function stringToDate(sDate, bIgnore) {
    var bValidDate, year, month, day;
    var iaDate = new Array(3);
    if (bIgnore)
        bValidDate = true
    else
        bValidDate = isDateString(sDate);
    if (bValidDate) {
        iaDate = sDate.toString().split("-");
        year = parseFloat(iaDate[0]);
        month = parseFloat(iaDate[1]) - 1;
        day = parseFloat(iaDate[2]);
        return (new Date(year, month, day));
    }
    else
        return (new Date(1900, 1, 1));
}
function CheckDate(strDate1, strDate2) {
    return (stringToDate(strDate1, true) < stringToDate(strDate2, true));
}
function compareDate(strDate1, strDate2) {
    var tmp1 = strDate1.split('-');
    var tmp2 = strDate2.split('-');
    var date1 = eval('new Date(' + tmp1[0] + ',' + tmp1[1] + ',' + tmp1[2] + ')');
    var date2 = eval('new Date(' + tmp2[0] + ',' + tmp2[1] + ',' + tmp2[2] + ')');
    if ((date2.valueOf() - date1.valueOf()) >= 20 * 24 * 60 * 60 * 1000) {
        return true;
    }
    else {
        return false;
    } 
}
function compareDate1(strDate1, strDate2) {
    var tmp1 = strDate1.split('-');
    var tmp2 = strDate2.split('-');
    var date1 = eval('new Date(' + tmp1[0] + ',' + tmp1[1] + ',' + tmp1[2] + ')');
    var date2 = eval('new Date(' + tmp2[0] + ',' + tmp2[1] + ',' + tmp2[2] + ')');
    if ((date2.valueOf() - date1.valueOf()) >= 61 * 24 * 60 * 60 * 1000) {
        return true;
    }
    else {
        return false;
    } 
}
function getWeek(Year, Month, Day, cn) {
    var d, s, x;
    var x = new Array("星期日", "星期一", "星期二");
    var x = x.concat("星期三", "星期四", "星期五");
    var x = x.concat("星期六");
    var d = new Date();
    d.setFullYear(Year);
    d.setMonth(Month);
    d.setDate(Day);
    s = d.getDay();
    s = (cn == 1) ? x[s] : s;
    return s;
}
function getQueryString(_str) {
    var lurl = window.location.href;
    var loarr = lurl.split('&');
    if (loarr.length > 2) {
        var queryarr = loarr[1].split('|');
        for (i = 0; i < queryarr.length; i++) { } 
    }
    else {
        return null;
    } 
}
function showTitleDIV(obj) {
    alert(Event.MOUSE)
}
var xmlhttp555;
function getData555(time1, time2, hname) {
    //获取用户填写的名称
    //xmlhttp555 =new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp555 = GetXmlHttpObject(); //new XMLHttpRequest(); 
    //将对象状态与事件相关联
    xmlhttp555.onreadystatechange = statechange555;
    //加载要链接的页面
    xmlhttp555.open("POST", "/xhttp.aspx?id=job1&time1=" + escape(time1) + "&time2=" + escape(time2) + "&hname=" + escape(hname), true);
    //发送请求
    xmlhttp555.send(null);  //注意：null可不能省略，否则火狐会读不出来  
}
function getDataToSo(_jobname, _str) {
    xmlhttp555 = GetXmlHttpObject(); //new XMLHttpRequest(); 
    xmlhttp555.onreadystatechange = statechange555;
    xmlhttp555.open("POST", "/xhttp.aspx?id=" + _jobname + "&kw=" + escape(_str), true);
    xmlhttp555.send(null);  //注意：null可不能省略，否则火狐会读不出来  
}
function statechange555() {
    //判断异步调用是否已经完成
    if (xmlhttp555.readystate == 4) {
        //判断完成的提示代码是否是OK状态
        if (xmlhttp555.status == 200) {
            //将返回数据作为参数，传递给填充方法
            //alert(xmlhttp.responseText);
            var bk = xmlhttp555.responseText;
        }
    }
}

function GetXmlHttpObject() {
    var xmhttp = null;
    try { xmlhttp = new XMLHttpRequest(); }
    catch (e) {
        try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
        catch (e) {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlhttp;
}

