一个网页tab效果,高手看看我的程序错拉那里
第一个正常.第二个就不知道怎么控制拉,  
效果:http://www.hengjiu371.com/1.htm  
代码如下:  
<SCRIPT   language=JavaScript   type=text/JavaScript> var   pds   =   null;  
var   cid   =   0;  
var   cimg   =   null;  
var   autoid   =   1;  
var   pdtt   =   null;  
function   pdin(img,   pdid)  
{  
if   (pdtt)  
{  
window.clearInterval(pdtt);  
pdtt   =   null;  
}  
chg_pd_(img,   pdid);  
}  
function   chg_pd_(img,   pdid)  
{  
if   (pdid   ==   cid)  
{  
return;  
}  
if   (!pds)  
{  
pds   =   document.getElementById( "prvdinfo ").getElementsByTagName( "div ");  
}  
if   (pdid   <   pds.length)  
{  
if   (!cimg)  
{  
cimg   =   document.getElementById( "imgpd0 ");  
}  
// cimg.src   =   cimg.src.replace( "a.GIF ",   "b.GIF ");  
cimg.className   =   "pdnormal ";  
pds[cid].style.display   =   "none ";  
// img.src   =   img.src.replace( "b.GIF ",   "a.GIF ");  
img.className   =   "pdfocus ";  
pds[pdid].style.display   =   "block ";  
cid   =   pdid;  
cimg   =   img;  
}  
}  
function   chg_pd()  
{  
chg_pd_(document.getElementById( "imgpd "   +   autoid.toString()),   autoid);  
autoid   =   autoid   +   1;  
if   (autoid   >   4)  
{  
autoid   =   0;  
}  
}  
function   do_chg_pd()  
{  
pdtt   =   window.setInterval( "chg_pd() ",   5000);  
} </SCRIPT>  
.....................  
tabel代码我没有写,详见:http://topic.csdn.net/u/20071115/09/0545e762-200b-46b3-97db-23729fece301.html
------解决方案--------------------第一个正常.第二个就不知道怎么控制拉,
是不是第二个 照第一个去做?
我用firefox 里面的firebug 很好用 推荐你用下 f12 呼出