var type = '0'; var targetDivId_pd = ''; var creativeUrl1 = '//g1.dfcfw.com/g4/202408/20240830151850.png'; var contentType1 = '0'; //如何给事件这里要加事件 var clicktag = '1'; var width1 = '1000'; var height1 = '450'; var top1 = '0'; var followScroll1 = '1'; var closeSeconds = '7'; var showClsbtn = '1'; var clsbtnUrl = '//g1.dfcfw.com/g4/202004/20200420170247.jpg'; var clsbtnWidth = '70'; var clsbtnHeight = '93'; var showRecycle = '1'; var creativeUrl2 = '//g1.dfcfw.com/g4/202004/20200420170257.jpg'; var contentType2 = '0'; var callback = '1'; var xalign2 = 'right'; var xpadding2 = '0'; var yalign2 = 'top'; var ypadding = '450'; var followScroll2 = '0'; var showstyle = '0'; var banneradflag = '0'; var random="14694"; type = parseInt(type); //是整形一定要转化下,防止传来的是字符串 contentType1 = parseInt(contentType1); clicktag = parseInt(clicktag); width1 = parseInt(width1); height1 = parseInt(height1); top1 = parseInt(top1); followScroll1 = parseInt(followScroll1); closeSeconds = parseInt(closeSeconds); showClsbtn = parseInt(showClsbtn); clsbtnWidth = parseInt(clsbtnWidth); clsbtnHeight = parseInt(clsbtnHeight); showRecycle = parseInt(showRecycle); contentType2 = parseInt(contentType2); callback = parseInt(callback); xpadding2 = parseInt(xpadding2); ypadding = parseInt(ypadding); followScroll2 = parseInt(followScroll2); showstyle = parseInt(showstyle); banneradflag = parseInt(banneradflag); if(contentType1){ contentType1 = 'flash' }else{ contentType1 = 'picture'; } if(followScroll1){ followScroll1 = true; }else{ followScroll1 = false; } if(showClsbtn){ showClsbtn = true; }else{ showClsbtn = false; } if(showRecycle){ showRecycle = true; }else{ showRecycle = false; } if(contentType2){ contentType2 = 'flash'; }else{ contentType2 = 'picture'; } if(showstyle){ showstyle = 'block'; alwaysShow = true; }else{ showstyle = 'none'; alwaysShow = false; } if(showClsbtn){ showClsbtn = true; }else{ showClsbtn = false; } if(!xpadding2){ xpadding2 = 0; } if(!ypadding){ ypadding = 0; } closeSeconds = closeSeconds*1000; if(type){ //动态全屏 function _as_getcv(k) { var c = document.cookie; var end = c.indexOf (k); if (end == -1) return null; var st = end+k.length+1; end = c.indexOf(";", st); if (end == -1) end = c.length; return unescape(c.substring(st, end)); } function _as_setcv(k, v, e, p, d, s) { var expdate = new Date(); var argv = _as_setcv.arguments; var argc = _as_setcv.arguments.length; var expires = (argc>2)?argv[2]:null; var path = (argc>3)?argv[3]:null; var domain = (argc>4)?argv[4]:null; var secure = (argc>5)?argv[5]:false; if(expires!=null) expdate.setTime(expdate.getTime()+(expires*1000)); var c = k+"="+escape(v)+"; "; c += ((expires==null)?"":("expires="+expdate.toGMTString()+"; ")); c += ((path==null)?"":("path="+path+"; ")); c += ((domain==null)?"":("domain="+domain+"; ")); c += ((secure==true)?"secure; ":""); document.cookie = c; } function _as_hts(n, s) { var t = _as_getcv(n); if(!t) {_as_setcv(n, "1", s);return 0;} else {return 1;} } function _AdSame_getBody() { if (document.compatMode=="CSS1Compat") { return (document.documentElement)? document.documentElement:document.body; } else { return document.body; } } function _AdSame_getBodyScrollTop() { if (self.pageYOffset) { var yScroll = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { var yScroll = document.documentElement.scrollTop; } else if (document.body) { var yScroll = document.body.scrollTop; } return yScroll; } function _AdSame_getBodyScrollLeft() { if (self.pageYOffset) { var xScroll = self.pageXOffset; } else if (document.documentElement && document.documentElement.scrollLeft) { // Explorer 6 Strict var xScroll = document.documentElement.scrollLeft; } else if (document.body) { // all other Explorers var xScroll = document.body.scrollLeft; } return xScroll; } var showed = _as_hts("_adsame_fullscreen_"+random, 3600); var clickUrl = "//same.eastmoney.com/c?z=eastmoney&la=0&si=1&cg=94&c=1303&ci=1&or=47&l=12896&bg=12896&b=14694&u=http%3A%2F%2Fjs1.eastmoney.com%2Ftg.aspx%3FID%3D5986"; var target = "[TARGET]"; var left1 = (_AdSame_getBody().clientWidth-width1)/2; var iniDisplay1 = !showed ? "block" : "none"; var id1 = "flashMainId"; if(callback==1){var width2=20;var height2=120;}else{var width2=100;var height2=200;} if(callback==1){var top2 = yalign2=="top"?ypadding:_AdSame_getBody().clientHeight-height2-82-ypadding;}else{var top2 = yalign2=="top"?ypadding:_AdSame_getBody().clientHeight-height2-15-ypadding;} var left2 = xalign2=="left"?xpadding2:_AdSame_getBody().clientWidth-width2-xpadding2; var iniDisplay2 = !showed ? showstyle : "block"; var id2 = "flashSubId"; function getContent(contentType, width, height, creativeUrl, clickUrl, target, id) { if (contentType=="flash") { var html = "
"; html += ""; html += ""; html += ""; html += ""; if(clicktag){ html += ""; } html += ""; html += ""; html += ""; if(!clicktag){ html += ""; html += "
"; html += "
"; } html += "
"; } else { var html = "
"; html += ""; html += ""; str += getContent(contentType1,width1,height1,creativeUrl1,clickUrl,target,id1); if (showClsbtn) { str += "
"; str += "
"; } if (banneradflag) str += "
"; if (showRecycle) { str += ""; } str += ""; } document.write("" +"function "+id1+"_DoFSCommand(command, args) {" +"if (command=='close') {close_all();}" +"else if (command=='replay') {show_main();}" +"else if (command=='closeBig') {close_main();}" +"}" +""); document.write("" +id1+"_DoFSCommand(command, args);" +""); document.write("" +"function "+id2+"_DoFSCommand(command, args) {" +"if (command=='close') close_all();" +"else if (command=='replay') show_main();" +"else if (command=='closeBig') close_main();" +"}" +""); document.write("" +id2+"_DoFSCommand(command, args);" +""); document.write(str); var _AdSame_divmain = document.getElementById('_AdSame_divmain'); if (showRecycle) { var _AdSame_divsub = document.getElementById('_AdSame_divsub'); } window.setInterval(function() { if (followScroll1) { _AdSame_divmain.style.top = top1+_AdSame_getBodyScrollTop()+"px"; } var left = _AdSame_getBodyScrollLeft()+(_AdSame_getBody().clientWidth-width1)/2; _AdSame_divmain.style.left = (left>0?left:0)+"px"; }, 200); if (showRecycle) { if (followScroll2) { window.setInterval(function() { if(callback==1) { _AdSame_divsub.style.top = _AdSame_getBodyScrollTop()+ _AdSame_getBody().clientHeight- height2-ypadding-82+"px"; }else { _AdSame_divsub.style.top = _AdSame_getBodyScrollTop()+ _AdSame_getBody().clientHeight- height2-ypadding-15+"px"; } _AdSame_divsub.style.marginTop ="0px"; var left = xalign2=="left"?xpadding2+_AdSame_getBodyScrollLeft():_AdSame_getBodyScrollLeft()+_AdSame_getBody().clientWidth-width2-xpadding2; _AdSame_divsub.style.left = (left>0?left:0)+"px"; }, 200); } else { window.setInterval(function() { var left = xalign2=="left"?xpadding2+_AdSame_getBodyScrollLeft():_AdSame_getBodyScrollLeft()+_AdSame_getBody().clientWidth-width2-xpadding2; _AdSame_divsub.style.left = (left>0?left:0)+"px"; }, 200); } } var autoclosehd = null; function show_main() { _AdSame_divmain.style.top = top1+_AdSame_getBodyScrollTop()+"px"; if (contentType1=="flash" && navigator.userAgent.toLowerCase().indexOf("msie")!=-1) { var flash = document.getElementById(id1); flash.gotoframe(1); flash.play(); } _AdSame_divmain.style.display="block"; if (closeSeconds>0) { window.clearTimeout(autoclosehd); autoclosehd = window.setTimeout(function () {close_main();}, closeSeconds); } if (!alwaysShow && showRecycle) _AdSame_divsub.style.display="none"; } function close_main() { _AdSame_divmain.style.display="none"; if (showRecycle) _AdSame_divsub.style.display="block"; // only for sohu if (obj) obj.s = 2; } function close_all() { _AdSame_divmain.style.display="none"; if (showRecycle) _AdSame_divsub.style.display="none"; window.clearTimeout(autoclosehd); // only for sohu if (obj) obj.s = 2; } var obj = null; function call_fc(o) { if (o) obj = o; show_main(); } function fc_main(o) { if (typeof call_fc=="function") call_fc(o); } if (typeof AddSchedule=="function") { AD = new ADM("fc", 2); AddSchedule(AD); } else { if (_AdSame_divmain) _AdSame_divmain.style.display = iniDisplay1; if (_AdSame_divsub) _AdSame_divsub.style.display = iniDisplay2; if (iniDisplay1=="block" && closeSeconds>0) { autoclosehd = window.setTimeout(function() { close_main(); }, closeSeconds); } } }else{ //全屏下推 function _as_getcv(k) { var c = document.cookie; var end = c.indexOf (k); if (end == -1) return null; var st = end+k.length+1; end = c.indexOf(";", st); if (end == -1) end = c.length; return unescape(c.substring(st, end)); } function _as_setcv(k, v, e, p, d, s) { var expdate = new Date(); var argv = _as_setcv.arguments; var argc = _as_setcv.arguments.length; var expires = (argc>2)?argv[2]:null; var path = (argc>3)?argv[3]:null; var domain = (argc>4)?argv[4]:null; var secure = (argc>5)?argv[5]:false; if(expires!=null) expdate.setTime(expdate.getTime ()+(expires*1000)); var c = k+"="+escape(v)+"; "; c += ((expires==null)?"":("expires="+expdate.toGMTString ()+"; ")); c += ((path==null)?"":("path="+path+"; ")); c += ((domain==null)?"":("domain="+domain+"; ")); c += ((secure==true)?"secure; ":""); document.cookie = c; } function _as_hts(n, s) { var t = _as_getcv(n); if(!t) {_as_setcv(n, "1", s);return 0;} else {return 1;} } function _AdSame_getBody() { if (document.compatMode=="CSS1Compat") { return (document.documentElement)? document.documentElement:document.body; } else { return document.body; } } function _AdSame_getBodyScrollTop() { if (self.pageYOffset) { var yScroll = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { var yScroll = document.documentElement.scrollTop; } else if (document.body) { var yScroll = document.body.scrollTop; } return yScroll; } function _AdSame_getBodyScrollLeft() { if (self.pageYOffset) { var xScroll = self.pageXOffset; } else if (document.documentElement && document.documentElement.scrollLeft) { // Explorer 6 Strict var xScroll = document.documentElement.scrollLeft; } else if (document.body) { // all other Explorers var xScroll = document.body.scrollLeft; } return xScroll; } var showed_pd = _as_hts("_adsame_fullscreen_"+random, 3600); var clickUrl_pd = "//same.eastmoney.com/c?z=eastmoney&la=0&si=1&cg=94&c=1303&ci=1&or=47&l=12896&bg=12896&b=14694&u=http%3A%2F%2Fjs1.eastmoney.com%2Ftg.aspx%3FID%3D5986"; var target_pd = "[TARGET]"; var left1_pd = (_AdSame_getBody().clientWidth-width1)/2; var iniDisplay1_pd = !showed_pd ? "block" : "none"; var id1_pd = "flashMainId"; if(callback==1){var width2_pd=20;var height2_pd=120;}else{var width2_pd=100;var height2_pd=200;} if(callback==1){var top2_pd = yalign2=="top"? ypadding:_AdSame_getBody().clientHeight-height2_pd-82- ypadding;}else{var top2_pd = yalign2=="top"? ypadding:_AdSame_getBody().clientHeight-height2_pd-15- ypadding;} var left2_pd = xalign2=="left"? xpadding2:_AdSame_getBody().clientWidth-width2_pd-xpadding2; var iniDisplay2_pd = !showed_pd ? showstyle : "block"; var id2_pd = "flashSubId"; var isShown_pd = false; function getContent(contentType, width, height, creativeUrl, clickUrl, target, id) { if (contentType=="flash") { var html = "
"; html += ""; html += ""; html += ""; if(clicktag){ html += ""; } html += ""; html += ""; html += ""; html += ""; html += "
"; if(!clicktag){ html += "
"; html += "
"; html += "
"; } } else { var html = "
"; html += ""; html += ""; str_pd += getContent(contentType2,width2_pd,height2_pd,creativeUrl2,clickUrl_pd,target_pd,id2_pd); str_pd += "
"; if(callback==0){ str_pd += "重播 | "; str_pd += "关闭
"; } else{ str_pd += "
"; str_pd += "
"; } str_pd += ""; } document.write("" +"function "+id1_pd+"_DoFSCommand(command, args) {" +"if (command=='close') {close_all_pd();}" +"else if (command=='replay') {show_main_pd();}" +"else if (command=='closeBig') {close_main_pd();}" +"}" +""); document.write("" +id1_pd+"_DoFSCommand(command, args);" +""); document.write("" +"function "+id2_pd+"_DoFSCommand(command, args) {" +"if (command=='close') close_all_pd();" +"else if (command=='replay') show_main_pd();" +"else if (command=='closeBig') close_main_pd();" +"}" +""); document.write("" +id2_pd+"_DoFSCommand(command, args);" +""); document.write(str_pd); if (showRecycle) { var _AdSame_divsub_pd = document.getElementById('_AdSame_divsub_pd'); window.setInterval(function() { if (followScroll2) { _AdSame_divsub_pd.style.top = top2_pd+_AdSame_getBodyScrollTop()+"px"; } _AdSame_divsub_pd.style.left = xalign2=="left"?xpadding2:_AdSame_getBody().clientWidth-(callback==1?20:100)-xpadding2+"px"; }, 200); } var divobj_pd = document.createElement("DIV"); divobj_pd.style.width = width1+"px"; divobj_pd.style.height = "1px"; divobj_pd.style.marginLeft = "auto"; divobj_pd.style.marginRight = "auto"; divobj_pd.style.overflow = "hidden"; divobj_pd.style.zIndex = 65535; divobj_pd.style.position = "relative"; var str = getContent (contentType1,width1,height1,creativeUrl1,clickUrl_pd ,target_pd,id1_pd); if (banneradflag) str += ""; if (showClsbtn) { str += "
"; str += "
"; } divobj_pd.innerHTML = str; if (targetDivId_pd) { var beforeTarget_pd = document.getElementById (targetDivId_pd); } else { var beforeTarget_pd = document.body.firstChild; } beforeTarget_pd.parentNode.insertBefore(divobj_pd, beforeTarget_pd); var autoclosehd_pd = null; function show_main_pd() { if (isShown_pd) return; isShown_pd = true; divobj_pd.style.display="block"; if (!alwaysShow && showRecycle) _AdSame_divsub_pd.style.display="none"; if (contentType1=="flash" && navigator.userAgent.toLowerCase().indexOf("msie")!=-1) { var flash = document.getElementById(id1_pd); flash.gotoframe(1); flash.play(); } var count = 0; var gap = parseInt(height1/20); divobj_pd.style.height = height1+"px"; if (closeSeconds>0) { window.clearTimeout(autoclosehd_pd); autoclosehd_pd = window.setTimeout(function () {close_main_pd();}, closeSeconds); } } function close_main_pd() { if (!isShown_pd) return; isShown_pd = false; var count = 0; var gap = parseInt(height1/20); isShown_pd = false; divobj_pd.style.height = "1px"; divobj_pd.style.display="none"; if (showRecycle) _AdSame_divsub_pd.style.display="block"; } function close_all_pd() { if (showRecycle) _AdSame_divsub_pd.style.display="none"; window.clearTimeout(autoclosehd_pd); divobj_pd.style.display="none"; } function isloaded(){ var f = document.getElementById("flashMainId"); if ((!f) || typeof f.PercentLoaded=="undefined") { return false; } if (parseInt(f.PercentLoaded())==100) { return true; } } if(contentType1 == "flash"){ var max = 100, c = 0; var hd = window.setInterval(function (){ if (isloaded() || ++c>max) { window.clearInterval(hd); if (!showed_pd) { show_main_pd(); } else { divobj_pd.style.display="none"; close_main_pd(); } } }, 100); } else{ if (!showed_pd) { show_main_pd(); } else { divobj_pd.style.display="none"; close_main_pd(); } } }