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.zhfengmi.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_24 = new PCMSAD('cmsAD_24'); cmsAD_24.PosID = 12; cmsAD_24.ADID = 24; cmsAD_24.ADType = "images"; cmsAD_24.ADName = "百花蜜"; cmsAD_24.ADContent = "{'ADImage':[ {'imgID':'24','imgADLinkUrl':'https%3A%2F%2Fwap.koudaitong.com%2Fv2%2Fgoods%2F366ige9n766xv','imgADAlt':'点击直达购买地址','ImgPath':'http://www.zhfengmi.com/html0409/rsc/images/demo/202140.jpg','imgADLinkTarget':'New','showAlt':'Y'} , {'imgID':'23','imgADLinkUrl':'http%3A%2F%2Fdetail.koudaitong.com%2Fshow%2Fgoods%3Falias%3D366ige9n766xv%26v2%2Fgoods%2F366ige9n766xv','imgADAlt':'你好蜜蜂 丽江原生蜂蜜','ImgPath':'http://www.zhfengmi.com/html0409/rsc/images/demo/202140-2.jpg','imgADLinkTarget':'New','showAlt':'Y'} ]}"; cmsAD_24.URL = "http://www.zhfengmi.com/index.php?m=poster&c=index&a=poster_click"; cmsAD_24.SiteID = 1; cmsAD_24.Width = 202; cmsAD_24.Height = 140; cmsAD_24.UploadFilePath = ""; cmsAD_24.ShowAD();