// JavaScript Document
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function onChange(i){
	childSort=document.all("child" + i);
	parentphoto=document.all("Parent" + i);
	if(childSort.style.display=="none"){
		parentphoto.src="images/-.gif";
		childSort.style.display="";}
	else{
		parentphoto.src="images/+.gif";
		childSort.style.display="none";}
}
function Showreply(divid){
	var nowdiv=document.getElementById("replydiv" + divid);
	if(nowdiv.style.display=="none"){
		nowdiv.style.display="block";}
	else{
		nowdiv.style.display="none";}
}
function Limitsize(Obj,MaxW,MaxH){
	var ObjID=new Image();
	ObjID.src = Obj.src;
	var w=ObjID.width
	var h=ObjID.height	
	if(w>MaxW){
		h=MaxW*ObjID.height/ObjID.width;
		w=MaxW;
	}
	if(h>MaxH){
		w=w*MaxH/h;
		h=MaxH;
	}
	Obj.width=w;
	Obj.height=h
}
function checkpagenum(obj){
	var c=0;
	if(obj.value==""){
		alert("请输入要浏览的页码数!");
		obj.focus();
		return false;
	}
	else{
		for(var j=0; j< obj.value.length; ++j){
			var c=obj.value.charCodeAt(j);			
			if(c>57||c<48){
				alert("页码数必须为数字!");
				obj.select();
				return false;
			}
		}
	}
	location.href=document.all.passstr.value+'Page='+obj.value;
}
function resizeimg(ImgD,iwidth,iheight) { 
     var image=new Image(); 
     image.src=ImgD.src; 
     if(image.width>0 && image.height>0){ 
        if(image.width/image.height>= iwidth/iheight){ 
           if(image.width>iwidth){ 
               ImgD.width=iwidth; 
               ImgD.height=(image.height*iwidth)/image.width; 
           }else{ 
                  ImgD.width=image.width; 
                  ImgD.height=image.height; 
                } 
               ImgD.alt=image.width+"×"+image.height; 
        } 
        else{ 
                if(image.height>iheight){ 
                       ImgD.height=iheight; 
                       ImgD.width=(image.width*iheight)/image.height; 
                }else{ 
                        ImgD.width=image.width; 
                        ImgD.height=image.height; 
                     } 
                ImgD.alt=image.width+"×"+image.height; 
            } 
　　　　　ImgD.style.cursor= "pointer"; //改变鼠标指针 
　　　　　ImgD.onclick = function() { window.open(this.src);} //点击打开大图片 
　　　　if (navigator.userAgent.toLowerCase().indexOf("ie") > -1) { //判断浏览器，如果是IE 
　　　　　　ImgD.title = "请使用鼠标滚轮缩放图片，点击图片可在新窗口打开"; 
　　　　　　ImgD.onmousewheel = function img_zoom() //滚轮缩放 
　　　　　 { 
　　　　　　　　　　var zoom = parseInt(this.style.zoom, 10) || 100; 
　　　　　　　　　　zoom += event.wheelDelta / 12; 
　　　　　　　　　　if (zoom> 0)　this.style.zoom = zoom + "%"; 
　　　　　　　　　　return false; 
　　　　　 } 
　　　  } else { //如果不是IE 
　　　　　　　     ImgD.title = "点击图片可在新窗口打开"; 
　　　　　　   } 
    } 
}

window.onerror=function(){return false;}
//-->