﻿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 = "";
    this.OverdueDate = "";
}

function BannerZoneAD(_id) {
    /* Define Constants */
    this.adNum = 0;
    this.adDelay = 6000;

    /* 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*/

    /* Define Objects */
    this.AllAD = new Array();
    this.ShowAD = null;

    /* Define Functions */
    this.AddAD = BannerZoneAD_AddAD;
    this.Show = BannerZoneAD_Show;

}

function BannerZoneAD_AddAD(_AD) {
    var date = new Date();
    var getdate = date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
    var today = new Date(getdate);
    var overdueDate = new Date(_AD.OverdueDate);
    if (today <= overdueDate) {
        this.AllAD[this.AllAD.length] = _AD;
    }
}

function BannerZoneAD_Show() {
    var swf_width = this.ZoneWidth;
    var swf_height = this.ZoneHeight;
    var swf_path = this.AllAD[0].InstallDir + "images/";
    var config = '0xFFFFFF|0x2|0099FF|15|0xFFFFFF|0x0099FF|0x000000|8|3|1|_blank';
    var files = '';
    var links = '';
    var texts = '';
    for (var ADID in this.AllAD) {
        if (ADID < this.AllAD.length - 1) {
            imgurl = this.AllAD[ADID].ImgUrl.toLowerCase()
            if (this.AllAD[ADID].InstallDir.indexOf("http://") != -1) imgurl = o.InstallDir.substr(0, this.AllAD[ADID].InstallDir.length - 1) + imgurl;
            files += imgurl + "|";
            links += this.AllAD[ADID].LinkUrl + "|";
            texts += "|";
        }
        else {
            files += this.AllAD[ADID].ImgUrl;
            links += this.AllAD[ADID].LinkUrl;
        }
    }
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + swf_width + '" height="' + swf_height + '">');
    document.write('<param name="movie" value="' + swf_path + 'advFocus.swf">'); document.write('<param name="quality" value="high">'); document.write('<param name="menu" value="false">');
    document.write('<param name="wmode" value="opaque">'); document.write('<param name="FlashVars" value="bcastr_config=' + config + '&amp;bcastr_file=' + files + '&amp;bcastr_link=' + links + '&amp;bcastr_title=' + texts + '">');
    document.write('<embed src="' + swf_path + 'advFocus.swf" wmode="opaque" FlashVars="bcastr_config=' + config + '&amp;bcastr_file=' + files + '&amp;bcastr_link=' + links + '&amp;bcastr_title=' + texts + '" menu="false" quality="high" width="' + swf_width + '" height="' + swf_height + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
    document.write('</object>');
}var ZoneAD_15=new BannerZoneAD("ZoneAD_15");var objAD = new ObjectAD();
objAD.ADID= 36;objAD.ADType= 1;objAD.ADName= "icbc";objAD.ImgUrl= "/uploadfiles/UploadADPic/201002282016342162.jpg";objAD.ImgWidth       = 0;objAD.ImgHeight      = 0;objAD.FlashWmode     = 0;objAD.ADIntro ="";objAD.LinkUrl        = "http://www.dzqh.com.cn/Category_1133/Index.aspx";objAD.LinkTarget     = 1;objAD.LinkAlt        = "";objAD.Priority       = 1;objAD.CountView      = true;objAD.CountClick     = true;objAD.OverdueDate    = "2020/01/28";objAD.InstallDir     = "/";objAD.ADDIR= "IAA";ZoneAD_15.AddAD(objAD);var objAD = new ObjectAD();
objAD.ADID= 33;objAD.ADType= 1;objAD.ADName= "大赛";objAD.ImgUrl= "/uploadfiles/UploadADPic/201004191742279602.jpg";objAD.ImgWidth       = 0;objAD.ImgHeight      = 0;objAD.FlashWmode     = 0;objAD.ADIntro ="";objAD.LinkUrl        = "http://www.dzqh.com.cn/Category_1094/Index.aspx";objAD.LinkTarget     = 1;objAD.LinkAlt        = "";objAD.Priority       = 1;objAD.CountView      = true;objAD.CountClick     = true;objAD.OverdueDate    = "2011/04/30";objAD.InstallDir     = "/";objAD.ADDIR= "IAA";ZoneAD_15.AddAD(objAD);var objAD = new ObjectAD();
objAD.ADID= 28;objAD.ADType= 1;objAD.ADName= "股指期货";objAD.ImgUrl= "/uploadfiles/UploadADPic/201002211638566779.jpg";objAD.ImgWidth       = 735;objAD.ImgHeight      = 250;objAD.FlashWmode     = 0;objAD.ADIntro ="";objAD.LinkUrl        = "http://www.dzqh.com.cn/Item/5800.aspx";objAD.LinkTarget     = 1;objAD.LinkAlt        = "股指期货开户指引";objAD.Priority       = 1;objAD.CountView      = true;objAD.CountClick     = true;objAD.OverdueDate    = "2010/12/05";objAD.InstallDir     = "/";objAD.ADDIR= "IAA";ZoneAD_15.AddAD(objAD);var objAD = new ObjectAD();
objAD.ADID= 27;objAD.ADType= 1;objAD.ADName= "培训会议广告";objAD.ImgUrl= "/uploadfiles/Article/2010/1/201001181424060359.jpg";objAD.ImgWidth       = 735;objAD.ImgHeight      = 250;objAD.FlashWmode     = 0;objAD.ADIntro ="";objAD.LinkUrl        = "http://www.dzqh.com.cn/Item/5428.aspx";objAD.LinkTarget     = 1;objAD.LinkAlt        = "http://www.dzqh.com.cn/Item/5428.aspx";objAD.Priority       = 1;objAD.CountView      = true;objAD.CountClick     = true;objAD.OverdueDate    = "2010/12/05";objAD.InstallDir     = "/";objAD.ADDIR= "IAA";ZoneAD_15.AddAD(objAD);ZoneAD_15.ZoneID=15;ZoneAD_15.ZoneWidth=733;ZoneAD_15.ZoneHeight=250;ZoneAD_15.ShowType=1;ZoneAD_15.Show();