﻿window.size = function() {
    var w = 0;
    var h = 0;
    //IE
    if (!window.innerWidth) {
        //strict mode
        if (!(document.documentElement.clientWidth == 0)) {
            w = document.documentElement.clientWidth;
            h = document.documentElement.clientHeight;
        }
        //quirks mode
        else {
            w = document.body.clientWidth;
            h = document.body.clientHeight;
        }
    }
    //w3c
    else {
        w = window.innerWidth;
        h = window.innerHeight;
    }
    return { width: w, height: h };
}
window.center = function() {
    var hWnd = (arguments[0] != null) ? arguments[0] : { width: 0, height: 0 };
    var _x = 0;
    var _y = 0;
    var offsetX = 0;
    var offsetY = 0;
    //IE
    if (!window.pageYOffset) {
        //strict mode
        if (!(document.documentElement.scrollTop == 0)) {
            offsetY = document.documentElement.scrollTop;
            offsetX = document.documentElement.scrollLeft;
        }
        //quirks mode
        else {
            offsetY = document.body.scrollTop;
            offsetX = document.body.scrollLeft;
        }
    }
    //w3c
    else {
        offsetX = window.pageXOffset;
        offsetY = window.pageYOffset;
    }
    _x = ((this.size().width - hWnd.width) / 2) + offsetX;
    _y = ((this.size().height - hWnd.height) / 2) + offsetY;
    return { x: _x, y: _y };
}
function sendok4(num,rnum) {
    var point = window.center({ width: 575, height: 250 });
    var spn = document.createElement("div");
    spn.id = 'spnLoading4';
    spn.style.position = 'absolute';
    spn.style.border = '1 solid #001D39';
    spn.style.background = "#dedede";
    spn.style.position = "absolute";
    spn.style.top = point.y + "px";
    spn.style.left = point.x + "px";
    spn.style.width = "575px";
    spn.style.height = "250px";
    sHTML = '<table width=100% height=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#D6F7FF>';
    sHTML += '<tr>';
    sHTML += '<td width=41% align=center><img src=../images/show/okicon.gif width=174 height=212 /></td>';
    sHTML += '<td width=59% align=center>';
    sHTML += '<table width=95% border=0 cellpadding=5 cellspacing=0 align=center>';
    sHTML += '<tr>';
    sHTML += '<td align=left style=\"font-size:14px; line-height:250%\">';
    sHTML += '<span class=td_title1 style="color:green">' + num + '位求职者已成功添加到收藏夹。</span><br>';
    if (rnum) {
        sHTML += '<span style="color:red">有' + rnum + '位求职者由于重复收藏而被忽略。</span><br>';
    }
    sHTML += '跳转到:[ <a href=/ent/manage.aspx>企业管理中心</a> ] [ <a href=/ent/favorlist.aspx>查看收藏夹</a> ]<br>';
    sHTML += '<input type=\"button\" name=\"button\" onclick=\"closediv3()\" id=\"button\" value=\"关闭提示窗口\">';
    sHTML += '</td>';
    sHTML += '</tr>';
    sHTML += '</table>';
    spn.innerHTML = sHTML;
    document.body.appendChild(spn);
}
function closediv3() {
    document.body.removeChild(document.getElementById("spnLoading4"));
}

