
function hiddenContent(){}

//-- ------ #On tab ------ --
function onTab(pIndex){
	document.getElementById("Tab0").className="Tab0";
	document.getElementById("Panel0").className="DHidden";
	document.getElementById("Tab1").className="Tab0";
	document.getElementById("Panel1").className="DHidden";
	
	document.getElementById("Tab"+pIndex).className="Tab1";
	document.getElementById("Panel"+pIndex).className="File";
}
//-- ------ #Add uploadfile box ------ --
function addUpBox(){
	var tmpTable=document.getElementById("upBoxTab");
	
	var tmpTR=tmpTable.insertRow(-1);
	var tmpINT=tmpTable.rows.length-1;
	
	tmpTable.rows[tmpINT].insertCell(-1);
	tmpTable.rows[tmpINT].cells[0].innerHTML="<input id=\"FileTxt"+tmpINT+"\" name=\"FileTxt[]\" type=\"file\" class=\"Upload0\" />";
	tmpTable.rows[tmpINT].insertCell(-1);
	tmpTable.rows[tmpINT].cells[1].innerHTML="<a href=\"#UploadfileFlag\" class=\"FBlue1 Link1\" onclick=\"addUpBox();\"><span class=\"FStrong\">+</span> 添加输入框</a>";
	
	document.getElementById("FileTxtCount").value=tmpTable.rows.length;
}
//-- ------ #Show detail ------ --
function showDetail(pLink){
	var Coun0=0;
	var tmpSTR0="设置上传图片属性 &gt;&gt;";
	var tmpSTR1="隐藏详细设置 &lt;&lt;";
	while(Coun0<6){
		if(pLink.innerHTML==tmpSTR0){
			document.getElementById("PanelRow"+Coun0).className="";
		}else{
			document.getElementById("PanelRow"+Coun0).className="DHidden";
		}
		Coun0++;
	}
	if(pLink.innerHTML==tmpSTR0){
		pLink.innerHTML=tmpSTR1;
	}else{
		pLink.innerHTML=tmpSTR0;
	}
}
//-- ------ #Copy flip ------ --
function copyClip(pFilePath){
	window.clipboardData.setData("Text",pFilePath);
	alert("文件路径已保存到剪切板");
}
//-- ------ #Select all ------ --
function FSelectAll(){
	var tmpElement0=document.getElementById(sysForm);
	var tmpChecked=true;
	if(tmpElement0.FileCheckbox==undefined){return;}
	if(tmpElement0.FileCheckbox.length<1){return;}
	if(tmpElement0.FileCheckbox[0].checked){tmpChecked=false;}

	var Coun0=0;
	while(tmpElement0.FileCheckbox.length>Coun0){
		tmpElement0.FileCheckbox[Coun0].checked=tmpChecked;
		Coun0++;
	}
}
function FUSelectAll(){
	var tmpElement0=document.getElementById(sysForm);
	
	var Coun0=0;
	while(tmpElement0.FileCheckbox.length>Coun0){
		if(tmpElement0.FileCheckbox[Coun0].checked){
			tmpElement0.FileCheckbox[Coun0].checked=false;
		}else{
			tmpElement0.FileCheckbox[Coun0].checked=true;
		}
		Coun0++;
	}
}

//-- ------ #Delete ------ --
function UDelete(pPage,pFileName){
	var tmpSTR="";
	var tmpElement0=document.getElementById(sysForm);
	
	if(pFileName==''){
		var Coun0=0;
		while(tmpElement0.FileCheckbox.length>Coun0){
			tmpSTR+=tmpElement0.FileCheckbox[Coun0].value+sysSPLIT5;
			Coun0++;
		}
	}else{
		tmpSTR+=pFileName+sysSPLIT5;
	}

	if(confirm("您确定要删除所选文件吗?")){
		window.location=pPage+"?ActionType=UDelete&UDelete="+tmpSTR;
	}
}

function UDeleteDir(pPage){
	if(confirm("您确定要删除所在目录吗?")){
		window.location=pPage+"?ActionType=UDeleteDir";
	}
}
//-- ------ #OnFilter ------ --
function OnFilter(pPage){
	window.location=pPage+"?FFilename="+document.getElementById("FFilenameTxt").value+
		"&FFiletype="+document.getElementById("FFiletypeTxt").value+
		"&FFilemaxsize="+document.getElementById("FFilemaxsizeTxt").value+
		"&FFilemixsize="+document.getElementById("FFilemixsizeTxt").value+
		"&FFilestartdate="+document.getElementById("FFilestartdateTxt").value+
		"&FFileenddate="+document.getElementById("FFileenddateTxt").value;
}

//------------ UAjaxDirectory ------------ ------------ ------------ ------------ 
var sysNowPanel;
function UOpenDir(pPage,pNowDirectory,pElement){
	var tmpFlag="UAjaxDirectory";
	var tmpCallBack="UOpenDirectoryCallBack()";
	var tmpURL=pPage+"?ActionType="+tmpFlag+"&"+tmpFlag+"="+pNowDirectory;
	
	sysNowPanel=pElement;
	var tmpSTR=sysNowPanel.childNodes[0].childNodes[0].childNodes[0].src;
	tmpSTR=tmpSTR.split("netsFile/")[1];
	//
	if(tmpSTR=="Img/a2.jpg" || tmpSTR=="Img/a2a.jpg"){
		sysNowPanel.childNodes[1].className="CeLeft5";
		if(sysNowPanel.childNodes[1].innerHTML==""){
			//window.open(tmpURL,"_blank");
			snetsAjax.sFlag=tmpFlag;
			snetsAjax.sendRequestSp(tmpURL,tmpCallBack);
		}
		if(tmpSTR=="Img/a2.jpg"){
			sysNowPanel.childNodes[0].childNodes[0].childNodes[0].src="Img/a1.jpg";
		}else if(tmpSTR=="Img/a2a.jpg"){
			sysNowPanel.childNodes[0].childNodes[0].childNodes[0].src="Img/a1a.jpg";
		}
	}else if(tmpSTR=="Img/a1.jpg" || tmpSTR=="Img/a1a.jpg"){
		sysNowPanel.childNodes[1].className="DHidden";
		if(tmpSTR=="Img/a1.jpg"){
			sysNowPanel.childNodes[0].childNodes[0].childNodes[0].src="Img/a2.jpg";
		}else if(tmpSTR=="Img/a1a.jpg"){
			sysNowPanel.childNodes[0].childNodes[0].childNodes[0].src="Img/a2a.jpg";
		}
	}
}
function UOpenDirectoryCallBack(){
	var tmpHttpRequest=snetsAjax.sHttpRequests;
	//ShowLoading(0);
	//alert(sHttpRequest.responseText);
	if(tmpHttpRequest.readyState==4){
		var tmpData=snetsAjax.getDataByFlag(tmpHttpRequest.responseText,snetsAjax.sFlag);
		if(tmpData.indexOf("sendRequestBase")>=0 && tmpData!="<!--sendRequestBase-->"){
			sysNowPanel.childNodes[1].innerHTML=tmpData;
		}else{}
		//ShowLoading(1);
	}
}

