﻿                    var focus_width=450;
                    var focus_height=195;
                    var text_height=0;
                    var border_color="#ffffff";
                    var round_corner=0;
                    var pics="";//'index/flash1.jpg|index/flash2.jpg|index/flash1.jpg|index/flash2.jpg';
                    var links="";//'http://www.baidu.com|http://www.google.com|http://www.baidu.com|http://www.google.cn';
                    var texts="";//'text1|text2|text3';
                    //读取xml
                    var xmlDoc = new ActiveXObject("microsoft.xmldom");
                    xmlDoc.async=false;
                    xmlDoc.load("swf/flash_image_url.xml");
                    root=xmlDoc.documentElement;
                    //var newHTML="";

                    //function start(){
                        buildTree(root);
                        //}

                    function buildTree(passedNode){
                        var children = passedNode.childNodes.length;
                        for (var j=0; j<children; j++){
                        Node=passedNode.childNodes.item(j);
                        //if (Node.nodeName=="EMAIL"){ newHTML+=("<P>"+Node.nodeName+" "+j); }
                            if (!Node.hasChildNodes()){
                            //newHTML+=( "<BR><B>"+Node.parentNode.nodeName+":</B> "+Node.text );
                             //alert(Node.parentNode.nodeName);
                             switch(Node.parentNode.nodeName.toString())
                             {
                                case "image":pics +=Node.text+"|";break;
                                case "url":links +=aa(Node.text)+"|";break;
                                default: break;
                             }

                               
                            }
                           buildTree(Node);
                        }
                    }
function aa(url1)
{
   var len=url1.lastIndexOf("?");
   return  url1.substr(0,len+1)+encodeURIComponent(url1.substr(len+1));

}
                    pics=pics.substr(0,pics.length-1);
                    links=links.substr(0,links.length-1);
                    
                    //结束
//                    var pics="index/flash1.jpg|index/flash2.jpg|index/flash1.jpg|index/flash2.jpg|";
//                    var links="http://www.aa.com|http://www.bb.com|http://www.cc.com|http://www.ee.cn|";

//                    var swf_height = focus_height+text_height;
//                    document.write('<div class=\"flashmoviebyGuo\">');
//                    document.write('<style>.flashmoviebyGuo span{font:normal 1px/1px \"Arial\";color:'+border_color+';background:display:block;position:absolute;z-index:9999;over-flow:hidden}</style>');
//                    document.write('<span style=\"height:1px;width:'+focus_width+'px\">&nbsp;</span><span style=\"height:'+swf_height+'px;width:1px;margin-left:'+(focus_width)+'px\">&nbsp;</span><span style=\"height:1px;width:'+focus_width+'px;margin-top:'+(swf_height-1)+'px\">&nbsp;</span><span style=\"height:'+swf_height+'px;width:1px;\">&nbsp;</span>');
//                    if(round_corner==1){document.write('<span style=\"height:2px;width:3px\">&nbsp;</span><span style=\"height:2px;width:3px;margin-left:'+(focus_width)+'px\">&nbsp;</span><span style=\"height:2px;width:3px;margin-top:'+(swf_height)+'px\">&nbsp;</span><span style=\"height:2px;width:3px;margin-left:'+(focus_width)+'px;margin-top:'+(swf_height)+'px\">&nbsp;</span><span style=\"height:3px;width:2px\">&nbsp;</span><span style=\"height:3px;width:2px;margin-left:'+(focus_width)+'px\">&nbsp;</span><span style=\"height:3px;width:2px;margin-top:'+(swf_height)+'px\">&nbsp;</span><span style=\"height:3px;width:2px;margin-left:'+(focus_width)+'px;margin-top:'+(swf_height)+'px\">&nbsp;</span> ');}
//                    document.write('<object style="background:transparent;border:none" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
//                    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="swf/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#DADADA">');
//                    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
//                    document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+(focus_width)+'&borderheight='+(focus_height)+'&textheight='+text_height+'">');
//                    document.write('<embed src="swf/pixviewer.swf" style="background:transparent;border:none" wmode="Opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
//                    document.write('</object>');
//                    document.write('</div>');
//                    
                    var swf_height = focus_height+text_height;
                    document.write('<div class=\"flashmoviebyGuo\">');
                    document.write('<style>.flashmoviebyGuo span{font:normal 1px/1px \"Arial\";color:'+border_color+';background:display:block;position:absolute;z-index:9999;over-flow:hidden}</style>');
                    document.write('<span style=\"height:1px;width:'+focus_width+'px\">&nbsp;</span><span style=\"height:'+swf_height+'px;width:1px;margin-left:'+(focus_width-1)+'px\">&nbsp;</span><span style=\"height:1px;width:'+focus_width+'px;margin-top:'+(swf_height-1)+'px\">&nbsp;</span><span style=\"height:'+swf_height+'px;width:1px;\">&nbsp;</span>');
                    if(round_corner==1){document.write('<span style=\"height:2px;width:3px\">&nbsp;</span><span style=\"height:2px;width:3px;margin-left:'+(focus_width-3)+'px\">&nbsp;</span><span style=\"height:2px;width:3px;margin-top:'+(swf_height-2)+'px\">&nbsp;</span><span style=\"height:2px;width:3px;margin-left:'+(focus_width-3)+'px;margin-top:'+(swf_height-2)+'px\">&nbsp;</span><span style=\"height:3px;width:2px\">&nbsp;</span><span style=\"height:3px;width:2px;margin-left:'+(focus_width-2)+'px\">&nbsp;</span><span style=\"height:3px;width:2px;margin-top:'+(swf_height-3)+'px\">&nbsp;</span><span style=\"height:3px;width:2px;margin-left:'+(focus_width-2)+'px;margin-top:'+(swf_height-3)+'px\">&nbsp;</span> ');}
                    document.write('<object style="background:transparent;border:none" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
                    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="swf/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#DADADA">');
                    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
                    document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+(focus_width+2)+'&borderheight='+(focus_height+2)+'&textheight='+text_height+'">');
                    document.write('<embed src="swf/pixviewer.swf" style="background:transparent;border:none" wmode="Opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
                    document.write('</object>');
                    document.write('</div>');
