本帖最后由 qq_22872345 于 2014-11-08 14:09:03 编辑

解决方案 »

  1.   


        var showEnable = true;
        function hideSwtBox() {
            $("#swtBox").hide();
            if (showEnable) { showSwtBox(); }
        }
        //关闭后弹出的时间
        function showSwtBox() {
            setTimeout(function () { $("#swtBox").show(); }, 15000);
        }
        function FloatM(json) {
            this.coords_rt = json.coords_rt || '0,0,0,0'; //右上角关闭坐标
            this.coords_inline = json.coords_inline || '0,0,0,0'; //图片中咨询坐标
            this.pictype = json.pictype || 'gif'; //图片格式
            var st = '';
            if (/MSIE [56]/g.test(navigator.appVersion) || (/MSIE [789]/g.test(navigator.appVersion) && (document.compatMode == "BackCompat")))
                st = "*position: absolute;*top: expression(eval(ch()/2+document.documentElement.scrollTop));*left: expression(eval(cw()/2+document.body.scrollLeft));";
            //普通弹出框代码
            document.write("<div id=\"swtBox\" style=\"margin-top:-120px;z-index:999;margin-left:-170px; border-collapse:collapse;box-shadow: 0 0 35px #000;background:#FFF;width:445px;height:315px;position:fixed;top:45%;left:45%;" + st + "\"><img src=\"swt." + this.pictype + "\" width=\"445\" height=\"315\" usemap=\"#tanchukuang\" border=\"0\"/><map name=\"tanchukuang\" id=\"tanchukuang\"><area shape=\"poly\" coords=\"441,292,440,25,422,26,416,10,3,9,440,293,0,293,4,11\" href=\"javascript:void(0);\" onclick=\"openZoosUrl();hideSwtBox();showEnable=false;\" target=\"_parent\"/><area shape=\"rect\" coords=\"417,-8,448,26\" href=\"javascript:void(0);\"  onclick=\"hideSwtBox();\" target=\"_parent\"/></map></div>");
        }    function cw() {
            return document.compatMode == "BackCompat" ? document.body.clientWidth : document.documentElement.clientWidth;
        }
        function ch() {
            return document.compatMode == "BackCompat" ? document.body.clientHeight : document.documentElement.clientHeight;
        }    function hideInvite() {
            $("#inviteBox").hide();
        }
        //快速邀请框商务通函数
        function LR_showInviteDiv(h1, h2) {
            showEnable = false; hideSwtBox();
            $("#inviteBox").remove();        //快速邀请框弹出框代码
            $("body").append('<div id="inviteBox" style="margin-top:-120px;z-index:999;border-collapse:collapse;box-shadow: 0 0 35px #000;background:#FFF;margin-left:-170px;width:445px;height:315px;position:fixed;top:45%;left:45%;border-radius:5px;_position: absolute;_top: expression(eval(document.documentElement.clientHeight/2+document.documentElement.scrollTop));_left: expression(eval(document.documentElement.clientWidth/2+document.documentElement.scrollLeft));"><img src="/swt/swt.gif" width="445" height="315" usemap="#yaoqing" border="0"/><map name="yaoqing" id="yaoqing"><map name="tanchukuang" id="tanchukuang"><area shape="poly" coords="441,292,440,25,422,26,416,10,3,9,440,293,0,293,4,11" href="javascript:void(0);" onclick="openZoosUrl();hideInvite();"/><area shape="rect" coords="417,-8,448,26" href="javascript:void(0);" onclick="hideInvite();LR_RefuseChat();showEnable=true;showSwtBox();" style="color:#EEEEEE;text-decoration:none;" /></map></div>');
        }
        new FloatM({ pictype: 'gif' });