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://www.uparkmedia.com/index.php?m=poster&c=index&a=show&siteid="+this.SiteID+"&spaceid="+this.ADID+"&id="+this.PosID; document.body.appendChild(new_element); } function showADContent() { var content = this.ADContent; var str = "
"; var AD = eval('('+content+')'); if (this.ADType == "images") { str += ""; str += ""; str += ""; }else if(this.ADType == "flash"){ str += ""; str += ""; str += ""; str += ""; str += ""; 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_1_pause_resume(){if(cmsAD_1.Pause){clearInterval(cmsAD_1.Interval);cmsAD_1.Pause = false;}else {cmsAD_1.Interval = setInterval(cmsAD_1.Start(cmsAD_1),cmsAD_1.Delay);cmsAD_1.Pause = true;}} var cmsAD_1 = new PCMSAD('cmsAD_1'); cmsAD_1.PosID = 1; cmsAD_1.ADID = 24; cmsAD_1.ADType = "images"; cmsAD_1.ADName = "大唐廣西分公司慶祝新中國成立70周年專題報道"; cmsAD_1.ADContent = "{'Images':[{'imgADLinkUrl':'http%3A%2F%2Fwww.uparkmedia.com%2Findex.php%3Fm%3Dspecial%26c%3Dindex%26specialid%3D16','imgADAlt':'大唐廣西分公司慶祝新中國成立70周年專題報道','ImgPath':'/uploadfile/2019/0917/20190917112604198.png'}],'imgADLinkTarget':'New','Count':'1','showAlt':'Y'}"; cmsAD_1.URL = "http://www.uparkmedia.com/index.php?m=poster&c=index"; cmsAD_1.SiteID = 1; cmsAD_1.PaddingLeft = 0; cmsAD_1.PaddingTop = 0; cmsAD_1.Width = 320; cmsAD_1.Height = 180; cmsAD_1.UploadFilePath = ""; cmsAD_1.ShowAD(); var isIE=!!window.ActiveXObject; if (isIE){ if (document.readyState=="complete"){ cmsAD_1.Stat(); } else { document.onreadystatechange=function(){ if(document.readyState=="complete") cmsAD_1.Stat(); } } } else { cmsAD_1.Stat(); } document.getElementById('PCMSAD_1').visibility = 'visible'; cmsAD_1.Interval = setInterval(cmsAD_1.Start(cmsAD_1),cmsAD_1.Delay);