function FileProgress(e,s){this.fileProgressID=e.id;this.opacity=100;this.height=0;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 r=document.createElement("a");r.className="progressCancel";r.href="#";r.style.visibility="hidden";r.appendChild(document.createTextNode(" "));var i=document.createElement("div");i.className="progressName";i.appendChild(document.createTextNode(e.name));var t=document.createElement("div");t.className="progressBarInProgress";var o=document.createElement("div");o.className="progressBarStatus";o.innerHTML="&nbsp;";this.fileProgressElement.appendChild(r);this.fileProgressElement.appendChild(i);this.fileProgressElement.appendChild(o);this.fileProgressElement.appendChild(t);this.fileProgressWrapper.appendChild(this.fileProgressElement);document.getElementById(s).appendChild(this.fileProgressWrapper)}else{this.fileProgressElement=this.fileProgressWrapper.firstChild;this.reset()}this.height=this.fileProgressWrapper.offsetHeight;this.setTimer(null)}FileProgress.prototype.setTimer=function(e){this.fileProgressElement["FP_TIMER"]=e};FileProgress.prototype.getTimer=function(e){return this.fileProgressElement["FP_TIMER"]||null};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()};FileProgress.prototype.setProgress=function(e){this.fileProgressElement.className="progressContainer green";this.fileProgressElement.childNodes[3].className="progressBarInProgress";this.fileProgressElement.childNodes[3].style.width=e+"%";this.appear()};FileProgress.prototype.setComplete=function(){this.fileProgressElement.className="progressContainer blue";this.fileProgressElement.childNodes[3].className="progressBarComplete";this.fileProgressElement.childNodes[3].style.width="";var e=this;this.setTimer(setTimeout(function(){e.disappear()},5e3))};FileProgress.prototype.setError=function(){this.fileProgressElement.className="progressContainer red";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width="";var e=this;this.setTimer(setTimeout(function(){e.disappear()},5e3))};FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className="progressContainer";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width="";var e=this;this.setTimer(setTimeout(function(){e.disappear();$("#progress-stats").addClass("no-display")},1300))};FileProgress.prototype.setStatus=function(e){this.fileProgressElement.childNodes[2].innerHTML=e};FileProgress.prototype.toggleCancel=function(e,s){this.fileProgressElement.childNodes[0].style.visibility=e?"visible":"hidden";if(s){var r=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){s.cancelUpload(r);return false}}};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(e){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=""};FileProgress.prototype.disappear=function(){var e=15;var s=4;var r=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(e){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-=s;if(this.height<0){this.height=0}this.fileProgressWrapper.style.height=this.height+"px"}if(this.height>0||this.opacity>0){var i=this;this.setTimer(setTimeout(function(){i.disappear()},r))}else{this.fileProgressWrapper.style.display="none";this.setTimer(null)}};