',
f = '';
return d ? e.replace("$img", f) : f;
}
function d(a, b, c, d) {
var e = '
$flash
',
f = '';
return d ? e.replace("$flash", f) : f;
}
function e(a, b, c, d) {
var e = "adcode_" + a;
window[e] = function () {
try {
return decodeURIComponent(b);
} catch (a) {
return b;
}
}();
try {
document.domain = "pptv.com";
} catch (f) { }
return '';
}
function no_iframe(a, b, c, d) {
var e = "adcode_" + a;
window[e] = function () {
try {
return decodeURIComponent(b);
} catch (a) {
return b;
}
}();
try {
document.domain = "pptv.com";
} catch (f) { }
var adCode = "afp_" + a;
var adContainer = document.getElementById(adCode);
var html = '
' +b+ '
';
setHTML(adContainer ,html,true);
}
// o: container to set the innerHTML
// html: html text to set.
// clear: if true, the container is cleared first (children removed)
function setHTML(o, html, clear) {
if (clear) o.innerHTML = "";
// Generate a parseable object with the html:
var dv = document.createElement("div");
dv.innerHTML = html;
// Handle edge case where innerHTML contains no tags, just text:
if (dv.children.length===0){ o.innerHTML = html; return; }
for (var i = 0; i < dv.children.length; i++) {
var c = dv.children[i];
// n: new node with the same type as c
var n = document.createElement(c.nodeName);
// copy all attributes from c to n
for (var j = 0; j < c.attributes.length; j++)
n.setAttribute(c.attributes[j].nodeName, c.attributes[j].nodeValue);
// If current node is a leaf, just copy the appropriate property (text or innerHTML)
if (c.children.length == 0)
{
switch (c.nodeName)
{
case "SCRIPT":
if (c.text) n.text = c.text;
break;
default:
if (c.innerHTML) n.innerHTML = c.innerHTML;
break;
}
}
// If current node has sub nodes, call itself recursively:
else setHTML(n, c.innerHTML, false);
o.appendChild(n);
}
}
function set360Adv(a, showid, w, num) {
var bannerScript = document.createElement("script"),
img = document.createElement("img");
bannerScript.type = "text/javascript";
bannerScript.src = "//static.mediav.com/js/mvf_pm_slider.js";
img.src = "//sr4.pplive.cn/cms/21/14/6223fc49e3dc08a3cf4a9ab62b6315b2.png";
img.className = 'jiaobiao';
img.style.position = 'absolute';
img.style.left = 0;
img.style.bottom = 0;
img.style.width = '25px';
img.style.height = '15px';
img.style.zIndex = 1;
document.getElementsByTagName('head')[0].appendChild(bannerScript);
bannerScript.onload = bannerScript.onreadystatechange = function () {
if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete') {
BANNER_SLIDER({ "w": w, "showid": showid, "rshowid": showid, "inject": "inlay", "layout": "magicCubeScene", "style": "magicCube", "row": "1", "line": num, "placeholderId": "afp_" + a.posid });
document.getElementById("afp_" + a.posid).appendChild(img);
}
};
}
a.cfg = {};
var f = document,
g = (f.body, f.getElementById("afp_" + a.posid));
if (g && a && a.material && a.material[0]) {
var h = a.material[0],
i = /\.(?:gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG)/,
j = /\.(?:swf|SWF)/,
k = "";
if (a.extendedfield && a.extendedfield.js == 1) {// 360广告投放
var showid = 'Vc7zTx',
w = 700,
num = 8;
if (a.posid == 202514) {
showid = 'hgTEI9';
w = 310;
num = 1;
} else {
g.style.padding = '1px 0';
}
set360Adv(a, showid, w, num);
} else {
if (h.src && i.test(h.src)) {
k = c(h.src, h.w, h.h, h.ln);
} else {
if (h.src && j.test(h.src)) {
k = d(h.src, h.w, h.h, h.ln);
} else {
if (!h.src && h.text) {
if ("JS" == h.type) {
//是否需要在iframe中
if(h.isNeedIframe == 1 || h.isNeedIframe == ''){
k = e(a.posid, h.text, '100%', h.h);
}else{
k = no_iframe(a.posid, h.text, '100%', h.h);
}
} else {
h.type.indexOf("TEXTLINK") > -1 && (k = b(h.text, h.ln, h.tcol, h.tsize));
}
}
}
}
}
if (k) {
g.innerHTML = k;
}
var isStat = true;
g.style.display = "block";
if(isStat){a && a.stat && util.sendMonitor(a.stat);isStat=false;}
g.onclick = function () {
a.monitor && a.monitor.click && util.sendMonitor(a.monitor.click);
};
a.cfg && a.cfg.reflash && setTimeout(function () {
a._util.getdata(a._util.setPars(a.posid));
}, 1e3 * a.cfg.reflash);
if (a.posid && 201760 == a.posid) {
var l = "sp_callback_201760",
m = "";
"undefined" != typeof window[l] && window[l](m);
}
}
};var tpl = { '256720':function(d){ template(d);},'200116':function(d){ (function (d) {
/**
* 拉幕广告
* 页面加载swf box并把连接、宽、高等flash传递过去,由这个swf去load素材并发送统计
* 拉幕有两种:一种有初始高度的(h0),一种只有一个高度
* 展现、关闭逻辑:由素材内部控制调用loaded、ended、closed
*/
//配置参数 - reflash
d.cfg = {reflash:100};
window.curtainFinished = false;
var isIpad = util.isIpad();
var max = !!d.extendedfield ? (d.extendedfield.count ? d.extendedfield.count : 1000) : 10000; //显示次数
var times = parseInt(util.get(ck), 10) || 0; //已经显示次数
if(!d || !d.material || !d.material[0]){
window.curtainFinished = true;
return;
}
var simpleGet = function(url) {
var img = document.createElement('img');
img.style.width = 0;
img.style.height = 0;
img.src = url;
document.body.appendChild(img);
};
d.stat && simpleGet(d.stat);
d.monitor.start && simpleGet(d.monitor.start);
d.monitorStart = false;
//数据无关部分
var id = d.posid;
var mt = [], box = document.getElementById("afp_" + d.posid);
var boxP = box.parentElement;
var vslide = document.getElementById("index-slider");
var duration = d.extendedfield?d.extendedfield.timelength:null;
duration = duration?duration:15;
mt[0] = d.material[0]; //去掉宽窄屏
mt[1] = d.material[1];
if (boxP.children.length > 1)
boxP = box;
if(!box) return;
var nBox=null,nBox2=null,nBox3=null,nBox4=null;
if(id == 200311||id==201756||id == 200414||id==201758||id == 226012||id == 201313||id == 201738||id==201739){
box.style.marginTop=0;
var nextN=box.parentNode.parentNode.nextSibling;
while(nextN.nodeType!==1){
nextN=nextN.nextSibling;
}
var boxes=nextN.getElementsByTagName('*');
for (var i = 0; i < boxes.length; i++) {
if((boxes[i].className==='mod sp')&&!(max && times >= max && max > -1)){
boxes[i].style.marginTop=0;
nBox=boxes[i];
}else if(!(max && times >= max && max > -1)) {
boxes[i].style.marginTop=0;
nBox3=boxes[i];
}
}
}else if(id==270012){
var all=document.getElementsByTagName('*');
for(var i=0,len=all.length;i 1)?encodeURIComponent(link):link,
flvars = 'clickthrough='+ encodeURIComponent(d.monitor.click) +'&link=' + link + '&src=' + mtsrc + '&flv='+ mtflv +'&dur='+ duration +'&w=' + w + '&h=' + h + '&host=' + ('expand_flash_loaded_' + id + '|expand_flash_ended_' + id + '|expand_flash_closed_' + id);
if(window.plt == 'web' || window.clientCommon && !(window.clientCommon.isClient())){
flag = false;
}
if((max && times >= max && max > -1) || (getFlashExtendCount() >= 1) || (maxClosedVideoCount && videoShowTimes >= maxClosedVideoCount)) { //用户手动关闭过
window.curtainFinished = true;
return;
}
box.style.width = w + 'px';
box.style.height = h0 + 'px';
box.style.overflow = 'hidden';
//box.style.position = 'absolute';
if (window.plt === 'clt' || (window.clientCommon && window.clientCommon.isClient()))
{
boxP.style.top = (id === 201763)?'43px':'0.5px';
}
else
{
boxP.style.top = (id === 200775)?'93px':'60px';
}
boxP.style.position ="absolute";
setEleTopIndex(boxP);
boxP.style.left = '50%';
boxP.style.marginLeft = (-w/2)+'px';
box.innerHTML = makeFlashHtml(player, w, h, link, flvars);
box.style.display = "block";
//##############################################
function animate(target){
var s = setInterval(function(){
current = current + (target - current) / 2;
box.style.height = Math.round(current) + 'px';
if(Math.abs(current - target) < 0.1){
clearInterval(s);
return;
}
if(current < 1){
box.innerHTML = '';
box.style.marginBottom = '0';
}
//客户端托盘
if (flag && (typeof thisMovie("flash_" + id).isTraied == 'function')) {
flag = false;
thisMovie("flash_" + id).isTraied(!isPPTVVisible());
}
}, 80);
}
function thisMovie(id) {
return document[id] ? document[id] : window[id] ? (window[id][0] || window[id]) : document.getElementById(id);
}
function makeFlashHtml(src, w, h, link, vars, closebtn){
var closeHtml = '';
var click = '
$flash$$close$
';
click = closebtn ? click.replace('$close$', closeHtml) : click.replace('$close$', '');
var flashHtml = [''
].join('');
return flashHtml;
}
window['expand_flash_loaded_' + id] = function(){
var icons = 0;
if(!window['lock_' + id]){
window.curtainFinished=false;
setTimeout(function() {
animate(h);
}, 1000);
util.set(ck, ++times, 1);
//内部素材监测,未来用
//thisMovie("flash_" + id).extension(mt[0]&&mt[0].monitor);
thisMovie("flash_" + id).extension(d&&d.monitor);
//内部素材监测,未来用
//util.sendMonitor(mt[0]&&mt[0].monitor&&mt[0].monitor.start);
util.sendMonitor(d&&d.monitor&&d.monitor.start);
}
window['lock_' + id] = true;
};
window['expand_flash_ended_' + id] = function(){
window['lock_' + id] = false;
window.curtainFinished = true;
if (h0 === 0||!d.extendedfield||!d.extendedfield.inith) {
box.innerHTML = '';
box.style.display = 'none';
nBox&&(nBox.style.marginTop="10px");
nBox2&&(nBox2.style.marginBottom="10px");
nBox3&&(nBox3.style.marginTop="10px");
nBox4&&(nBox4.style.marginTop="10px");
return;
}
setTimeout(function() {
animate(h0);
}, 50);
};
var adIsClosed = false;
window['expand_flash_closed_' + id] = function(e){
if(adIsClosed){
return;
}
util.set(maxvideocount, ++videoShowTimes, 1);
window.curtainFinished = true;
box.style.height = '0';
box.style.marginBottom = '0';
box.style.display = 'none';
nBox&&(nBox.style.marginTop="10px");
nBox2&&(nBox2.style.marginBottom="10px");
nBox3&&(nBox3.style.marginTop="10px");
nBox4&&(nBox4.style.marginTop="10px");
if(util&&util.isClient&&e===1){
Flash_extend_inc();
}
setTimeout(function() {
box.innerHTML = '';
}, 50);
adIsClosed = true;
};
//一分钟后关闭广告,以防止flash出错而导致广告无法关闭
setTimeout(function() {
if(adIsClosed){
return;
}
window['expand_flash_closed_'+id].call(window, 0);
}, 60*1000)
//请求客户端接口
window.isPPTVVisible = isPPTVVisible;
function isPPTVVisible() {
try{
if (!window.external || !window.external.GetObject) {
return;
}
var uiMainWindow = external.GetObject("@pplive.com/ui/mainwindow;1");
return uiMainWindow.visible;
}catch(e){
_util.log(e, 'isPPTVVisible');
}
}
function Flash_extend_inc() {
try{
if (!window.external || !window.external.GetObject) {
return;
}
var uiMainWindow = external.GetObject("@pplive.com/ui/mainwindow;1");
if (!uiMainWindow) {
return;
}
uiMainWindow['flash_extend-' + d.posid] = (uiMainWindow['flash_extend-' + d.posid] ? uiMainWindow['flash_extend-' + d.posid] : 0) + 1;
}catch(e){
_util.log(e, 'Flash_extend_inc');
}
}
function getFlashExtendCount() {
try{
if (!window.external || !window.external.GetObject) {
return 0;
}
var uiMainWindow = external.GetObject("@pplive.com/ui/mainwindow;1");
if (!uiMainWindow) {
return 0;
}
return uiMainWindow['flash_extend-' + d.posid] ? uiMainWindow['flash_extend-' + d.posid] : 0;
}catch(e){
_util.log(e, 'getFlashExtendCount');
}
}
function setEleTopIndex(ele)
{
var sele = ele;
if (ele.nodeType !== 1)
return;
var maxidx = 0,largest = 0;
while(sele)
{
if (sele.tagName === "BODY" || sele.className === "wp-main")
break;
var pele = sele.parentElement;
var child = pele?pele.children:null;
if(child)
{
maxidx = 0;
for(var i=0;i maxidx)
maxidx = idx;
}
sele.style.zIndex = maxidx + 1;
if (largest < maxidx)
largest = maxidx;
}
sele = pele;
}
ele.style.zIndex = largest + 1;
}
function getZIndex(e){
var z = null;
if (document.defaultView && document.defaultView.getComputedStyle)
z = document.defaultView.getComputedStyle(e).getPropertyValue('z-index');
else
z = e.currentStyle.zIndex;
if (isNaN(z)) return 0;
return z;
}
})(d);},'200108':function(d){ var cfg = {}; !
function() {
function a(a) {
var b, c, d, e = navigator.platform,
f = navigator.userAgent,
g = "pc",
h = "win";
for ( - 1 != e.indexOf("Win") ? -1 != e.indexOf("Windows Phone") && (g = "phone") : null != e.match(/Mac|iPhone|iPod|iPad/i) ? (null != e.match(/iPhone|iPod/i) ? g = "phone": -1 != e.indexOf("iPad") && (g = "pad"), h = "ios") : null != e.match(/Linux/i) && null != f.match(/android|Silk/i) && (g = null != f.match(/mobile/i) ? "phone": "pad", h = "android"), c = 0, d = a.length; d > c; c++) if (b = a[c].type.split("_"), b[0] == g && b[1] == h) return c
}
function b(a, b, c, d) {
var e = '';
return d ? w.replace("$link", d).replace("$innerHtml", e) : e
}
function c(a, b, c, d) {
var e = '';
return d ? '' + e: e
}
function e(a, b, c, d) {
var e = "adcode_" + a;
window[e] = decodeURIComponent(b);
try {
document.domain = "pptv.com"
} catch(f) {}
return ''
}
function no_iframe(a, b, c, d) {
var e = "adcode_" + a;
window[e] = decodeURIComponent(b);
try {
document.domain = "pptv.com"
} catch(f) {}
var adCode = "afp_" + a;
var adContainer = document.getElementById(adCode);
var html = '
' + b + '
';
setHTML(adContainer, html, true);
}
// o: container to set the innerHTML
// html: html text to set.
// clear: if true, the container is cleared first (children removed)
function setHTML(o, html, clear) {
if (clear) o.innerHTML = "";
// Generate a parseable object with the html:
var dv = document.createElement("div");
dv.innerHTML = html;
// Handle edge case where innerHTML contains no tags, just text:
if (dv.children.length === 0) {
o.innerHTML = html;
return;
}
for (var i = 0; i < dv.children.length; i++) {
var c = dv.children[i];
// n: new node with the same type as c
var n = document.createElement(c.nodeName);
// copy all attributes from c to n
for (var j = 0; j < c.attributes.length; j++) n.setAttribute(c.attributes[j].nodeName, c.attributes[j].nodeValue);
// If current node is a leaf, just copy the appropriate property (text or innerHTML)
if (c.children.length == 0) {
switch (c.nodeName) {
case "SCRIPT":
if (c.text) n.text = c.text;
break;
default:
if (c.innerHTML) n.innerHTML = c.innerHTML;
break;
}
}
// If current node has sub nodes, call itself recursively:
else setHTML(n, c.innerHTML, false);
o.appendChild(n);
}
}
function f() {
return "js" == n.split("_")[2] || m && !l ? e(i, m, j, k) : l.indexOf(".swf") > -1 ? c(l, j, k, o) : b(l, j, k, o)
}
function g() {
var a = t.documentElement,
b = a.scrollTop || t.body.scrollTop,
c = a.clientHeight,
d = u.offsetHeight,
e = c - d,
f = e + b;
u.style.top = f + "px"
}
if (d && d.material && d.material[0]) {
d.monitorStart = !1;
var h = a(d.material);
if (d.material[h]) {
var i = d.posid,
j = d.material[h].w,
k = d.material[h].h,
l = d.material[h].src,
m = d.material[h].text,
n = d.material[h].type,
o = d.material[h].ln,
p = -1,
q = 3600,
r = 180,
s = 0,
t = document,
isNeedIframe = d.material[h].isNeedIframe,
u = t.getElementById("afp_" + i);
if (isNeedIframe == 0 && "js" == n.split("_")[2]) {
no_iframe(i, m, j, k);
}else{
if (u) {
var v, w = '$innerHtml',
x = "pp_jumpad_" + i,
y = 0,
z = "pp_ad_" + i,
A = {
set: function(a, b) {
var c = arguments,
d = arguments.length,
e = d > 2 ? c[2] : null,
f = d > 3 ? c[3] : "/",
g = d > 4 ? c[4] : null,
h = d > 5 ? c[5] : !1;
document.cookie = a + "=" + escape(b) + (null == e ? "": "; expires=" + e.toGMTString()) + (null == f ? "": "; path=" + f) + (null == g ? "": "; domain=" + g) + (1 == h ? "; secure": "")
},
getCookieVal: function(a) {
var b = document.cookie.indexOf(";", a);
return - 1 == b && (b = document.cookie.length),
unescape(document.cookie.substring(a, b))
},
get: function(a) {
for (var b = a + "=",
c = b.length,
d = document.cookie.length,
e = 0,
f = 0; d > e;) {
if (f = e + c, document.cookie.substring(e, f) == b) return this.getCookieVal(f);
if (e = document.cookie.indexOf(" ", e) + 1, 0 == e) break
}
return null
}
};
if (null != A.get(x) && (y = parseInt(A.get(x), 10), isNaN(y) && (y = 0)), null != A.get(z) && (v = A.get(z)), !(y >= p && p > -1 || v && parseInt(v) + 1e3 * r >= +new Date)) {
y++;
var B = new Date((new Date).getTime() + 864e5);
A.set(x, y, B),
A.set(z, +new Date, B);
var C = (t.body, +new Date),
D = "closead_jumpad_" + C,
E = "display:block;position:fixed;z-index:3000;width:" + j + "px;height:" + (k + s) + "px;bottom:0;right:0;overflow: visible;";
window[D] = function() {
u.style.display = "none",
u.innerHTML = ""
};
var F = '
',
G = '
';
if (u.style.cssText = E, u.innerHTML = F + f() + G, window.XMLHttpRequest || (u.style.position = "absolute", window.attachEvent("onscroll", g)), q && setTimeout(window[D], 1e3 * q), util.sendMonitor(d && d.monitor && d.monitor.start), d && d.monitor && d.monitor.click) {
var H = util.$("#rightBottomAd");
H && H[0] && (H[0].onclick = function() {
util.sendMonitor(d.monitor.click)
})
}
}
}
}
}
}
} (d);},'200115':function(d){ var cfg = {}; !
function(a) {
var PCCrazyAdWidth,Joriginal ;
//console.log(a);
function b(a) {
return document[a] ? document[a] : window[a] ? window[a][0] || window[a] : document.getElementById(a)
}
function c(a, b, c, d, e) {
var f = "";
return a && B.test(a) ? f = h(a, b, c, d, e) : a && C.test(a) && (f = k(a, b, c, d, e)),
f
}
function getClass( cName,obj ){
obj = obj || document;
if( obj.getElementsByClassName ){
return obj.getElementsByClassName(cName);
}
var all = obj.getElementsByTagName('*');
var arrClass = [];
for(var i=0;i$img$$close$$discount$",
g = '
",
h = '';
hBig = '';
g = e ? g.replace("$close$", F) : g.replace("$close$", "");
var i = '距广告结束还有秒';
return g = e ? g.replace(/\$discount\$/,
function() {
return i
}) : g.replace(/\$discount\$/,
function() {
return ""
}),
//d ? g.replace("$img$", h) : h
d == "javascript:void(0);" ? h : g.replace("$img$", hBig)
//g.replace("$img$", hBig)
}
function i(a) {
return function() {
return a--
}
}
function j() {
var a = i(o),
b = a(),
c = document.getElementById("timecut_" + q);
c && b > 0 && (c.innerHTML = b);
var d = setInterval(function() {
return b = a(),
c && -1 !== b ? void(c.innerHTML = b) : void clearInterval(d)
},
1e3)
}
function k(a, b, c, d, e, f, small) {
var small = (small=="smallFlash") ? 0 : (Joriginal-b)/2;
//var g = '
$flash$$discount$$close$
';
var g = '$flash$$discount$$close$';
g = e ? g.replace("$close$", F) : g.replace("$close$", "");
var h = '距广告结束还有秒';
g = e ? g.replace(/\$discount\$/,
function() {
return h
}) : g.replace(/\$discount\$/, "");
var i = f ? f: q,
j = '';
return d ? g.replace("$flash$", j) : j
}
function l(a) {
var b;
if (null === a.parentNode || "none" == a.style.display) return ! 1;
if (a.getBoundingClientRect) {
b = a.getBoundingClientRect();
var c = a.ownerDocument,
d = c.body,
e = c.documentElement,
f = e.clientTop || d.clientTop || 0,
g = e.clientLeft || d.clientLeft || 0,
h = Math.max(document.documentElement.scrollTop, document.body.scrollTop),
i = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),
j = b.left + i - g,
k = b.top + h - f;
return {
x: j,
y: k,
left: j,
top: k
}
}
if (document.getBoxObjectFor) {
b = document.getBoxObjectFor(a);
var l = a.style.borderLeftWidth ? parseInt(a.style.borderLeftWidth) : 0,
m = a.style.borderTopWidth ? parseInt(a.style.borderTopWidth) : 0;
pos = [b.x - l, b.y - m]
} else {
if (pos = [a.offsetLeft, a.offsetTop], parent = a.offsetParent, parent != a) for (; parent;) pos[0] += parent.offsetLeft,
pos[1] += parent.offsetTop,
parent = parent.offsetParent;
"absolute" == a.style.position && (pos[0] -= document.body.offsetLeft, pos[1] -= document.body.offsetTop)
}
for (parent = a.parentNode ? a.parentNode: null; parent && "BODY" != parent.tagName && "HTML" != parent.tagName;) pos[0] -= parent.scrollLeft,
pos[1] -= parent.scrollTop,
parent = parent.parentNode ? parent.parentNode: null;
return {
x: pos[0],
y: pos[1],
left: pos[0],
top: pos[1]
}
}
function m(a, b) {
var c = document.getElementById(b);
if (c) return l(c)
}
function n(a, b, c) {
function d(a) {
for (var b = a.offsetLeft,
c = a.offsetParent; null !== c;) b += c.offsetLeft,
c = c.offsetParent;
return b
}
function e(a) {
for (var b = a.offsetTop,
c = a.offsetParent; null !== c;) b += c.offsetTop,
c = c.offsetParent;
return b
}
function f(a, b, c, d) {
a && (d ? a[b] = c: a.style[b] = c)
}
if (a && b) {
var g, c = c || 200,
h = a.getElementsByTagName("object")[0],
i = a.getElementsByTagName("a")[0];
h && (g = h.getElementsByTagName("embed")[0]);
var j = {},
k = {},
l = {},
m = {},
n = {};
j.at = a.offsetLeft,
j.to = d(b),
k.at = a.offsetTop,
k.to = e(b),
l.at = a.offsetWidth,
l.to = b.offsetWidth,
m.at = a.offsetHeight,
m.to = b.offsetHeight,
n.at = parseInt(a.style.marginLeft, 10);
var o = c / 10,
p = 0,
q = setInterval(function() {
if (p >= o) return clearInterval(q),
a.style.display = "none",
a.innerHTML = "",
void document.body.removeChild(a);
p++;
var b = l.at - (l.at - l.to) * (p / o),
c = m.at - (m.at - m.to) * (p / o),
d = k.at + (k.to - k.at) * (p / o),
e = j.at + (j.to - j.at) * (p / o),
r = 1 * ((o - p) / o),
s = 100 * ((o - p) / o),
t = n.at / 12;
f(h, "width", b + "px"),
f(h, "height", c + "px"),
f(i, "width", b + "px"),
f(i, "height", c + "px"),
g && (f(g, "width", b + "px"), f(g, "height", c + "px")),
f(a, "width", b + "px"),
f(a, "height", c + "px"),
f(a, "left", e + "px"),
f(a, "top", d + "px"),
f(a, "opacity", r),
f(a, "marginLeft", t + "px"),
f(a, "filter.alpha.opacity", s, !0)
},
20)
}
}
var o = 15, // 广告默认15秒
p = 180 / 86400,
q = a.posid,
r = !1;
//console.log(a); // 传的数据
a.extendedfield && a.extendedfield.timelength && a.extendedfield.timelength> 0 && (o = a.extendedfield.timelength); //广告默认时间现调整为15秒 , 广告数据接口中有广告时长就用接口中的时长
window.ppliveadsystem["afp" + q] = {};
var s = window.navigator.userAgent,
t = s.match(/(iPhone|iPad|iPod)/i) ? !0 : !1,
u = {
set: function(a, b, c) {
var d = encodeURIComponent(b),
e = 864e5;
if ("number" == typeof c) {
var f = c;
f = new Date,
f.setTime(f.getTime() + c * e),
c && (d += "; expires=" + f.toUTCString())
}
document.cookie = a + "=" + d
},
get: function(a) {
var b = document.cookie.match(new RegExp("(^| )" + a + "=([^;]*)(;|$)"));
return null !== b ? decodeURIComponent(b[2]) : null
}
};
if (!t && a && a && a.material && a.material[0]) {
var v = "pp_flash_" + q
//Start...
u.set(v, '', p)
//End...
w = [{},
{}],
x = document.getElementById("afp_" + q);
if (x) {
for (var y, z, A = "closead_" + q,
B = /\.(?:gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG)/,
C = /\.(?:swf|SWF)/,
D = a.material.length - 1; D >= 0; D--) a.material[D].type.indexOf("Crazy button") > -1 ? w[1] = a.material[D] : a.material[D].type.indexOf("CRAZY-NEW") > -1 && (w[0] = a.material[D]);
var E, F = '',
G = w[0].ln,
H = w[0].src,
I = w[1].src,
//J = w[0].w,
//J 改为自适应高度
Joriginal = w[0].w, //原始高度
PCCrazyAdWidth = Joriginal,
windowW = document.documentElement.clientWidth,
J = Math.max(Math.min(windowW, w[0].w),990),
K = w[1].w,
L = w[0].h,
M = w[1].h;
// 打印 自适应宽度
//console.log('自适应宽度为:',K)
window[A] = function() {
e(q)
},
window.ppliveadsystem.afp200115._crazy_ad_hide = function() {
n(f(q), x, 0),
b("flash_200116") && b("flash_200116").isTraied && b("flash_200116").isTraied(!0)
},
window.ppliveadsystem.afp200115._crazy_ad_show = function() {
b("flash_200116") && b("flash_200116").isTraied && b("flash_200116").isTraied(!1)
},
I && K && M ? (x.innerHTML = c(I, K, M, "javascript:void(0);", !1) + '
", x.style.overflow = "visible", window.XMLHttpRequest || (x.style.right = "-90px"), x.onmouseover = function() {
if (E = g("flash_temp_" + q), E && !r) try {
E.swfstart()
} catch(a) {}
z = setTimeout(function() {
clearTimeout(z),
d(q)
},
3e3)
},
x.onmouseout = function() {
E = g("flash_temp_" + q);
try {
E.swfstop()
} catch(a) {}
z && clearTimeout(z)
},
x.onclick = function() {
d(q);
try {
E.swfstop()
} catch(a) {}
return ! 1
},
util.sendMonitor(a && a.monitor && a.monitor.start)) : x = x.parentNode;
var N = u.get(v) ? !1 : !0,
O = setInterval(function() {
if (void 0 === window.curtainFinished || window.curtainFinished) {
clearInterval(O);
var a = window.ppliveadsystem && window.ppliveadsystem.afp200131 && window.ppliveadsystem.afp200131.isPlay;
I && !a && (x.style.display = "block"),
N && (a ? x.style.display = "none": d(q))
}
},
500);
a.monitorStart = !1
}
}
} (d);},'200145':function(d){ ! function(d) {
function cl(t) {
for (var i = t.split("|") || [], e = new Image, a = 0, n = i.length; n > a; a++) i[a].indexOf("http://") > -1 && (e.src = i[a] + "?rnd=" + (new Date).valueOf())
}
function SetBan(t, i) {
function e() {
var t;
if (2 == h) {
if (0 > v - n)
for (t = v + 1; u > t; t++)
if (map[t] == map[v]) {
v = t;
break
}
} else if (1 == h && v + 2 * n > u - 1)
for (t = 0; u > t; t++)
if (map[t] == map[v]) {
v = t;
break
}
}
function a() {
window.AniModule.stop(t[0]), _ads.each(l, function(t, i, e) {
window.AniModule.stop(t)
}), _ads.each(g, function(t, i, e) {
window.AniModule.stop(t)
}), e(), _ads.setStyle(t[0], "left", -v * o + "px"), 2 == h ? (window.AniModule.animation(t[0], {
left: "+=" + n * o + "px"
}, {
speed: i
}), v -= n) : 1 == h && (window.AniModule.animation(t[0], {
left: "-=" + n * o + "px"
}, {
speed: i
}), v += n)
}
var n = maps[page_body_class][0] || 6,
o = maps[page_body_class][1] || 180,
r = 0,
l = util.$(".b-slider li");
map = [];
var s = l.length;
if (this.setPageSize = function(t, i) {
n = t, o = i, r = n - 4
}, s) {
for (var m = this.needClone(6, s), d = 0; s > d; d++) map[d] = d;
if (m > 0) {
var c = [];
for (d = 0; s > d; d++) c[d] = l[d].cloneNode(!0);
for (var p = 0; m > p; p++) {
var f = p % s;
map[p + s] = f, t[0].getElementsByTagName("ul")[0].appendChild(c[f].cloneNode(!0))
}
}
l = util.$(".b-slider li");
var g = util.$(".b-slider li img");
_ads.setStyle(t[0], "left", 0);
var u = 0 === m ? s : s + m,
v = 0,
h = 1;
document.getElementById("btnL").onclick = function() {
h = 2, a()
}, document.getElementById("btnR").onclick = function() {
h = 1, a()
}, window.$ && (function(t) {
var i = t("#afp_" + id),
e = i.find(".banner"),
a = 0,
n = null;
i.find(".b-slider li").on("click", function(i) {
var e = t(this).attr("data-monitor-click");
util.sendMonitor(e)
}), i.on("mouseenter", "img", function(o) {
var r = t(this),
l = "",
s = "",
m = r.position(),
d = i.width(),
c = "";
l = r.attr("data-bigImg"), s = r.parent().attr("href"), c = r.parent().parent().attr("data-monitor-click"), a = m.left, a >= d && (a %= d), n && clearTimeout(n), l && (e.find("img").attr("src", l).parent().attr("data-monitor-click", c).attr("href", s), e.css({
left: a
}), e.show().animate({
left: 0,
opacity: 1,
width: 1080
}, 600))
}).on("mouseleave", "img", function() {
n = setTimeout(function() {
e.animate({
opacity: 0,
width: 0,
left: a
}, function() {
e.hide()
})
}, 800)
}), e.find("a").on("click", function() {
var i = t(this).attr("data-monitor-click");
util.sendMonitor(i)
})
})($)
}
}
function getEventTarget(t) {
return t = t || window.event, t.target || t.srcElement
}
var id = d.posid || d[0].posid,
box = document.getElementById("afp_" + id);
if (box && d) {
var page_body_class = window.page_body_class || "grid-1230",
maps = {
"grid-1010": [4, 170],
"grid-1230": [5, 180],
"grid-1410": [6, 180]
},
mapConfig = box.getAttribute("data-config");
mapConfig && (mapConfig = eval("(" + mapConfig + ")"), maps = mapConfig);
var html = '
';
html += '', html += '', html += '
', html += '
';
for (var i = 0, len = d.length; len > i; i++) {
for (var temp = d[i], sImgSrc, bImgSrc, ln, j = 0, c = temp.material.length; c > j; j++) "触发Banner小图-new" === temp.material[j].type ? (sImgSrc = temp.material[j].src, ln = temp.material[j].ln) : "触发Banner大图-new" === temp.material[j].type && (bImgSrc = temp.material[j].src);
html += '