﻿
function ImgAutoPlay(HtmlContorl, PicArray, LinkArray, TextArray, F_width, F_heiht) {
    this.focus_width = F_width; //宽
    this.focus_height = F_heiht; //高
    this.text_height =0; //文本高
    this.swf_height = this.focus_height + this.text_height;
    //图片 链接 文字
    this.pics = PicArray;
    this.links = LinkArray;
    this.texts = TextArray;

    var Htmls = "";
    Htmls += '<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="' + this.focus_width + '" height="' + this.swf_height + '">';
    Htmls += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/js/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">';
    Htmls += '<param name="menu" value="false"><param name=wmode value="transparent">'; //<param name=wmode value="opaque">
    Htmls += '<param name="FlashVars" value="pics=' + this.pics + '&links=' + this.links + '&texts=' + this.texts + '&borderwidth=' + this.focus_width + '&borderheight=' + this.focus_height + '&textheight=' + this.text_height + '">';
    Htmls += '<embed src="pixviewer.swf" wmode="opaque" FlashVars="pics=' + this.pics + '&links=' + this.links + '&texts=' + this.texts + '&borderwidth=' + this.focus_width + '&borderheight=' + this.focus_height + '&textheight=' + this.text_height + '" menu="false" bgcolor="#F0F0F0" quality="high" width="' + this.focus_width + '" height="' + this.focus_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    Htmls += '</object>';

    document.getElementById(HtmlContorl).innerHTML = Htmls;
}
