<%sub indextupian()
set rs = conn.execute("select top 4 tp,tpurl from indextupian where wz=2 and cang=0 order by id desc")
if not rs.eof then%><SCRIPT language="JavaScript">
var bannerAD=new Array();
var bannerADlink=new Array();
var adNum=0;
<%i=0
tp=rs(0)
do while not rs.eof
Response.Write "bannerAD["&i&"]=""image/"&rs(0)&""";"&chr(10)&""
Response.Write "bannerADlink["&i&"]="""&rs(1)&""";"&chr(10)&""
rs.movenext
i=i+1
loop%>var preloadedimages=new Array();
for (i=1;i<bannerAD.length;i++){
preloadedimages[i]=new Image();
preloadedimages[i].src=bannerAD[i];}
function setTransition(){
if (document.all){
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
bannerADrotator.filters.revealTrans.apply();}}
function playTransition(){
if (document.all)
bannerADrotator.filters.revealTrans.play()}
function nextAd(){
if(adNum<bannerAD.length-1)adNum++ ;
else adNum=0;
setTransition();
document.images.bannerADrotator.src=bannerAD[adNum];
playTransition();
theTimer=setTimeout("nextAd()", 4500);}
function jump2url(){
jumpUrl=bannerADlink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;}}
</SCRIPT>
<a href="javascript:jump2url()"><img style="FILTER: revealTrans(duration=2,transition=20)" height="200" src="<%=tp%>" width="352" border="0" name="bannerADrotator"></a><SCRIPT language=JavaScript>nextAd()</SCRIPT><%end if
rs.close
set rs=nothing
end sub%>