// 文件
function UICtrlFile(CtrlInputID,CtrlName,UIName)
{
	// 被继承 而非实例化
	if(!arguments.length)
		return ;
	this.UICtrlFileConstruct(CtrlInputID,CtrlName,UIName) ;
}


UICtrlFile.prototype = new UICtrlBase() ;

UICtrlFile.prototype.UICtrlFileConstruct = function(CtrlInputID,CtrlName,UIName)
{
	this.UICtrlBaseConstruct(CtrlInputID,UIName) ;
	
	//this.FileInfo_FileName_Outer
	this.FileInfo_FileName_Outer = document.getElementById(CtrlName+'Info_FileName_Outer') ;
	this.FileInfo_FileName = document.getElementById(CtrlName+'Info_FileName') ;
	
	this.FileInfo_FileLength_Outer = document.getElementById(CtrlName+'Info_FileLength_Outer') ;
	this.FileInfo_FileLength = document.getElementById(CtrlName+'Info_FileLength') ;
	
	this.FileInfo_UploadTime_Outer = document.getElementById(CtrlName+'Info_UploadTime_Outer') ;
	this.FileInfo_UploadTime = document.getElementById(CtrlName+'Info_UploadTime') ;
	
	this.FileDelete_Outer = document.getElementById(CtrlName+'Delete_Outer') ;
	this.FileDelete = document.getElementById(CtrlName+'Delete') ;
	
	this._strFileName = '' ;
	this._strFilePath = '' ;
	this._strFileLength = '' ;
	this._strUploadTime = '' ;
}

UICtrlFile.prototype.VerifyData = function()
{
	// 由于 IE 安全限制，无法在客户端检查 文件
	return true ;
}

UICtrlFile.prototype.SetFileName = function(Value)
{
	this._strFileName = Value;
	this.FileInfo_FileName.innerHTML = Value ;
	this.FileInfo_FileName_Outer.style.display = (Value=='')? 'none': 'inline' ;
	this.FileDelete_Outer.style.display = (Value=='')? 'none': 'inline' ;
}
UICtrlFile.prototype.SetFilePath = function(Value)
{
	this._strFilePath = Value;
	this.FileInfo_FileName.href = Value ;
}
UICtrlFile.prototype.SetFileLength = function(Value)
{
	this._strFileLength = Value;
	this.FileInfo_FileLength.innerHTML = Value ;
	this.FileInfo_FileLength_Outer.style.display = (Value==''||Value=='0 Byte')? 'none': 'inline' ;
}
UICtrlFile.prototype.SetFileUploadTime = function(Value)
{
	this._strUploadTime = Value;
	this.FileInfo_UploadTime.innerHTML = Value ;
	this.FileInfo_UploadTime_Outer.style.display = (Value==0)? 'none': 'inline' ;
}
