<%
sql = " SELECT  b_main_img, b_l_url, b_l_subject, b_l_win  "&_
	  "   FROM  banner2 "&_
	  "	 WHERE b_l_chk = 'Y' AND b_l_sdate <= '"&getDateFm(now,4)&"' AND b_l_edate >='"&getDateFm(now,4)&"' "&_
	  "  ORDER BY b_l_code desc "
Set Rs = Dbcon.Execute (sql)
If Not rs.eof Then
	vData = rs.getrows()
	vCnt = UBound(vData,2)
Else
	vCnt = -1
End If
rs.close : Set rs = nothing


If vCnt >-1 then

%>


								<div id="center_banner">
									<h3><div class="p_tit"><img src="/img/main/pop_tit.gif"  alt="popup zone" /></div></h3>
									<div class="banner_num">
										<ul style="float:left;">
										<% For i=1 To vCnt+1%>
											<li><a href="#popup_zone"  onmouseover="popupZoneMove(<%=i%>)" onfocus="this.onmouseover();" onmouseout="popupZoneStop(0);" onblur="this.onmouseout();"><img id="popnum<%=i%>" src="/img/main/pop_m<%=Right("0"&i,2)%>.gif" width="11" height="11" alt="<%=i%>번째 팝업" /></a></li>
										<% Next %>
										</ul>
									</div>

									<div class="pop_bt">
										<ul style="float:left;">
											<li>
												<div id="popzone_startz" style="display:none;">
													<a href="#stoppopup" onclick="popupZoneStop2('s');" onkeypress="popupZoneStop2('s');" ><img src="/img/main/pop_play.gif " width="40" height="11" alt="시작"/></a>
												</div>
												
												<div id="popzone_stopz" style="display:block;">
													<a href="#startpopup" onclick="popupZoneStop2('p');" onkeypress="popupZoneStop2('p');" ><img src="/img/main/pop_stop.gif  " width="40" height="11" alt="정지"/></a>
												</div>
												
											</li>
										</ul>
									</div>

									

									<div class="banner_roll">

									<%
										For i=1 To vCnt+1

											b_main_img = vData(0,i-1)
											b_l_url = vData(1,i-1)
											b_l_subject = vData(2,i-1)
											b_l_win = vData(3,i-1)

											If i = 1 then
												mf_display = "disblock"
											else
												mf_display = "disnone"
											End if

											strwin=""
											if b_l_win="1" then
												strwin = "target='_blank'"
											End if
									
									%>

										<div id="popBanner_<%=i%>" class="<%=mf_display%>"><a href="<%=b_l_url%>" <%=strwin%> ><img  src="/data/banner2/<%=b_main_img%>" width="267" height="99" alt="<%=b_l_subject%>" /></a></div>

									<% Next %>
										
									</div>
								</div>

								
								<script type="text/javascript">
								<!--
									var popupItemCount = <%=vCnt+1%>
									var popupZoneVal = 0;
									var popupZoneTmpVal = 0;
									var autocontrolvar;
								//-->
								</script>
								<script type="text/javascript">popupZone();</script>

<%
End if
%>