//由于不同的浏览器兼容性问题，此处不能再用window.ActiveXObject组件。
var xmlDoc;
/*
if (window.ActiveXObject)           // code for IE
{
    xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation && document.implementation.createDocument)     // code for Mozilla, etc.
{
    xmlDoc = document.implementation.createDocument("","",null);
}
    */

xmlDoc =new ActiveXObject("Microsoft.XMLDOM") 

xmlDoc.async=false
xmlDoc.load("/Images/Banner/XMLFile.xml"); 
var   ad=   xmlDoc.documentElement
var   Li=ad.childNodes.length
var imgUrl=new Array()
var imgText=new Array()
var imgLink=new Array()

var focus_width=750
var focus_height=270
var text_height=0
var swf_height = focus_height+text_height

var Pics = "";
var Links = "";
var Texts = "";

var j=1;

for(var i=0;i<Li;i++) 
{ 
  if(ad.childNodes(i).childNodes(3).text=="True")
  {

     if(j>1)
     {
       Pics=Pics+"|"+ad.childNodes(i).childNodes(0).text;;
       Links=Links+"|"+ad.childNodes(i).childNodes(1).text;
       Texts=Texts+"|"+ad.childNodes(i).childNodes(2).text;
     }
   else
     {
       Pics=Pics+ad.childNodes(i).childNodes(0).text;;
       Links=Links+ad.childNodes(i).childNodes(1).text;
       Texts=Texts+ad.childNodes(i).childNodes(2).text;
     }
   j++;
   }
}

/*
 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="'+ focus_width +'" height="'+ swf_height +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="Images/Banner/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
 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('</object>');
 */
    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="'+ focus_width +'" height="'+ swf_height +'">');
    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="Images/Banner/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
    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="Images/Banner/focus.swf" 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_OLD="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');        document.write('</object>');
