function NCSProgressbar3(uid,objectID,nWidth,nHeight,nIncrements,bUseLabels,sLeftLabel,nLeftLabelWidth,nPercentCompleteLabelWidth){if(arguments.length>0){this.init(uid,objectID);}this.outerDivID=uid+"_outerDivID";this.innerDivID=uid+"_innerDivID";this.percentCompleteLabelID=uid+"_percentCompleteLabelID";this.progress=0;this.nWidth=nWidth;this.nHeight=nHeight;this.nLeftLabelWidth=(nLeftLabelWidth?nLeftLabelWidth:Math.floor(0.4*this.nWidth));this.nPercentCompleteLabelWidth=(nPercentCompleteLabelWidth?nPercentCompleteLabelWidth:Math.floor(0.2*this.nWidth));this.progressCompleteColor="#FF0000";this.progressIncompleteColor="#00FF00";this.backgroundColor="transparent";this.nCustomBorderWidth=0;this.nBuffer=10;if(sLeftLabel!=null)this.sLeftLabel=sLeftLabel;if(bUseLabels!=null)this.percentCompleteLabel=bUseLabels;this.nProgressWidth=this.nWidth-this.nBuffer-(this.percentCompleteLabel?this.nPercentCompleteLabelWidth:0)-(this.sLeftLabel?this.nLeftLabelWidth:0);this.nIncrements=(nIncrements?nIncrements:1);this.nIncrementSpacing=((nIncrements==1)?0:2);this.nIncrementWidth=Math.floor(this.nProgressWidth/this.nIncrements-this.nIncrementSpacing);if(this.nIncrementWidth<2)this.nIncrementWidth=2;if(objectID!=null){this.build();}}function NCSProgressbar3_Build(){var bro=(navigator.userAgent.indexOf("MSIE")!=-1)?4:2;var bbp=this.nHeight;var text="";text+='<div style="padding:0px;margin:0px;border:0px;overflow:auto;width:'+this.nWidth+';">';if(this.sLeftLabel!=null||this.percentCompleteLabel==true){if(this.sLeftLabel!=null)text+='<div style="width:'+this.nLeftLabelWidth+'px;margin:0px;padding-top:0px;padding-bottom:0px;padding-right:5px;padding-left:0px;position:relative;float:left;"><input value="'+this.sLeftLabel+'" type="text" readonly=true style="BACKGROUND-COLOR: transparent;width:100%;border:0; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none;text-align:right;font-size:11px;"></div>'}text+='<div id="'+this.outerDivID+'" style="width:'+((this.nIncrements>1)?this.nIncrements*(this.nIncrementWidth+this.nIncrementSpacing):0)+';position:relative;float:left;visibility:visible;background-color:'+this.backgroundColor+'; height:'+bbp+'px; border: '+this.nCustomBorderWidth+'px solid">';for(var i=0;i<this.nIncrements;i++){text+='<div id="'+this.innerDivID+i+'" style="position:absolute; top:2px; left:'+((i>0)?i*(this.nIncrementWidth+this.nIncrementSpacing):0)+'px; width:'+this.nIncrementWidth+'px; height:'+(bbp-bro)+'px; background-color:'+this.progressIncompleteColor+'; font-size:0px; "></div>'}text+='</div>';if(this.sLeftLabel!=null||this.percentCompleteLabel==true){if(this.percentCompleteLabel==true)text+='<div style="width:'+this.nPercentCompleteLabelWidth+'px;margin:0px;padding-top:0px;padding-bottom:0px;padding-right:0px;padding-left:5px;position:relative;float:left;"><input type="text" readonly=true style="BACKGROUND-COLOR: transparent; width:100%;padding:0px;margin:0px;border:0px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none;font-size:11px;" id='+this.percentCompleteLabelID+'></div>'}text+='</div>';if(this.element){this.element.innerHTML=text}else{return text}}function NCSProgressbar3_SetProgressCompleteColor(color){this.progressCompleteColor=color}function NCSProgressbar3_SetProgressIncompleteColor(color){this.progressIncompleteColor=color}function NCSProgressbar3_SetBackgroundColor(color){this.backgroundColor=color}function NCSProgressbar3_SetProgress(value){if(value<0)value=0;if(value>100)value=100;if(this.nIncrements==1){document.getElementById(this.innerDivID+0).style.width=value+'%'}else{var brp=(value*this.nIncrements/100)-1;for(var i=0;i<this.nIncrements;i++){document.getElementById(this.innerDivID+i).style.backgroundColor=((brp>=i)?this.progressCompleteColor:this.progressIncompleteColor);}}if(this.percentCompleteLabel==true){document.getElementById(this.percentCompleteLabelID).value=value+'%'}}NCSProgressbar3.prototype=new NCSControl();NCSProgressbar3.prototype.constructor=NCSProgressbar3;NCSProgressbar3.superclass=NCSControl.prototype;NCSProgressbar3.prototype.build=NCSProgressbar3_Build;NCSProgressbar3.prototype.setProgress=NCSProgressbar3_SetProgress;NCSProgressbar3.prototype.setProgressCompleteColor=NCSProgressbar3_SetProgressCompleteColor;NCSProgressbar3.prototype.setProgressIncompleteColor=NCSProgressbar3_SetProgressIncompleteColor;NCSProgressbar3.prototype.setBackgroundColor=NCSProgressbar3_SetBackgroundColor;