if (!window.Txt) { alert("未能加载txtcms.js核心文件,slide.js无法运行!") }
Txt.extend(Txt.prototype, {
    slide: function(options) {
        var settings = { width: 480, height: 220, files: null, links: null, texts: null, xmlurl: null, flash: 'images/flash.swf' }
        if (options) {
            Txt.extend(settings, options);
        }
        var s = settings;
        if (!this[0]) {
            alert("调用$(ID).slide()幻灯函数错误，页面中找不到‘" + this[0] + "’元素！");
            return;
        }
        if ((!s.files || !s.links) && !s.xmlurl) {
            this[0].innerHTML = "<center>files和links参数必须为数组</center>";
            return;
        }
        var files = links = texts = strHtml = sets = strurl = "";
        if (s.files) {
            for (i = 1; i < s.files.length; i++) {
                if (files == "") files = s.files[i];
                else files += "|" + s.files[i];
            }
        }
        if (s.links) {
            for (i = 1; i < s.links.length; i++) {
                if (links == "") links = s.links[i];
                else links += "|" + s.links[i];
            }
        }
        if (s.texts) {
            for (i = 1; i < s.texts.length; i++) {
                if (texts == "") texts = s.texts[i];
                else texts += "|" + s.texts[i];
            }
        }
        if (!s.xmlurl) {
            sets = 'bcastr_flie=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts
        } else {
            sets = 'bcastr_xml_url=' + s.xmlurl
        }
        var google = window.navigator.userAgent.indexOf('Chrome') >= 0;
        if (google) {
            strurl = s.flash + '" FlashVars="' + sets;
        } else {
            strurl = s.flash + '?' + sets;
        }
        strHtml = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=scriptmain name=scriptmain codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + s.width + '" height="' + s.height + '">';
        strHtml += '<param name="movie" value="' + strurl + '">';
        strHtml += '<param name="loop" value="false">';
        strHtml += '<param name="menu" value="false">';
        strHtml += '<param name="wmode" value="transparent">';
        strHtml += '<embed src="' + strurl + '" width="' + s.width + '" height="' + s.height + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>';
        strHtml += '</object>';
        this[0].innerHTML = strHtml;
        if (s.files.length == 0) {
            this[0].innerHTML = '<center><br><br>No Data</center>';
        }
        files = links = texts = strHtml = strurl = sets = null;
    }
})

function search(e) {
    if (e.keyword.value == '' || e.keyword.value == '请输入关键词') {
        alert("请输入关键词!");
        return false;
    }else if(e.keyword.value.length < 2){
        alert("关键词必须大于2个字符!");
        return false;
    }
    return true;
}
