PHP程序,修改的是templates前台原来是这样想让4个区内容向上无缝滚动
原程序代码
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="topsort">
        <tr>
        <!--{eval $index=0;}-->
        <!--{get:item val=category(pid/0)}-->
        <td style="width:321px; padding:5px 3px;" valign="top">
            <table width="315" cellspacing="0" cellpadding="0" border="0">
                <tr><td class="title cl{$index}" height="24"><h3>最佳{print:item category(catid/$val[catid])}</h3></td></tr>
                <tr><td class="body cl{$index}">
                        <table width="99%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">
                            <tr>
                                <th width="28" nowrap="" height="28">排名</th>
                                <th width="20">&nbsp;</th>
                                <th width="*" nowrap="" align="left">名称</th>
                                <th width="40" nowrap="" bgcolor="#ffffff" align="center">综合分</th>
                            </tr>
                                                    </table>   
                     <table width="99%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">
                            <!--{get:item topval=top(city_id/_NULL_CITYID_/pid/$val[catid]/field/avgsort/orderby/avgsort DESC/rows/10)}-->                            <tr>
                                <td class="tdLine" width="28" align="center">$topval[index].</td>
                                <td class="tdLine" width="20" align="center"> {if !$topval[trend]}-{else}<img src="{URLROOT}/{$_G[tplurl]}img/mini-{$topval[trend]}.gif" />{/if}</td>
                                <td class="tdLine" width="*">
                                
                                <a href="{url item/detail/id/$topval[sid]}" title="$topval[fullname]">{sublen $topval[fullname],15,'...'}</a>
                                
                                </td>
                                <td class="tdLine" width="40" align="center">$topval[value]</td>
                            </tr>
                            <!--{/get}-->                        </table>
                      
                </td></tr>
            </table>
        </td>
        <!--{if ++$index%3==0}--></tr><tr><!--{/if}-->
        <!--{/get}-->
        </tr>
        </table>
我是这么改的
         <table cellpadding="0" cellspacing="0" border="0" width="100%" class="topsort">
        <tr>
        <!--{eval $index=0;}-->
        <!--{get:item val=category(pid/0)}-->
        <td style="width:321px; padding:5px 3px;" valign="top">
            <table width="315" cellspacing="0" cellpadding="0" border="0">
                <tr><td class="title cl{$index}" height="24"><h3>最佳{print:item category(catid/$val[catid])}</h3></td></tr>
                <tr><td class="body cl{$index}">
                        <table width="99%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">
                            <tr>
                                <th width="28" nowrap="" height="28">排名</th>
                                <th width="20">&nbsp;</th>
                                <th width="*" nowrap="" align="left">名称</th>
                                <th width="40" nowrap="" bgcolor="#ffffff" align="center">综合分</th>
                            </tr>
                                                    </table>
                      <div id=marquees >  <table width="99%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">
                            <!--{get:item topval=top(city_id/_NULL_CITYID_/pid/$val[catid]/field/avgsort/orderby/avgsort DESC/rows/10)}-->                            <tr>
                                <td class="tdLine" width="28" align="center">$topval[index].</td>
                                <td class="tdLine" width="20" align="center"> {if !$topval[trend]}-{else}<img src="{URLROOT}/{$_G[tplurl]}img/mini-{$topval[trend]}.gif" />{/if}</td>
                                <td class="tdLine" width="*">
                                
                                <a href="{url item/detail/id/$topval[sid]}" title="$topval[fullname]">{sublen $topval[fullname],15,'...'}</a>
                                
                                </td>
                                <td class="tdLine" width="40" align="center">$topval[value]</td>
                            </tr>
                            <!--{/get}-->                        </table></div> 
                </td></tr>
            </table>
        </td>
        <!--{if ++$index%3==0}--></tr><tr><!--{/if}-->
        <!--{/get}-->
        </tr>
        </table>
<script language="JavaScript">marqueesHeight=300; 
stopscroll=false;with(marquees){ 
style.width=0; 
style.height=marqueesHeight; 
style.overflowX="visible"; 
style.overflowY="hidden"; 
noWrap=true; 
onmouseover=new Function("stopscroll=true"); 
onmouseout=new Function("stopscroll=false"); 

document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');preTop=0; currentTop=0;function init(){ 
templayer.innerHTML=""; 
while(templayer.offsetHeight<marqueesHeight){ 
templayer.innerHTML+=marquees.innerHTML; 

marquees.innerHTML=templayer.innerHTML+templayer.innerHTML; 
setInterval("scrollup()",20); 

document.body.onload=init;function scrollup(){ 
if(stopscroll==true) return; 
preTop=marquees.scrollTop; 
marquees.scrollTop+=1; 
if(preTop==marquees.scrollTop){ 
marquees.scrollTop=templayer.offsetHeight-marqueesHeight; 
marquees.scrollTop+=1; 


</script>现在遇到的问题是改的是模版,这样改完以后前台就会出现4个 div id=marquees 就冲突了,想用id=marquees1 id=marquees2又不知道怎么写,或者不用ID用类?大家教我怎么做才可以?