<div id="marquee_demo<?php echo $randstr;?>" class="marquee">
<div id="marquee_product1<?php echo $randstr;?>">
<?php if($marquee_class=="pic"){?>
<?php foreach($curr_marquee as $marquee){?>
<img src="<?php echo $marquee->pic?>" border=0 width="160" height="120" name="picautozoom" >
<?php }?>
<?php } else {?>
<?php foreach($curr_marquee as $marquee){
// 21/09/2010
if (!empty($marquee->pic)) {
	$uri = Html::uriquery('mod_product', 'view', array('p_id' => $marquee->link));
} else {
	$uri = Html::uriquery('mod_article', 'article_content', array('article_id' => $marquee->link));
}
?>
<p><a href="<?php echo $uri; ?>" title="<?php echo $marquee->title; ?>"><?php echo $marquee->title;?></a></p>
<?php }?>
<?php }?>
</div>
<div id="marquee_product2<?php echo $randstr;?>"></div>
</div>
<div class="list_bot"></div>
<script>
<!--
var speed=<?php echo $marquee_speed;?>;
var marquee_product2<?php echo $randstr;?> = document.getElementById("marquee_product2<?php echo $randstr;?>");
var marquee_product1<?php echo $randstr;?> = document.getElementById("marquee_product1<?php echo $randstr;?>");
var marquee_demo<?php echo $randstr;?> = document.getElementById("marquee_demo<?php echo $randstr;?>");
marquee_product2<?php echo $randstr;?>.innerHTML=marquee_product1<?php echo $randstr;?>.innerHTML; //克隆demo1为demo2
function Marquee<?php echo $randstr;?>(){
if(marquee_product2<?php echo $randstr;?>.offsetTop-marquee_demo<?php echo $randstr;?>.scrollTop<=0)//当滚动至demo1与demo2交界时
marquee_demo<?php echo $randstr;?>.scrollTop-=marquee_product1<?php echo $randstr;?>.offsetHeight //demo跳到最顶端
else{
marquee_demo<?php echo $randstr;?>.scrollTop++
}
}
var MyMar<?php echo $randstr;?>=setInterval(Marquee<?php echo $randstr;?>,speed);
marquee_demo<?php echo $randstr;?>.onmouseover=function() {clearInterval(MyMar<?php echo $randstr;?>)};//鼠标移上时清除定时器达到滚动停止的目的
marquee_demo<?php echo $randstr;?>.onmouseout=function() {MyMar<?php echo $randstr;?>=setInterval(Marquee<?php echo $randstr;?>,speed)};//鼠标移开时重设定时器
-->
</script>
