               var pic_width ;
                var pic_height ;
                var show_text ;
                var button_pos ;
                var stop_time ;

            function write(imag,link,text){  //����д�ĸ�ʽ
            var swf_height = show_text == 1 ? pic_height + 20 : pic_height;
                var pics = "", links = "",texts = "";

                for (var i = 1; i < imag.length; i++) {
                    pics = pics + ("|" + imag[i]);
                    links = links + ("|" + link[i]);
                    texts = texts + ("|" + text[i]);
                }
                pics = pics.substring(1);
                links = links.substring(1);
                texts = texts.substring(1);

                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="' + pic_width + '" height="' + swf_height + '">');
                document.write('<param name="movie" value="media/focus.swf">');
                document.write('<param name="quality" value="high">');
                document.write('<param name="wmode" value="transparent">');//z-index能盖住他  
                 document.write('<param name="wmode" value="opaque">');                            
                document.write('<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&pic_width=' + pic_width + '&pic_height=' + pic_height + '&show_text=' + show_text + '&button_pos=' + button_pos + '&stop_time=' + stop_time + '">');

                document.write('<embed src="images/index/focus.swf" wmode="transparent" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&pic_width=' + pic_width + '&pic_height=' + pic_height + '&show_text=' + show_text + '&button_pos=' + button_pos + '&stop_time=' + stop_time + '" quality="high" width="' + pic_width + '" height="' + swf_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"  />');

                document.write('</object>');
            }
       function showimg1(){

                 pic_width = 490;
                 pic_height = 122;
                 show_text = 0;
                 button_pos = 1;
                 stop_time = 3000;
                var imag = new Array();
                var link = new Array();
                var text = new Array();


                imag[1] = "images/index_img/s1.jpg";  //因为是主页引用的所以可以这样写?
                link[1] = "#";
                text[1] = "";
                imag[2] = "images/index_img/s2.jpg";
                link[2] = "#";
                text[2] = "";

                imag[3] = "images/index_img/s3.jpg";
                link[3] = "#";
                text[3] = "";

                imag[4] = "images/index_img/s4.jpg";
                link[4] = "#";
                text[4] = "";

                imag[5] = "images/index_img/s5.jpg";
                link[5] = "#";
                text[5] = "";
                write(imag,link,text);
       }
         function showimg2(){

                 pic_width = 150;
                 pic_height = 230;
                 show_text = 0;
                 button_pos = 1;
                 stop_time = 3000;
                var imag = new Array();
                var link = new Array();
                var text = new Array();


                imag[1] = "upload/index_img/show1.jpg";
                link[1] = "#";
                text[1] = "";
                imag[2] = "upload/index_img/show2.jpg";
                link[2] = "#";
                text[2] = "";

                imag[3] = "upload/index_img/show3.jpg";
                link[3] = "#";
                text[3] = "";

                imag[4] = "upload/index_img/show4.jpg";
                link[4] = "#";
                text[4] = "";

                imag[5] = "upload/index_img/show5.jpg";
                link[5] = "#";
                text[5] = "";
                write(imag,link,text);
       }