function zl2ty(){
  if (dispzl.className==""){
     dispzl.className="tddisp";
     dispty.className="";
   }else{
     dispzl.className="";
     dispty.className="tddisp";
   }
}

function selectmenu(thistd,myclass){
thistd.className=myclass

}

function selectmenu1(thistd,myclass){
thistd.className=myclass
}


function dispzj(){
lmsm.innerHTML=display.myzl;
 sefi.className="";
}


//0目标文件名|1原始文件名|2文件大小|3文章名|4文章ID|5文件扩展名|6相对根目录的路径|7所属文件是否被删除|8上传文件的用户|9上传的日期|10在当前面中的ID|11图片的ID
function overfile(thisfi){
    filezl=thisfi.filezl
    zl1=filezl.split("|")
    sefi.className="tddisp";
    lmsmlr="&nbsp;"+zl1[1]+"<br>&nbsp;大小:"+zl1[2]+"字节"+"<BR>&nbsp;上传:"+zl1[9]+"<br>&nbsp;来自《"+zl1[3]+"》";
    if ( zl1[5]=="JPG"|zl1[5]=="GIF"|zl1[5]=="BMP"|zl1[5]=="JPEG" ){
    lmsmlr=lmsmlr+"<br><center><img width=130 src='../"+zl1[6]+"'></center>";
    }
    lmsm.innerHTML=lmsmlr;
}

function chofi(thisfi){
    filezl=thisfi.filezl;
    zl1=filezl.split("|");
    htlr="&nbsp;选定:<br>&nbsp;"+zl1[1]+"<br>";
    if ( zl1[5]=="JPG"|zl1[5]=="GIF"|zl1[5]=="BMP"|zl1[5]=="JPEG" ){
    htlr=htlr+"<center><img width=130 src='../"+zl1[6]+"'></center>";
    }else{
    htlr=htlr+"&nbsp;文件大小:"+zl1[2]+"字节<BR>&nbsp;来自《"+zl1[3]+"》"
    }
    sefi1.value=zl1[11]
    //sefi2.value=zl1[5]
    //imgid.value=zl1[11]
    sefi.innerHTML=htlr;
   // filename.value=zl1[1];
    file_sn=dispzl.filesn;
    for (i=0;i<file_sn;i++){
      setlr="file"+i+".className='';";
      eval(setlr);
    }
    setlr="file"+zl1[10]+".className='select_file';";
     eval(setlr);

}

function nepa(paty){
  dispzl.fiexna=paty;
  if (paty==""){
  dispzl.uuser=""  ;
  }
  nepa1();
}

function dity(dit){
  dispzl.findb1="";
  dispzl.filetype=dit;
  nepa1();
}

function myda(dit){
  dispzl.uuser=dit;
  nepa1();
}

function nepa1(){
  pagesn=dispzl.filesn;
  pagetyp=dispzl.filetype;
  pageex=dispzl.fiexna;
  uup=dispzl.uuser;
  findtype=dispzl.findtype;
  findb1=dispzl.findb1;
  findkey=find_key.value;
  paurl="sysupfile/gl_dispfile.asp?findkey="+findkey+"&findtype="+findtype+"&findb1="+findb1+"&fitype="+pagetyp+"&pagesn="+pagesn+"&fiex="+pageex+"&upuser="+uup
  document.TREE.location.replace(paurl);
}

function nwindo(thisfi){
    filezl=thisfi.filezl;
    zl1=filezl.split("|");
    window.open("../"+zl1[6])
}


function sepage(pan){
dispzl.filesn=pan;
 nepa1();
}

function clear_file(){
 var paurl="sysupfile/clear_file.asp";
 document.TREE.location.replace(paurl);
}

function del_file(){
   var delid=sefi1.value
   if (delid!==""){  
   var paurl="sysupfile/del_file.asp?id="+delid+"|";
   sefi1.value="";
   document.TREE.location.replace(paurl);
   sefi.innerHTML=""
   }else{
	alert("您没有选择任何文件");
   }   
}

function del_findfile(){
   var delid=sefi2.value
   if (delid!==""){
   var paurl="sysupfile/del_file.asp?id="+delid;
   sefi2.value="";
   sefi.innerHTML="";
   sefi1.value=""
   document.TREE.location.replace(paurl);
   }else{
	alert("您没有搜索任何文件");
   }   
}


function find_file(){
  if (find_key.value==""){
     alert("请您输入搜索条件");
   }else{
  if (C1.checked){ var find1="1" } else { var find1="0" };
  if (C2.checked){ var find2="1" } else { var find2="0" };
  if (C3.checked){ var find3="1" } else { var find3="0" };
  if (C4.checked){ var find4="1" } else { var find4="0" };
  var findlr=find1+"|"+find2+"|"+find3+"|"+find4+"|";
  if (findlr=="0|0|0|0|" ){
     alert("请您至少选择一个搜索范围");
  }else{
    dispzl.findtype=findlr;
    dispzl.findb1="1";
    display.innerHTML="正在搜索,请稍候";
  nepa1();
}}}