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.URL = ""; this.SiteID = 0; this.ShowAD = showADContent; this.Stat = statAD; } function statAD(id) { var sp = document.createElement("SCRIPT"); sp.type = "text/javascript"; sp.src = "http://www.tjqxx.com/index.php?m=poster&c=index&a=show&siteid="+this.SiteID+"&id="+id+"&spaceid="+this.PosID; document.body.appendChild(sp); } function showADContent() { var content = this.ADContent; var isIE=!!window.ActiveXObject; var str = "
"; var AD = eval('('+content+')'); var count = 0; if(AD.ADImage.length){ count = AD.ADImage.length; } for(var i=0;i"+AD.ADImage[i].imgADAlt+"0){ sizeStr = " height='"+this.Height+"' "; }else if(this.Width>0&&this.Height==0){ sizeStr = " width='"+this.Width+"' "; }else{ sizeStr = (this.Width < this.Height) ? " width='"+this.Width+"' " : " height='"+this.Height+"' "; } str += sizeStr; str += " style='border:0px;'/>"; } str += "
"; document.write(str); } var cmsAD_12 = new PCMSAD('cmsAD_12'); cmsAD_12.PosID = 17; cmsAD_12.ADID = 12; cmsAD_12.ADType = "images"; cmsAD_12.ADName = "hongdong3"; cmsAD_12.ADContent = "{'ADImage':[ {'imgID':'12','imgADLinkUrl':'','imgADAlt':'','ImgPath':'http://www.tjqxx.com/uploadfile/2016/1113/20161113022648520.jpg','imgADLinkTarget':'New','showAlt':'Y'} , {'imgID':'9','imgADLinkUrl':'','imgADAlt':'','ImgPath':'http://www.tjqxx.com/uploadfile/2016/1121/20161121030613584.jpg','imgADLinkTarget':'New','showAlt':'Y'} ]}"; cmsAD_12.URL = "http://www.tjqxx.com/index.php?m=poster&c=index&a=poster_click"; cmsAD_12.SiteID = 1; cmsAD_12.Width = 290; cmsAD_12.Height = 100; cmsAD_12.UploadFilePath = ""; cmsAD_12.ShowAD();