<script language="JavaScript">
<!--
var imgWidth=64; //The images width in the imgBox;
var imgHeight=64; //The images height in the imgBox;
var selectedNo=7; //The image's No which is eslected;
var selecteSize=2; //the count of items which be show in the list;
var imgSrc="head/数字序号.gif"; //Don't Replace "数字序号" to figure;
/****** show or hide list *****/
function showlist(obj){
if(imgBox.style.pixelLeft!=-800){imgBox.style.pixelLeft=-800; return;}
var mytop=obj.offsetTop;
var myleft=obj.offsetLeft;
while(obj=obj.offsetParent){
myleft+=obj.offsetLeft;
mytop+=obj.offsetTop;
}
imgBox.style.left=myleft;
imgBox.style.top=mytop+imgHeight+2;
}
var isin=false;
function selectme(obj){
if(!isin||obj){imgBox.style.pixelLeft=-800;}
if(obj){
myform.myhead.value=imgSrc.replace("数字序号",obj.listID);
document.images["imgselected"].src=imgSrc.replace("数字序号",obj.listID);
}
}
/***** Scroll to appropriate position *****/
var mytime=setTimeout("",0);
var pre_X=0;
function scrollud(){
var current_X=imgBox.scrollTop;
if(current_X>pre_X && imgBox.scrollTop< Math.ceil(imgBox.scrollTop/imgHeight)*imgHeight){
clearTimeout(mytime);
mytime=setTimeout("imgBox.scrollTop=Math.round(imgBox.scrollTop+1);",1);
}
else if(current_X<pre_X && imgBox.scrollTop> Math.floor(imgBox.scrollTop/imgHeight)*imgHeight){
clearTimeout(mytime);
mytime=setTimeout("imgBox.scrollTop=Math.round(imgBox.scrollTop-1);",1);
}
pre_X=current_X;
}
function init(){
imgBox.scrollTop=selectedNo*imgHeight;
myform.myhead.value=imgSrc.replace("数字序号",selectedNo);
}