function RegisterNamespaces(){for(var C=0;C<arguments.length;C++){var D=arguments[C].split("."),A=window;for(var B=0;B<D.length;B++){if(!A[D[B]]){A[D[B]]=new Object()}A=A[D[B]]}}}RegisterNamespaces("Inpl.FileProgress");Inpl.FileProgress=function(C,A,E){this.fileProgressID=C.id;this.opacity=100;this.height=0;this.queueDisappear=E;this.fileProgressWrapper=document.getElementById(this.fileProgressID);if(!this.fileProgressWrapper){this.fileProgressWrapper=document.createElement("div");this.fileProgressWrapper.className="progressWrapper";this.fileProgressWrapper.id=this.fileProgressID;this.fileProgressElement=document.createElement("div");this.fileProgressElement.className="progressContainer";var G=document.createElement("a");G.className="progressCancel";G.href="#";G.style.visibility="hidden";G.appendChild(document.createTextNode(" "));var B=document.createElement("div");B.className="progressName";B.appendChild(document.createTextNode(C.name));var F=document.createElement("div");F.className="progressBarInProgress";var D=document.createElement("div");D.className="progressBarStatus";D.innerHTML="&nbsp;";this.fileProgressElement.appendChild(G);this.fileProgressElement.appendChild(B);this.fileProgressElement.appendChild(D);this.fileProgressElement.appendChild(F);this.fileProgressWrapper.appendChild(this.fileProgressElement);document.getElementById(A).appendChild(this.fileProgressWrapper)}else{this.fileProgressElement=this.fileProgressWrapper.firstChild;this.reset()}this.height=this.fileProgressWrapper.offsetHeight;this.setTimer(null)};Inpl.FileProgress.prototype.setTimer=function(A){this.fileProgressElement.FP_TIMER=A};Inpl.FileProgress.prototype.getTimer=function(A){return this.fileProgressElement.FP_TIMER||null};Inpl.FileProgress.prototype.reset=function(){this.fileProgressElement.className="progressContainer";this.fileProgressElement.childNodes[2].innerHTML="&nbsp;";this.fileProgressElement.childNodes[2].className="progressBarStatus";this.fileProgressElement.childNodes[3].className="progressBarInProgress";this.fileProgressElement.childNodes[3].style.width="0%";this.appear()};Inpl.FileProgress.prototype.setProgress=function(A){this.fileProgressElement.className="progressContainer green";this.fileProgressElement.childNodes[3].className="progressBarInProgress";this.fileProgressElement.childNodes[3].style.width=A+"%";this.appear()};Inpl.FileProgress.prototype.setComplete=function(){this.fileProgressElement.className="progressContainer blue";this.fileProgressElement.childNodes[3].className="progressBarComplete";this.fileProgressElement.childNodes[3].style.width="";var A=this;if(this.queueDisappear){this.setTimer(setTimeout(function(){A.disappear()},2000))}};Inpl.FileProgress.prototype.setError=function(){this.fileProgressElement.className="progressContainer red";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width="";var A=this;if(this.queueDisappear){this.setTimer(setTimeout(function(){A.disappear()},2000))}};Inpl.FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className="progressContainer";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width="";var A=this;if(this.queueDisappear){this.setTimer(setTimeout(function(){A.disappear()},1500))}};Inpl.FileProgress.prototype.setStatus=function(A){this.fileProgressElement.childNodes[2].innerHTML=A};Inpl.FileProgress.prototype.toggleCancel=function(B,C){this.fileProgressElement.childNodes[0].style.visibility=B?"visible":"hidden";if(C){var A=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){C.cancelUpload(A);return false}}};Inpl.FileProgress.prototype.appear=function(){if(this.getTimer()!==null){clearTimeout(this.getTimer());this.setTimer(null)}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity=100}catch(A){this.fileProgressWrapper.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=100)"}}else{this.fileProgressWrapper.style.opacity=1}this.fileProgressWrapper.style.height="";this.height=this.fileProgressWrapper.offsetHeight;this.opacity=100;this.fileProgressWrapper.style.display=""};Inpl.FileProgress.prototype.disappear=function(){var E=15;var C=4;var B=30;if(this.opacity>0){this.opacity-=E;if(this.opacity<0){this.opacity=0}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity=this.opacity}catch(D){this.fileProgressWrapper.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+this.opacity+")"}}else{this.fileProgressWrapper.style.opacity=this.opacity/100}}if(this.height>0){this.height-=C;if(this.height<0){this.height=0}this.fileProgressWrapper.style.height=this.height+"px"}if(this.height>0||this.opacity>0){var A=this;this.setTimer(setTimeout(function(){A.disappear()},B))}else{this.fileProgressWrapper.style.display="none";this.setTimer(null)}};