﻿/*
Flash Name: Gray Focus（zbird）
Description: 灰色聚焦Flash图片轮播
*/
document.write('<div id="flash_cycle_image"></div>');
$importjs = (function()
{
    var uid = 0;
    var curr = 0;
    var remove = function(id)
    {
        var head = document.getElementsByTagName('head')[0];
        head.removeChild( document.getElementById('jsInclude_'+id) );
    };

    return function(file,callback)
    {
        var callback;
        var id = ++uid;
        var head = document.getElementsByTagName('head')[0];
        var js = document.createElement('script');
        js.setAttribute('type','text/javascript');
        js.setAttribute('src',file);
        js.setAttribute('id','jsInclude_'+id);
        if( document.all )
        {
            js.onreadystatechange = function()
            {
                if(/(complete|loaded)/.test(this.readyState))
                {
                    try
                    {
                        callback(id);remove(id);
                    }
                    catch(e)
                    {
                        setTimeout(function(){remove(id);include_js(file,callback)},2000);
                    }
                }
            };
        }
        else
        {
            js.onload = function(){callback(id); remove(id); };
        }
        head.appendChild(js);
        return uid;
    };
}
)();

function show_flash()
{
    document.getElementById('flash_cycle_image').innerHTML = '<object id="FrontPageFocusShower" name="FrontPageFocusShower" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ swf_width +'" align="middle" height="'+swf_height+'"><param name="width" value="'+ swf_width +'"><param name="height" value="'+swf_height+'">'+
    '<param name="movie" value="/images/flashdata/grayfocus.swf">'+
    '<param name="allowfullscreen" value="false"><param name="scale" value="noScale"><param name="wmode" value="opaque">'+
     '<param name="play" value="0"><param name="loop" value="-1"><param name="quality" value="high"><param name="allowscriptaccess" value="always"><param name="bgcolor" value="#ffffff"><param name="align" value="middle">'+
     '<param name="swremote" value=""><param name="seamlesstabbing" value="1"><param name="profile" value="0"><param name="profileaddress" value="">'+
     '<param name="profileport" value="">'+
     '<param name="base" value="">'+
     '<param name="allownetworking" value="all">'+
     '<param name="FlashVars" value="pics='+ pics +'&amp;links='+ links +'&amp;texts=&amp;stop_time=6000">'+
     '<embed src="/images/flashdata/grayfocus.swf" id="FrontPageFocusShower" name="FrontPageFocusShower" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="noScale" wmode="opaque" quality="high" allowscriptaccess="always" bgcolor="#ffffff" flashvars="pics=' + pics + '&amp;links=' + links + '&amp;texts=&amp;stop_time=6000" width="'+swf_width+'" align="middle" height="'+swf_height+'">'+
     '</object>';
}

$importjs('/images/flashdata/data.js', show_flash);