test.asp
<%
dim str1
k=0
do while k<5
str1 = str1 + "'img/pic"&k&".jpg',"
k=k+1
loop
str1=left(str1,len(str1)-1)
%>
<style>
<!--
table,TD,DIV,button,p{font-family:Tahoma;cursor:default;font-size:9pt}
body{font-family:Tahoma;background-color: #637994; font-size:9pt}
.yellow{ background-color: #E19D00; color: #FFFF00; border-left: 2 solid #FFE3A4;
border-right: 2 solid #8A6100; border-top: 2 solid #FFE3A4;
border-bottom: 2 solid #8A6100 }
.ydown{ background-color: #E19D00; color: #FFFF00; border-left: 1 solid #8A6100;
border-right: 1 solid #FFE3A4; border-top: 1 solid #8A6100;
border-bottom: 1 solid #FFE3A4}
.blue { background-color: #3A6EA5; color: #FFFFFF; border-left: 2 solid #A6C1DF;
border-right: 2 solid #002200; border-top: 2 solid #A6C1DF;
border-bottom: 2 solid #002200 }
-->
</style>
<script type="text/javascript" src="show_image.js"></script>
<SCRIPT language=javascript>
var bgimg = Array(<%=str1%>);
var ilen = bgimg.length;
var prbLoad = new Array();
for (i = 0; i < ilen; i++) {
prbLoad[i] = new Image();
prbLoad[i].src = bgimg[i];
}
//ips,psg目前无用
var csg = 0;
var ips = 12;
var psg = 0;
</SCRIPT>
<body background="images/bg1.gif" leftmargin="0" topmargin="0" marginheight="0">
<div id=up οnmοusedοwn=m("up") class=yellow style="VISIBILITY:hidden ; position: absolute; top: 6; left: 20; width: 560; height: 450; filter: revealTrans(transition=12, 'duration=0.1) blendTrans(duration=0.1)">
<div id=title οnmοusedοwn=m("up") style="padding:2px;text-indent:5;color:#FFFFFF;cursor:move">www.ztbs.cn</div>
<img id=close οnclick=Hide(up) style="position: absolute; right: 2; top: 0" border="0" src="images/close.jpg" >
<div id=img class=ydown οnmοusedοwn=m("up") style=" position: absolute; top: 20; left: 20; width: 510; height: 350;">
<img name="show_pic" src="12.jpg" width="510" height="390">
</div>
<div id=button οnmοusedοwn=m("up") style="position: absolute; top: 420; left: 250; width: 340; height: 20;"><span style="visibility: hidden">--</span><button name="button" class=yellow οnclick=Hide(up); >关闭</button>用鼠标拖动调整位置</div>
</div>
<%
i=0
do while i<5
%>
<a onClick="javascript: swbi(<%=i%>);"><img style="cursor:hand" src="img/pic<%=i%>.jpg" width="200" height="133" border="0"></a>
<%
i=i+1
loop
%>
show_image.js
var Mouse_Obj="none";
var pX
var pY
document.οnmοusemοve=D_NewMouseMove;
document.οnmοuseup=D_NewMouseUp;
function m(c_Obj)
{ Mouse_Obj=c_Obj;
pX=parseInt(document.all(Mouse_Obj).style.left)-event.x;
pY=parseInt(document.all(Mouse_Obj).style.top)-event.y; }
function D_NewMouseMove()
{if(Mouse_Obj!="none")
{document.all(Mouse_Obj).style.left=pX+event.x;
document.all(Mouse_Obj).style.top=pY+event.y;
event.returnValue=false;}}
function D_NewMouseUp()
{Mouse_Obj="none";}
function myimg()
{var o=event.srcElement;
sPop=null;
if(o.alt!=null && o.alt!=""){o.img=o.alt;o.alt="";o.title=""};
if(o.img!=sPop) {
sPop=o.img;
t=o.name;
title.innerHTML="<span style='font-family:宋体;color:yellow'>"+t+"</span>"+"51windows.com";
img.innerHTML="<p align='center'><img id=ss src="+sPop+" border=0 ></p>";
Show(up);}
}
function back()
{Hide(up);}
document.οnclick=myimg;
//显示,隐藏
function Show(divid) {
divid.style.top = document.body.scrollTop ;
divid.filters.revealTrans.apply();
divid.style.visibility = "visible";
divid.filters.revealTrans.play();
}
function Hide(divid) {
divid.filters.revealTrans.apply();
divid.style.visibility = "hidden";
divid.filters.revealTrans.play();
}
function hhide(divid) {
divid.style.visibility = "hidden";
}
//交换图片
function swbi(par){
if(par >=0 && par < ips && (par+ips*psg) < ilen){
document.images['show_pic'].src = prbLoad[par+ips*psg].src;
csg = par;
Show(up);
}
}