

//**********************************************************************   
//作　用：调用flash滚动图片代码，防止出现"单击以激活并使用此控件"提示  
//参　数：SWFUrl flash文件URL地址, PicWidth 图片宽度, PicHeight 图片高度, TextHeight 文本标题高度, BgColor 背景颜色 , PicUrlsLinksTextsStr 切换的图片地址、链接地址及文本标题
//返回值：输出flash代码   
//**********************************************************************   
function LoadFlashRollPic(SWFUrl,PicWidth,PicHeight,TextHeight,BgColor,PicUrlsLinksTextsStr) 
{ 
   var tempArray1;
   var tempArray2;
   var tempPicUrls = "";
   var tempPicLinks = "";
   var tempPicTexts = "";   
   var temp;
   var i;

   if (PicUrlsLinksTextsStr=="")
   {   document.write(""); 
   }
   else
   {
       tempArray1 = PicUrlsLinksTextsStr.split(";;");
       
       for (i=0; i<tempArray1.length; i++)
       {   
           tempArray2 = tempArray1[i].split("||");
           tempPicUrls = tempPicUrls + "|" + tempArray2[0];
           tempPicLinks = tempPicLinks + "|" + tempArray2[1];
           tempPicTexts = tempPicTexts + "|" + tempArray2[2];
       }
       if (tempPicUrls!="") {  tempPicUrls = tempPicUrls.substr(1,tempPicUrls.length-1); }
       if (tempPicLinks!="") {  tempPicLinks = tempPicLinks.substr(1,tempPicLinks.length-1); }
       if (tempPicTexts!="") {  tempPicTexts = tempPicTexts.substr(1,tempPicTexts.length-1); }

       var FlashCode = "<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=\"" + PicWidth + "\" height=\"" + (PicHeight + TextHeight) + "\"><param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"" + SWFUrl + "\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"" + BgColor + "\"><param name=\"menu\" value=\"false\"><param name=\"wmode\" value=\"opaque\"><param name=\"FlashVars\" value=\"pics=" + tempPicUrls + "&links=" + tempPicLinks + "&texts=" + tempPicTexts + "&borderwidth=" + PicWidth + "&borderheight=" + PicHeight + "&textheight=" + TextHeight + "\"></object>";
       document.write(FlashCode);
   }
} 