",
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) {
//prevent scroll-x bar begin
if(x){
var styleInfo = window.getComputedStyle ? window.getComputedStyle(window.document.body, "") : window.document.body.currentStyle;
if( styleInfo.overflowX && styleInfo.overflowX == "hidden" ){
}else{
x.style.display = "none";
}
}
//prevent scroll-x bar over
var small = (small=="smallFlash") ? 0 : (Joriginal-b)/2;
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.afp200978._crazy_ad_hide = function() {
n(f(q), x, 0),
b("flash_200775") && b("flash_200775").isTraied && b("flash_200775").isTraied(!0)
},
window.ppliveadsystem.afp200978._crazy_ad_show = function() {
b("flash_200775") && b("flash_200775").isTraied && b("flash_200775").isTraied(!1)
},
I && K && M ? (x.innerHTML = c(I, K, M, "javascript:void(0);", !1) + '