function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
<!--
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  if ((obj=MM_findObj(args[i]))!=null) 
  { 
     v=args[i+2];
     if (obj.style) 
     { 
	 obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; 
	 }
     obj.visibility=v; 
	 
   }	
}

//阻止事件冒泡函数
function stopBubble(e)
{
    if (e && e.stopPropagation)
        e.stopPropagation()
    else
        window.event.cancelBubble=true
}




var oldId;
function MovAndMout(newId)
{
	if( oldId!=null)
    {
	  document.getElementById(oldId).style.display="block";
	  document.getElementById(oldId+'_o').style.display="none";
	}	
	document.getElementById(newId).style.display="none";
	document.getElementById(newId+'_o').style.display="block";
	oldId = newId;
}

function bbimg(o){
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
return false;
}


function addFavorite(){ 
	var aUrls=document.URL.split("/"); 
	var vDomainName="http://"+aUrls[2]+"/"; 
	var description=document.title; 
	try{//IE 
		window.external.AddFavorite(vDomainName,description); 
	}catch(e){//FF 
		window.sidebar.addPanel(description,vDomainName,""); 
	} 
} 

function CopyURL(){
	var myHerf=location.href;
	var title=document.title;	
	if(window.clipboardData){
		var tempCurLink=title + "\n" + myHerf;
		var ok=window.clipboardData.setData("Text",tempCurLink);
		if(ok) alert("帖子标题和链接已复制，您可以转发给QQ/MSN上的好友了。");
	}
	else{alert("您使用的浏览器不支持复制功能，请使用Ctrl+C或鼠标右键在浏览器地址栏复制帖子链接。");}
}


clickMenu = function(share) {
	var getEls = document.getElementById(share).getElementsByTagName("li");
	var getAgn = getEls;
	for (var i=0; i<getEls.length; i++) {
		getEls[i].onmouseover=function() {
			this.className+="shownav";				
		}
		getEls[i].onmouseout=function() {
			this.className=this.className.replace("shownav", "");			
		}
	}
}

function show(id){
	if(id = document.getElementById(id)){
		if(id.style.display == "block"){
			id.style.display = "none";
		}else{
			id.style.display = "block";
		}
	}
}

/*  
             *特别注意:  
             *放大的倍数=原图的大小/小图片显示的大小  
             *自己查看原图片的大小，我这是 400*400 px  
             */  
  
            //图片对象   
            var imgObj;   
            //放大镜div对象   
            var zoomDivObj;   
            //显示小图片的div   
            var mainDivObj;   
            //放大后显示图片的div   
            var showDivObj;   
            //放大镜的大小   
            var zoomSize=100;   
            //放大镜的倍数(不能随便填)   
            var zoomMultiple=2;   
            //图片的路径   
            var imgPath="http://www.ceppbooks.sgcc.com.cn/bookpic_big/";   
			 //图片的路径   
            var imgPath1="http://www.ceppbooks.sgcc.com.cn/bookpic/";
            //小图片显示的大小   
            var imgW=200;   
            var imgH=200;   
            //显示的位置   
            var left=280;   
            var top=235;   
            //放大镜div的透明度(0~100)   
            var opacity=50;   
            //放大镜div的颜色   
            var rgb="223,223,223";

        function load()   
            {   
			clickMenu('share');			
			
                if(zoomDivObj==null)   
                    createZoomDivObj();   
                if(mainDivObj==null)   
                    createMainDivObj();   
                if(showDivObj==null)   
                    createShowDivObj();   
                if(imgObj==null)   
                    createImgObj();   
  
                zoomDivObj.style.width=zoomSize+"px";   
                zoomDivObj.style.height=zoomSize+"px";   
  
                showDivObj.style.width=zoomSize*zoomMultiple*2+"px";   
                showDivObj.style.height=zoomSize*zoomMultiple*2+"px";   
  
                //showDivObj.style.backgroundImage="url("+imgPath+showDivObj.style.backgroundImage+")";   
  
                //imgObj.src=imgPath1;   
                //imgObj.style.width=imgW+"px";   
                //imgObj.style.height=imgH+"px";   
  
                mainDivObj.style.width=imgW+"px";   
                mainDivObj.style.height=imgH+"px";   
                //mainDivObj.style.left=left+"px";   
                //mainDivObj.style.top=top+"px";   
  
                var hh=0;
				var zz=screen.width/screen.height;
				if(zz<1.4)
				hh=30;
				else if(zz<1.61)
				hh=80;
				else if(zz<1.7)
				hh=150;
				else
				hh=220;
				
				
                showDivObj.style.left=left+imgW+hh+"px";  
                showDivObj.style.top=top+"px";   
  
                zoomDivObj.style.backgroundColor="rgb("+rgb+")";   
                   
                //两个都要写，为了IE 和 火狐 的通用   
                zoomDivObj.style.filter="alpha(opacity="+opacity+")";   
                zoomDivObj.style.opacity=opacity/100; 	
				
				
            }   
  
            function showZoomDiv()   
            {  			   
                if(zoomDivObj==null)   
                    createZoomDivObj();   
  
                zoomDivObj.style.visibility="visible";  
				
				if(showDivObj==null)
				createShowDivObj(); 
				
				showDivObj.style.visibility="visible"; 
            }   
               
            function moveZoomDiv(e)   
            {   
                if(zoomDivObj==null)   
                    createZoomDivObj();   
  
                 var w=zoomDivObj.style.width.replace("px","")-0;   
                var h=zoomDivObj.style.height.replace("px","")-0;    
                   
                if(mainDivObj==null)   
                    createMainDivObj();   
  
                var mouseX=e.clientX-(document.body.offsetWidth/2-left);   
               var mouseY=e.clientY-(top-document.body.scrollTop);   
				
                   
                window.status=mouseX+"    "+mouseY;   
  
                zoomDivObj.style.left=mouseX-(w/2)+"px";   
                zoomDivObj.style.top=mouseY-(h/2)+"px";   
  
                if(showDivObj==null)   
                    createShowDivObj();   
                   
                showDivObj.style.backgroundPosition=(-mouseX+w/2)*zoomMultiple+"px "+(-mouseY+h/2)*zoomMultiple+"px"; 
				
				
            }   
  
            function hiddenZoomDiv()   
            {   
                if(zoomDivObj==null)   
                    createZoomDivObj();   
  
                zoomDivObj.style.visibility="hidden"; 
				
				if(showDivObj==null)
				createShowDivObj(); 
				
				showDivObj.style.visibility="hidden"; 				
            }   
  
            function createZoomDivObj()   
            {   
                zoomDivObj=document.getElementById("zoom_div_id");   
            }   
  
            function createMainDivObj()   
            {   
                mainDivObj=document.getElementById("main_div_id");   
            }   
  
            function createShowDivObj()   
            {   
                showDivObj=document.getElementById("show_div_id");   
            }   
  
            function createImgObj()   
            {   
                imgObj=document.getElementById("img_id");   
            }		

