我在网页中有个地方是图片自动切换的,其中有张图片是用gif动态图片,然后还有链接动态改变显示哪张图片,现在的问题是当我手动点击显示这张gif图片的时候,图片就定格了 ,不能变化了 ,这个有什么办法解决?这是脚本:var NowImg = 1;
var bStart = 0;
var bStop =0;function fnToggle() 
{
var next = NowImg + 1; if(next == MaxImg+1) 
{
NowImg = MaxImg;
next = 1;
}
if(bStop!=1)
{ if(bStart == 0)
{
bStart = 1;
setTimeout('fnToggle()', 5000);
return;
}
else
{
oTransContainer.filters[0].Apply(); document.images['oDIV'+next].style.display = "";
document.images['oDIV'+NowImg].style.display = "none"; 
document.images['img'+next].src="images/"+next+"_focus.png";
document.images['img'+NowImg].src="images/"+NowImg+"_lost.png"; oTransContainer.filters[0].Play(duration=2); if(NowImg == MaxImg) 
NowImg = 1;
else
NowImg++;
}
setTimeout('fnToggle()', 5000);
}
}
function toggleTo(img)
{
bStop=1;
NowImg=img;
if(img==1)
{
document.images['oDIV1'].style.display = "";
document.images['oDIV2'].style.display = "none";
document.images['img1'].src="images/1_focus.png";
document.images['img2'].src="images/2_lost.png";
//document.images['oDIV3'].style.display = "none"; 
//document.images['oDIV4'].style.display = "none"; 
}
else if(img==2)
{
document.images['oDIV2'].style.display = "";
document.images['oDIV1'].style.display = "none"; 
document.images['img1'].src="images/1_lost.png";
document.images['img2'].src="images/2_focus.png";
//document.images['oDIV3'].style.display = "none"; 
//document.images['oDIV4'].style.display = "none"; 
}}function mouseImg(){
bStop = 0;
}
这是代码:<div align="center">
   <table width="934" height="255" border="0" align="center" cellpadding="0" cellspacing="0" class="solidbox">
  <tr>
    <td width="934" height="238" align="center"><TABLE border=0 align="center" cellPadding=0 cellSpacing=0>
      <TBODY>
        <TR>
          <TD width="934" height="238"><DIV id=oTransContainer 
            style="FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0, motion='forward'); WIDTH: 934px; HEIGHT: 238px"><a 
            href="product.asp?ID=43" 
            target=_blank><img src="images/DHProject.png" name="oDIV1" 
            width=934
            height=238 border=0 usemap="#oDIV1Map" id=oDIV1 
            style="DISPLAY: yes;" /></a><A 
            href="news_Detail.asp?id=504&cid=57" 
            target=_blank><IMG src="images/123456.gif" name="oDIV2" usemap="#oDIV2Map"
            width=934
            height=238 border=0 id=oDIV2 
            style="DISPLAY: none;"></A>
</DIV>          </TD>
        </TR>

      </TBODY>
    </TABLE></td>
</tr><tr>
<td height="17" align="right"><script>var MaxImg = 2; fnToggle();</script><TABLE cellSpacing=1 cellPadding=0 width=50 
              border=0 onMouseOut="mouseImg()">
      <TBODY>
        <TR>
          <TD width=26><A href="javascript:toggleTo(1)"><IMG id="img1" name="img1" height=15 
                  src="images/1_focus.png" width=17 
                  border=0></A></TD>
          <TD width=26><A href="javascript:toggleTo(2)"><IMG id="img2" name="img2" height=15 
                  src="images/2_lost.png" width=17 
                  border=0></A></TD>
        </TR>
      </TBODY>
    </TABLE></td>
  </tr>
</table>  </div>