// JScript 文件

//隐藏显示左边的模块菜单
 var screen=true;i=0;width=0;
    function shiftwindow(){
     if(screen==false){
	window.parent.parent.mainFrame.cols='156,10,*';
	screen=true;}		
	else if(screen==true){
	window.parent.parent.mainFrame.cols='0,10,*';
	screen=false;}
	}
	 function shiftwindow2()	{		 	 
  //  var screen=true;i=0;width=0;
	if(screen==false){
			window.parent.mainFrame.cols='156,10,*';
			screen=true;		
		}
		else if(screen==true){		
			window.parent.mainFrame.cols='0,10,*';
			screen=false;	
		}
	}
	//还原显示左边的菜单
	function showmenu(){
        screen=false;//i=0;width=0;
        if(screen==false){
	        window.parent.parent.mainFrame.cols='156,10,*';
	        screen=true;
	    }		
	    else if(screen==true){
	        window.parent.parent.mainFrame.cols='0,10,*';
	        screen=false;
	    }
	}
	
	//控制发表评论的显示
var MORE_STATUS2 = true;
function pspl(){
	var pl = document.getElementById("pl2");

	if(MORE_STATUS2){
		pl.style.display = "block";
		MORE_STATUS2 = false;
	}else {
		pl.style.display = "none";
		MORE_STATUS2 = true;
	}
}
function seepl(){
	var pl = document.getElementById("pl3");

	if(MORE_STATUS2){
		pl.style.display = "block";
		MORE_STATUS2 = false;
	}else {
		pl.style.display = "none";
		MORE_STATUS2 = true;
	}
}


function show(num,btn,div,off,on,id,tag){
	        var btn=btn;
			var div=div;
			var off=off;
			var on=on;
			var id=id;
			var tag=tag;
			var total=1;
			var c = document.getElementById(id).getElementsByTagName(tag);
                  for(var i = 0;i < c.length;i++){
                      //if(c[i].name=btn){
                          total++;
                       // }
                      }	
	        var b = document.getElementsByTagName("*")
			for (j=1; j<=total; j++){
				if(document.getElementById(btn+j)!=null){
			b[btn+j].className=off;
				}
				if(div!=""){
			if(document.getElementById(div+j)!=null){
            b[div+j].style.display="none";
										}
				}
				if (j==num){
					if(document.getElementById(btn+j)!=null){
				b[btn+j].className=on;
					}
					if(div!=""){
				if(document.getElementById(div+j)!=null){
				b[div+j].style.display="block";
				}
					}
				}
			}
}

function hid(div){
	      var div=document.getElementById(div);
		  div.style.display="none"
}
function blo(div){
	      var div=document.getElementById(div);
		  div.style.display="block"
}
function disp(div){
	    var div=document.getElementById(div);
		if(div.style.display=="none"){
			div.style.display="block";
		}else{
			div.style.display="none"
		}
}

function show_search(num){
	     var num=num;
	     show(num,'st','sd','','index_search_on','search_btn','td');
}