<?php
if($mar_direc_id=="right" || $mar_direc_id=="left"){
	?>
<div id="marquee_demo<?php echo $randstr;?>" class="marquee_list">
<table cellspacing="0" cellpadding="0" align="center" border="0">
<tr>
<td id="marquee_product1<?php echo $randstr;?>" valign="top">
<table width="100%" height="100" border="0" cellpadding="0" cellspacing="8">
<tr>
<?php
foreach($curr_marquee as $marquee){
	if($marquee_class=="text"){
?>
<?php if($marquee->pic){?>
<td><a href="<?php echo Html::uriquery('mod_product', 'view', array('p_id' => $marquee->link)); ?>" title="<?php echo $marquee->title; ?>"><?php echo $marquee->title?></a></td>
<?php }else{?>
<td><a href="<?php echo Html::uriquery('mod_article', 'article_content', array('article_id' => $marquee->link)); ?>" title="<?php echo $marquee->title; ?>"><?php echo $marquee->title?></a></td>
<?php }?>
<?php }else {?>
<td><a href="<?php echo Html::uriquery('mod_product', 'view', array('p_id' => $marquee->link)); ?>" title="<?php echo $marquee->title; ?>"><img src="<?php echo $marquee->pic?>" border=0 width="160" height="120"  name="picautozoom"></a></td>
<?php }?>
<?php }?>
</tr>

</table>
</td>
<td id="marquee_product2<?php echo $randstr;?>" valign="top"></td>
</tr>
</table>
</div>
<div class="list_bot"></div>
<?php
	if($mar_direc_id=="right"){
?>

<script type="text/javascript">

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;
function Marquee<?php echo $randstr;?>(){
if(marquee_demo<?php echo $randstr;?>.scrollLeft<=0){
marquee_demo<?php echo $randstr;?>.scrollLeft=marquee_product1<?php echo $randstr;?>.scrollWidth;
}
else{
marquee_demo<?php echo $randstr;?>.scrollLeft--;
}
}
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>
<?php } else if($mar_direc_id=="left"){?>
<script type="text/javascript">


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;
function Marquee<?php echo $randstr;?>(){
if(marquee_demo<?php echo $randstr;?>.scrollLeft>=marquee_product1<?php echo $randstr;?>.scrollWidth){
marquee_demo<?php echo $randstr;?>.scrollLeft=0;
}
else{
marquee_demo<?php echo $randstr;?>.scrollLeft++;
}
}
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>
<?php }?>
<?php
}else if($mar_direc_id=="top"){
	include_once 'top.php';
}else if($mar_direc_id=="down"){
	include_once 'down.php';
}
?>