if (document.URL.indexOf("\\"))
{
	var url = document.URL.split('\\');
}
if(document.URL.indexOf("\\")==-1){
	var url = document.URL.split('/');
}

var bid = url[url.length-2];
var _now = url[url.length-1].split('.')[0];

var prefile = -1;
var nextfile= -1;
var _file = new Array;
var i;
var icunt=0;
for(i=0;i<zfile.length-1;i++){
	if(zfile[i]=="__"){
		i+=1;
	}else{
		_file[icunt]=zfile[i];icunt++
	}
}
for(i=0;i<_file.length;i++){
	if(_file[i].toLowerCase()==_now)break;
}
if(i!=0)prefile=_file[i-2];
if(i!=_file.length-2)nextfile=_file[i+2];
///////////////////////////////////
function MouseFlip(){
	if(prefile != -1)document.write("<A href="+prefile+".htm><font color='#FF6699'>上一页(←方向键)</font></A>");
	if (document.URL.indexOf("xhsd.net") != -1) {
		document.write('<A href="'+_website_main+'/index.php?controller=f_catalog&action=index&bid='+_bid+'" target="_top" title="'+document.title+'">  回目录  </A>');
	}
	if (document.URL.indexOf("269.net") != -1) {
		document.write('<A href="http://book.269.net/?controller=f_catalog&action=index&bid='+_bid+'" target="_top" title="javascript:document.write(document.title);">  回目录  </A>');
	}
	if (document.URL.indexOf("xaonline.com") != -1) {
		document.write('<A href="http://book.xaonline.com/?controller=f_catalog&action=index&bid='+_bid+'" target="_top" title="javascript:document.write(document.title);">  回目录  </A>');
	}
	if(nextfile != -1)document.write("<A href="+nextfile+".htm><font color='#FF6699'>(方向键→)下一页</font></A>");
}

//////////////////////////////////
function KeyFlip(){
	if (event.keyCode==37){
		if(prefile!=-1)location=prefile+".htm"
	}
	if (event.keyCode==39){
		if(nextfile!=-1)location=nextfile+".htm"
	}
	if (event.keyCode==13)location="http://www.xhsd.net/bookmenu.php?bid="+_bid
}

///////////////////////////////////
	  var mousey, currentpos, timer;
      function currentmousey() {
       mousey = window.event.y;

      //得到鼠标在网页中的Y坐标，请注意 event 的大小写

      }
      function initialize(){
      timer = setTimeout("scrollwindow()",mousey/2);
	  //document.body.style.cursor="hand";
      //用鼠标在网页中的Y坐标来决定执行scrollwindow()函数的频率，从而动态改变网页的滚动速度

      }
      function stopscroll(){
       clearInterval(timer);
	   //document.body.style.cursor="";
      }
      function scrollwindow(){
      currentpos = document.body.scrollTop;
      window.scroll(0,++currentpos);
      if (currentpos != document.body.scrollTop){
      stopscroll();
      }else{
      initialize();
      }
      }
      document.ondblclick = initialize;
      document.onmousedown = stopscroll;
      document.onmousemove = currentmousey;
	  document.onkeydown=KeyFlip;

      //当在网页上触了鼠标的移动事件，就运行currentmousey函数