<%
rs_middle.open "select  * from  ads  where ads_print='gundong' and ads_open=1 order by  ads_num " ,conn ,1,1
%>
<div id=demo_up_ads style=overflow:hidden;width:320px;height:140px;color:#ffffff>
<div id="demo1_up_ads" >
	<table cellpadding="0" cellspacing="0" height=140 width=320 >
		<tr>
			<td height=140 width=320 align=center align=center valign=center>
<%
do while not rs_middle.eof
response.write "<a href='"&rs_middle("ads_url")&"' title='"&rs_middle("ads_alt")&"' target='_blank'><img alt='"&rs_middle("ads_alt")&"' src='"&rs_middle("ads_src")&"' border=0 width='"&rs_middle("ads_width")&"' height='"&rs_middle("ads_height")&"'></a><br>"
rs_middle.movenext
loop
%>
            </td>
        </tr>
	</table>
</div>
<div id=demo2_up_ads>
</div>
</div>
<script>
   var step_c_ads=0;
   demo2_up_ads.innerHTML=demo1_up_ads.innerHTML;
   function Marquee_up_ads(){
   if(demo2_up_ads.offsetTop-demo_up_ads.scrollTop<=0){
   demo_up_ads.scrollTop-=demo1_up_ads.offsetHeight;
   step_c_ads--;
   }
   else{
   demo_up_ads.scrollTop+=14;
   }
   if(step_c_ads++<9) setTimeout("Marquee_up_ads()", 100);
   }
   setInterval("step_c_ads=0;setTimeout('Marquee_up_ads()',100)", 4000);
</script>
<%
rs_middle.close
%>