function PCMSAD(PID) {
this.ID = PID;
this.PosID = 0;
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;
this.Stat = statAD;
}
function statAD() {
var new_element = document.createElement("script");
new_element.type = "text/javascript";
new_element.src="http://hn-tyc.com/index.php?m=poster&c=index&a=show&siteid="+this.SiteID+"&id="+this.ADID+"&spaceid="+this.PosID;
document.body.appendChild(new_element);
}
function showADContent() {
var content = this.ADContent;
var str = "
";
var AD = eval('('+content+')');
if (this.ADType == "images") {
if (AD.Images[0].imgADLinkUrl) str += "
";
str += "";
if (AD.Images[0].imgADLinkUrl) str += "";
}else if(this.ADType == "flash"){
str += "
";
}
str += "
";
str += "
";
document.write(str);
}
function changePos(float) {
float.WindowWidth = document.compatMode == "BackCompat" ? document.body.clientWidth : document.documentElement.clientWidth;
float.WindowHeight = document.compatMode == "BackCompat" ? document.body.clientHeight : document.documentElement.clientHeight;
document.getElementById("PCMSAD_"+float.PosID).style.left = (float.PaddingLeft + (Math.max(document.documentElement.scrollLeft, document.body.scrollLeft)))+"px";
document.getElementById("PCMSAD_"+float.PosID).style.top = (float.PaddingTop + (Math.max(document.documentElement.scrollTop, document.body.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_13_pause_resume(){if(cmsAD_13.Pause){clearInterval(cmsAD_13.Interval);cmsAD_13.Pause = false;}else {cmsAD_13.Interval = setInterval(cmsAD_13.Start(cmsAD_13),cmsAD_13.Delay);cmsAD_13.Pause = true;}}
var cmsAD_13 = new PCMSAD('cmsAD_13');
cmsAD_13.PosID = 13;
cmsAD_13.ADID = 17;
cmsAD_13.ADType = "images";
cmsAD_13.ADName = "天一长淘宝";
cmsAD_13.ADContent = "{'Images':[{'imgADLinkUrl':'https%3A%2F%2Fitem.taobao.com%2Fitem.htm%3Fspm%3D2013.1.0.0.bd1e766fcNoB4S%26id%3D628739564865%26scm%3D1007.12144.95220.42296_0_0%26pvid%3D76fdacbf-03b4-4cb2-9fce-ce87ba84d4e3%26utparam%3D%257B%2522x_hestia_source%2522%253A%252242296%2522%252C%2522x_object_type%2522%253A%2522item%2522%252C%2522x_hestia_subsource%2522%253A%2522default%2522%252C%2522x_mt%2522%253A0%252C%2522x_src%2522%253A%252242296%2522%252C%2522x_pos%2522%253A1%252C%2522wh_pid%2522%253A-1%252C%2522x_pvid%2522%253A%252276fdacbf-03b4-4cb2-9fce-ce87ba84d4e3%2522%252C%2522scm%2522%253A%25221007.12144.95220.42296_0_0%2522%252C%2522x_object_id%2522%253A628739564865%257D','imgADAlt':'','ImgPath':'http://hn-tyc.com/uploadfile/2021/0303/20210303082317743.jpg'}],'imgADLinkTarget':'New','Count':'1','showAlt':'Y'}";
cmsAD_13.URL = "http://hn-tyc.com/index.php?m=poster&c=index";
cmsAD_13.SiteID = 1;
cmsAD_13.PaddingLeft = 0;
cmsAD_13.PaddingTop = 0;
cmsAD_13.Width = 200;
cmsAD_13.Height = 100;
cmsAD_13.UploadFilePath = "";
cmsAD_13.ShowAD();
var isIE=!!window.ActiveXObject;
if (isIE){
if (document.readyState=="complete"){
cmsAD_13.Stat();
} else {
document.onreadystatechange=function(){
if(document.readyState=="complete") cmsAD_13.Stat();
}
}
} else {
cmsAD_13.Stat();
}
document.getElementById('PCMSAD_13').visibility = 'visible';
cmsAD_13.Interval = setInterval(cmsAD_13.Start(cmsAD_13),cmsAD_13.Delay);