function ObjectAD() { /* Define Variables*/ this.ADID = 0; this.ADType = 0; this.ADName = ""; this.ImgUrl = ""; this.ImgWidth = 0; this.ImgHeight = 0; this.FlashWmode = 0; this.LinkUrl = ""; this.LinkTarget = 0; this.LinkAlt = ""; this.Priority = 0; this.CountView = 0; this.CountClick = 0; this.InstallDir = ""; this.ADDIR = ""; } function PopZoneAD(_id) { /* Define Common Variables*/ this.ID = _id; this.ZoneID = 0; this.ZoneName = ""; this.ZoneWidth = 0; this.ZoneHeight = 0; this.ShowType = 1; this.DivName = ""; this.Div = null; /* Define Unique Variables*/ this.PopType = 0; this.Left = 0; this.Top = 0; this.CookieHour = 0; /* Define Objects */ this.AllAD = new Array(); this.ShowAD = null; /* Define Functions */ this.AddAD = PopZoneAD_AddAD; this.GetShowAD = PopZoneAD_GetShowAD; this.CookieCheck = PopZoneAD_CookieCheck; this.Show = PopZoneAD_Show; this.Struct = PopZoneAD_Struct; this.Window = PopZoneAD_Window; } function PopZoneAD_AddAD(_AD) { this.AllAD[this.AllAD.length] = _AD; } function PopZoneAD_GetShowAD() { if (this.ShowType > 1) { this.ShowAD = this.AllAD[0]; return; } var num = this.AllAD.length; var sum = 0; for (var i = 0; i < num; i++) { sum = sum + this.AllAD[i].Priority; } if (sum <= 0) {return ;} var rndNum = Math.random() * sum; i = 0; j = 0; while (true) { j = j + this.AllAD[i].Priority; if (j >= rndNum) {break;} i++; } this.ShowAD = this.AllAD[i]; } function PopZoneAD_Show() { if (!this.AllAD) { return; } else { this.GetShowAD(); } if (this.ShowAD == null) return false; if (this.CookieCheck()) return false; this.DivName = "PopZoneAD_Div" + this.ZoneID; if (this.ShowAD.ADDIR=="") this.ShowAD.ADDIR = "AD" if (this.PopType == 3) { window.showModelessDialog("" + this.ShowAD.InstallDir + this.ShowAD.ADDIR + "/ADShow.asp?ADID=" + this.ShowAD.ADID + "","","scroll:0;status:0;help:0;toolbar=0;resizable:0;dialogTop:" + this.Top + "px;dialogLeft:" + this.Left + "px;dialogWidth:" + this.ZoneWidth + "px;dialogHeight:" + this.ZoneHeight + "px"); } else { var OK = this.Struct(); if (OK) OK.document.write(this.Window()); } if (this.ShowAD.CountView) { document.write ("") } } function PopZoneAD_Struct() { var winwidth = (this.PopType==4) ? (screen.width - 9): (parseInt((this.ShowAD.ImgWidth) ? this.ShowAD.ImgWidth : 350) - 4); var winheight = (this.PopType==4) ? (screen.height - 56): (parseInt((this.ShowAD.ImgHeight) ? this.ShowAD.ImgHeight : 250) - 4); var winleft = (this.PopType==4) ? 0: ((this.Left) ? this.Left : 0); var wintop = (this.PopType==4) ? 0: ((this.Top) ? this.Top : 0); return window.open("about:blank", "","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width=" + winwidth + ",height=" + winheight + ",top=" + wintop + ",left=" + winleft); } function PopZoneAD_Window() { var strWin; strWin = "