﻿

// JScript 文件
//----------------------------
// 首页图片轮显效果
//  [
//      '图片名称',
//      '图片链接',
//      '图片标题'
//  ],
//----------------------------
var FlashImgs = [
    [
        'banner1.jpg',
        '',
        ''
    ],
    [
        'bannerMBT.jpg',
        '',
        ''
    ],
    [
        'banner2.jpg',
        '',
        ''
    ],
    [
        'banner3.jpg',
        '',
        ''
    ],
    [
        'banner4.jpg',
        '',
        ''
    ],
    [
        'banner5.jpg',
        '',
        ''
    ],
    [
        'banner6.jpg',
        '',
        ''
    ]
];

function ShowFlashImgs(){
    this.Server = 'images/flashimage/';                  //图片文件夹路径
    this.Path = 'images/flashimage/pixviewer.swf';    //Flash文件路径
    this.TitleTextColor = '0xFFFFFF';                       //标题颜色(前面加0x)
    this.TitleBgColor = '0xCCCCCC';                         //标题背景色
    this.BtnDefaultColor = '0xCCCCCC';                      //按钮默认背景色
    this.BtnOverColor = '0x000000';                         //鼠标移上时按钮背景色
    this.textheight = 0;                                   //备注文字宽度
    this.W = 700;                                       //图片宽度
    this.H = 170;                                      //图片高度
    this.Vars = function(){
        var s1 = [], s2 = [], s3 = [];
        for (var i=0; i<FlashImgs.length; i++) {
            s1.push(this.Server + FlashImgs[i][0]);
            s2.push(FlashImgs[i][1]);
            s3.push(FlashImgs[i][2]);
        }
        return 'pics=' + s1.join('|') + '&links=' + s2.join('|') + '&texts=' + s3.join('|') + '&borderwidth='+this.W+'&borderheight='+(this.H-this.textheight)+'&textheight='+this.textheight;
    };
    this.Start = function(){
        var s = [];
        s.push('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + this.W + '" height="' + this.H + '">');
        s.push('<param name="movie" value="' + this.Path + '">');
        s.push('<param name="quality" value="high">');
        s.push('<param name="wmode" value="transparent">');
        s.push('<param name="FlashVars" value="' + this.Vars() + '">');
        s.push('<embed src="' + this.Path + '" FlashVars="' + this.Vars() + '" width="' + this.W + '" height="' + this.H + '" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" salign="T" name="scriptmain" menu="false" wmode="transparent"></embed>');
        s.push('</object>');
        document.write(s.join(''));
    };
    this.Start();
}

new ShowFlashImgs();
