function ezshopad(positionid) {
this.id = positionid;
this.adid = 0;
this.adtype = "";
this.adname = "";
this.adcontent = "";
this.paddingleft = 0;
this.paddingtop = 0;
this.width = 0;
this.height = 0;
this.ishitcount = "n";
this.uploadfilepath = "";
this.step = 1;
this.delay = 20;
this.windowheight = 0;
this.windowwidth = 0;
this.yon = 0;
this.xon = 0;
this.pause = true;
this.interval = null;
this.url = "";
this.siteid = 0;
this.showad = showadcontent;
this.start = dostart;
}
function showadcontent() {
var content = this.adcontent;
var str = "
";
var ad = eval('(' + content + ')');
if (this.adtype == "image") {
str += "
";
str += "";
str += "";
} else if (this.adtype == "flash") {
document.write(" ");//至少要输出一个字,不然ie不显示
str += "
";
}
str += "
";
str += "
";
document.write(str);
}
function changepos(float) {
float.windowwidth = document.documentelement.clientwidth;
float.windowheight = document.documentelement.clientheight;
document.getelementbyid("zcmsad_" + float.adid).style.left = (float.paddingleft + document.documentelement.scrollleft) + "px";
document.getelementbyid("zcmsad_" + float.adid).style.top = (float.paddingtop + document.documentelement.scrolltop) + "px";
if (float.yon) {
float.paddingtop = float.paddingtop + float.step;
} else {
float.paddingtop = float.paddingtop - float.step;
}
if (float.paddingtop < 0) {
float.yon = 1;
float.paddingtop = 0;
}
if (float.paddingtop >= (float.windowheight - float.height)) {
float.yon = 0; float.paddingtop = (float.windowheight - float.height);
}
if (float.xon) {
float.paddingleft = float.paddingleft + float.step;
} else {
float.paddingleft = float.paddingleft - float.step;
}
if (float.paddingleft < 0) {
float.xon = 1;
float.paddingleft = 0;
}
if (float.paddingleft >= (float.windowwidth - float.width)) {
float.xon = 0;
float.paddingleft = (float.windowwidth - float.width);
}
}
function dostart(float) {
return function() {
changepos(float);
}
}
function cmsad_1_pause_resume() {
if (ezshopad_1.pause) {
clearinterval(ezshopad_1.interval);
ezshopad_1.pause = false;
} else {
ezshopad_1.interval = setinterval(ezshopad_1.start(ezshopad_1), ezshopad_1.delay);
ezshopad_1.pause = true;
}
}
var ezshopad_1 = new ezshopad('ezshopad_1');
ezshopad_1.adid = 1;
ezshopad_1.adtype = "image";
ezshopad_1.adname = "2022年中国公平竞争政策宣传周";
ezshopad_1.adcontent = "{'images':[{'imgadlinkurl':'https://www.samr.gov.cn/zt/jzz/','imgadalt':'2022年中国公平竞争政策宣传周','imgpath':'202105140315515668.jpg'}],'imgadlinktarget':'new','count':'0','showalt':'y'}";
ezshopad_1.url = "adclick.aspx";
ezshopad_1.siteid = 206;
ezshopad_1.paddingleft = 0;
ezshopad_1.paddingtop = 0;
ezshopad_1.width = 400;
ezshopad_1.height = 150;
ezshopad_1.uploadfilepath = "/uploadfiles/";
ezshopad_1.showad();
document.getelementbyid('zcmsad_1').visibility = 'visible';
ezshopad_1.interval = setinterval(ezshopad_1.start(ezshopad_1), ezshopad_1.delay);