﻿// JScript 文件

var imgUrl,imgtext,imgLink

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async=false;
xmlDoc.load("xml/roll.xml"); 
// xmlDoc.load(xmlFile);  //load xml文件使用xmlDoc.load方法，load xml字符串使用xmlDoc.loadXML方法
node = xmlDoc.selectNodes("//banerADs/banerAD");  //查找 <banerADs><bannerAD>

 imgUrl=node[0].childNodes[0].text;
 imgtext=node[0].childNodes[1].text;
 imgLink=node[0].childNodes[2].text;
 
  var focus_width=308
 var focus_height=195
 var text_height=24

 var swf_height = focus_height+text_height 
 var pics=imgUrl.substring(0,imgUrl.length-1)
 var links=imgLink.substring(0,imgLink.length-1)
 var texts=imgtext.substring(0,imgtext.length-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="'+ focus_width +'" height="'+ swf_height +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/gg01.swf"><param name="quality" value="high"><param name="bgcolor" value="#e0dfe9">');
 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>');
 xmlDoc=null;
 
 
 

