var FadeManager=new function(){
var _1=[];
this.startFadeIn=function(_2,_3,_4,_5,_6){
this.create(_2);
_1[_2].startFadeIn(_3,_4,_5,_6);
};
this.startFadeOut=function(_7,_8,_9,_a){
this.create(_7);
_1[_7].startFadeOut(_8,_9,_a);
};
this.fadeIn=function(_b){
this.create(_b);
_1[_b].fadeIn();
};
this.fadeOut=function(_c){
this.create(_c);
_1[_c].fadeOut();
};
this.create=function(_d){
if(!_1[_d]){
_1[_d]=new Fader(_d);
}
};
};
var YFTManager=new function(){
var _e=[];
this.showYellow=function(_f,_10){
this.create(_f);
_e[_f].showYellow(_10);
};
this.hideYellow=function(_11){
this.create(_11);
_e[_11].hideYellow();
};
this.create=function(_12){
if(!_e[_12]){
_e[_12]=new YFT(_12);
}
};
};
var BlinkManager=new function(){
var _13=[];
this.startBlink=function(_14,_15,_16,_17,_18,_19){
if(_18==null){
_18=75;
}
if(_19==null){
_19=0.5;
}
this.create(_14);
_13[_14].startBlink(_15,_16,_17,_18,_19);
};
this.stopBlink=function(_1a){
this.create(_1a);
_13[_1a].stopBlink();
};
this.create=function(_1b){
if(!_13[_1b]){
_13[_1b]=new Blink(_1b);
}
};
this.toggleBlink=function(_1c){
this.create(_1c);
_13[_1c].toggleBlink();
};
};
function Blink(_1d){
var _1e=_1d;
var _1f=document.createElement("div");
var _20=0;
var _21=-1;
_1f.style.position="absolute";
_1f.style.overflow="hidden";
_1f.style.display="none";
_1f.style.zIndex=15;
document.body.appendChild(_1f);
this.startBlink=function(_22,_23,_24,_25,_26){
if(_24<=0||_25<=0){
return;
}
var _27=_22.offsetHeight;
var _28=_22.offsetWidth;
var _29=calculateOffset(_22,"offsetTop");
var _2a=calculateOffset(_22,"offsetLeft");
if(!_27&&!_28&&_22.tagName.toLowerCase()=="tr"){
var _2b=_22.cells;
if(_2b.length){
_2a=calculateOffset(_2b[0],"offsetLeft");
for(var ix=0;ix<_2b.length;ix++){
_28+=_2b[ix].offsetWidth;
if(_2b[ix].offsetHeight>_27){
_27=_2b[ix].offsetHeight;
_29=calculateOffset(_2b[ix],"offsetTop");
}
}
}
}
_1f.style.top=_29+"px";
_1f.style.left=_2a+"px";
_1f.style.height=_27+"px";
_1f.style.width=_28+"px";
_1f.style.backgroundColor=_23;
setOpacity(_1f,_26);
this.cMsPerBlink=_25;
this.cBlinks=_24;
this.toggleBlink();
};
this.toggleBlink=function(){
if(this.cBlinks<=0){
this.stopBlink();
return;
}
if(_1f.style.display=="none"){
_1f.style.display="inline";
this.cBlinks--;
}else{
_1f.style.display="none";
}
setTimeout("BlinkManager.toggleBlink(\""+_1e+"\")",this.cMsPerBlink);
};
this.stopBlink=function(){
_20=0;
_21=-1;
_1f.style.display="none";
};
}
function YFT(_2d){
var _2e=_2d+"YFT";
var _2f=document.createElement("div");
_2f.style.position="absolute";
_2f.style.overflow="hidden";
_2f.style.padding="0px";
_2f.style.backgroundColor="#FFFF99";
_2f.style.display="none";
this.showYellow=function(_30){
var _31=_30.offsetHeight;
var _32=_30.offsetWidth;
var _33=calculateOffset(_30,"offsetTop",true);
var _34=calculateOffset(_30,"offsetLeft",true);
var _35=_30;
while(matchesTagName(_35,"(tr)|(td)|(tbody)")&&_35.parentNode){
_35=_35.parentNode;
}
if(!_31&&!_32&&_30.tagName.toLowerCase()=="tr"){
var _36=_30.cells;
if(_36.length){
_34=calculateOffset(_36[0],"offsetLeft",true);
for(var ix=0;ix<_36.length;ix++){
_32+=_36[ix].offsetWidth;
if(_36[ix].offsetHeight>_31){
_31=_36[ix].offsetHeight;
_33=calculateOffset(_36[ix],"offsetTop",true);
}
}
}
}
_2f.style.top=_33+"px";
_2f.style.left=_34+"px";
_2f.style.height=_31+"px";
_2f.style.width=_32+"px";
if(_35.parentNode&&!isInDOM(_2f)){
_35.parentNode.insertBefore(_2f,_35);
}
FadeManager.startFadeOut(_2e,_2f,null,true);
};
this.hideYellow=function(){
_2f.style.display="none";
};
}
var ShadowManager=new function(){
var _38=[];
this.oProtoShadowBottomContainer=null;
this.oProtoShadowBottom=null;
this.oProtoShadowRightContainer=null;
this.oProtoShadowRight=null;
this.oProtoShadowBRCornerContainer=null;
this.oProtoShadowBRCorner=null;
this.oProtoShadowBRCornerSmContainer=null;
this.oProtoShadowBRCornerSm=null;
this.oProtoShadowURCornerContainer=null;
this.oProtoShadowURCorner=null;
this.oProtoShadowBLCornerContainer=null;
this.oProtoShadowBLCorner=null;
this.applyShadow=function(_39,_3a,_3b,_3c){
this.create(_39);
_38[_39].applyShadow(_3a,_3b,_3c);
};
this.applySmallShadow=function(_3d,_3e,_3f,_40){
this.create(_3d);
_38[_3d].applyShadow(_3e,_3f,_40,true);
};
this.applyRelativeShadow=function(_41,el){
var _43=getAbsolutePosition(el);
this.applyShadow(_41,_43.x,_43.y,el);
};
this.fixShadow=function(_44){
if(_38[_44]){
_38[_44].fixShadow();
}
};
this.hideShadow=function(_45){
this.create(_45);
_38[_45].hideShadow();
};
this.hideAllShadows=function(){
for(var _46 in _38){
if(_38[_46]&&_38[_46].hideShadow){
_38[_46].hideShadow();
}
}
};
this.positionShadow=function(_47,_48,_49,_4a){
this.create(_47);
_38[_47].positionShadow(_48,_49,_4a);
};
this.create=function(_4b){
if(!_38[_4b]){
_38[_4b]=new Shadow(_4b);
}
};
this.createShadowElements=function(sId){
var _4d=document.createElement("div");
var _4e=document.createElement("img");
_4d.id=sId+"Container";
_4d.className="dropShadowContainer";
_4d.style.display="none";
_4e.id=sId;
_4d.appendChild(_4e);
this["oProto"+capitalize(sId)+"Container"]=_4d;
this["oProto"+capitalize(sId)]=_4e;
document.body.insertBefore(_4d,document.body.firstChild);
};
this.init=function(){
if(!this.oProtoShadowBottom||!this.oProtoShadowBottomContainer){
this.createShadowElements("shadowBottom");
}
if(!this.oProtoShadowRight||!this.oProtoShadowRightContainer){
this.createShadowElements("shadowRight");
}
if(!this.oProtoShadowBRCorner||!this.oProtoShadowBRCornerContainer){
this.createShadowElements("shadowBRCorner");
}
if(!this.oProtoShadowBRCorner||!this.oProtoShadowBRCornerSmContainer){
this.createShadowElements("shadowBRCornerSm");
}
if(!this.oProtoShadowURCorner||!this.oProtoShadowURCornerContainer){
this.createShadowElements("shadowURCorner");
}
if(!this.oProtoShadowBLCorner||!this.oProtoShadowBLCornerContainer){
this.createShadowElements("shadowBLCorner");
}
};
this.preload=function(){
this.init();
if(document.all){
this.oProtoShadowBottom.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dropshadowBottom.png', sizingMethod='scale');";
this.oProtoShadowRight.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dropshadowRight.png', sizingMethod='scale');";
this.oProtoShadowBRCorner.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dropshadowBRCorner.png', sizingMethod='scale');";
this.oProtoShadowBRCornerSm.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dropshadowBRCornerSm.png', sizingMethod='scale');";
this.oProtoShadowURCorner.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dropshadowURCorner.png', sizingMethod='scale');";
this.oProtoShadowBLCorner.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dropshadowBLCorner.png', sizingMethod='scale');";
}else{
this.oProtoShadowBottom.src="dropshadowBottom.png";
this.oProtoShadowRight.src="dropshadowRight.png";
this.oProtoShadowBRCorner.src="dropshadowBRCorner.png";
this.oProtoShadowBRCornerSm.src="dropshadowBRCornerSm.png";
this.oProtoShadowURCorner.src="dropshadowURCorner.png";
this.oProtoShadowBLCorner.src="dropshadowBLCorner.png";
}
};
};
function Shadow(_4f){
var _50;
var _51;
var _52;
var _53;
var _54;
var _55;
var _56;
var _57;
var _58;
var _59;
var _5a=_4f;
var _5b=0;
var _5c=0;
var _5d=null;
var _5e=false;
var _5f=false;
var _60=12;
var _61=8;
var _62=2;
this.getCopy=function(){
if(!ShadowManager.oProtoShadowBottomContainer){
return false;
}
if(!_50){
_50=ShadowManager.oProtoShadowBottomContainer.cloneNode(true);
}
if(!_51){
_51=XMLParser.getNodeFrom(_50,"img");
}
if(!_52){
_52=ShadowManager.oProtoShadowRightContainer.cloneNode(true);
}
if(!_53){
_53=XMLParser.getNodeFrom(_52,"img");
}
if(!_56){
_56=ShadowManager.oProtoShadowURCornerContainer.cloneNode(true);
}
if(!_57){
_57=XMLParser.getNodeFrom(_56,"img");
}
if(!_58){
_58=ShadowManager.oProtoShadowBLCornerContainer.cloneNode(true);
}
if(!_59){
_59=XMLParser.getNodeFrom(_58,"img");
}
if(_5e){
if(!_54){
_54=ShadowManager.oProtoShadowBRCornerSmContainer.cloneNode(true);
}
}else{
if(!_54){
_54=ShadowManager.oProtoShadowBRCornerContainer.cloneNode(true);
}
}
if(!_55){
_55=XMLParser.getNodeFrom(_54,"img");
}
return true;
};
this.positionShadow=function(_63,_64,_65){
if(!this.getCopy()){
return;
}
_5b=_63;
_5c=_64;
pxWidthLast=_65.offsetWidth;
pxHeightLast=_65.offsetHeight;
var _66=(window.ie?0:1);
var _67=(window.ie?1:0);
var _68=(window.ie?_60+1:_60+1);
var _69=(window.ie?_62:1);
var _6a=(window.ie?6:7);
var _6b=4;
var _6c=(_5e?3:0);
var _6d=3+_6c;
var _6e=((window.ie&&_5e)?1:0);
sizeElement(_53,_60,_65.offsetHeight-_66-_6b-_61);
positionElement(_52,_63+_65.offsetWidth-_6d,_64+_6b+_61-_6e);
sizeElement(_51,_65.offsetWidth-_66-_6b-_61,_60);
positionElement(_50,_63+_6b+_61-_6e,_64+_65.offsetHeight-_6d);
sizeElement(_55,_60-(_66*2)+_67-_6e-_6c,_60-(_66*2)-_6c);
positionElement(_54,_63+_65.offsetWidth-_69,_64+_65.offsetHeight-_69);
sizeElement(_57,_60-1,_60-1);
positionElement(_56,_63+_65.offsetWidth-_6d+1,_64+_67+_61-_6a-_6e);
sizeElement(_59,_60-1,_60-1);
positionElement(_58,_63-_6a+_67+_61-_6e,_64+_65.offsetHeight-_66-_6d+1);
};
this.insertShadowBefore=function(_6f){
if(_6f.previousSibling==_58){
return;
}
_5f=(_6f.style.position=="fixed");
this.insertBeforeSameZIndex(_52,_6f);
this.insertBeforeSameZIndex(_50,_6f);
this.insertBeforeSameZIndex(_54,_6f);
this.insertBeforeSameZIndex(_56,_6f);
this.insertBeforeSameZIndex(_58,_6f);
};
this.insertBeforeSameZIndex=function(_70,_71){
if(!_71||!_71.parentNode){
return;
}
if(_71.style.zIndex){
_70.style.zIndex=_71.style.zIndex;
}
if(_5f){
_70.style.position="fixed";
}
_71.parentNode.insertBefore(_70,_71);
};
this.fixShadow=function(){
if(_5d){
this.applyShadow(_5b,_5c,_5d,_5e);
}
};
this.applyShadow=function(_72,_73,_74,_75){
if(!isVisible(_74)){
return;
}
_74.style.border="1px solid #D6D6D6";
_5e=_75;
if(!this.getCopy()){
return;
}
if(!_74.fShadowed||_5b!=_72||_5c!=_73||_5d!=_74||pxWidthLast!=_74.offsetWidth||pxHeightLast!=_74.offsetHeight){
_5d=_74;
this.insertShadowBefore(_74);
this.positionShadow(_72,_73,_74);
_74.fShadowed=true;
setOpacity(_50,0.99);
setOpacity(_52,0.99);
setOpacity(_54,0.99);
setOpacity(_56,0.99);
setOpacity(_58,0.99);
}
_52.style.display="";
_50.style.display="";
_54.style.display="";
_56.style.display="";
_58.style.display="";
};
this.hideShadow=function(){
if(!this.getCopy()){
return;
}
_50.style.display="none";
_52.style.display="none";
_54.style.display="none";
_56.style.display="none";
_58.style.display="none";
};
}
function Fader(_76){
var _77=_76;
var _78=null;
var _79=null;
var _7a=null;
var _7b=false;
var _7c=0;
var _7d=0.1;
var _7e=0.4;
var _7f=0.01;
var _80=1;
var _81=1000;
this.startFadeIn=function(_82,_83,_84,_85){
if(!_82){
return;
}
if(_84){
_7e=window.webkit?1:0.99;
_7d=window.ie?1:0.33;
}
_7a=_82;
_78=_83;
_79=_85;
if(_78){
_7a.style.visibility="hidden";
_7a.style.display="";
_78.call();
_7a.style.visibility="visible";
}
setOpacity(_7a,_7f);
_7a.style.display="";
_7b=true;
_7c=0;
setTimeout("FadeManager.fadeIn('"+_77+"')",_80);
};
this.startFadeOut=function(_86,_87,_88){
if(window.opera){
_86.style.display="none";
return;
}
_7a=_86;
_78=_87;
_79=null;
_7b=false;
_7c=_7a.style.opacity?_7a.style.opacity:_7e;
if(_88){
_7e=0.5;
_80=75;
_7d=0.05;
this.showFaded();
}
setTimeout("FadeManager.fadeOut('"+_77+"')",(_88?_81:_80));
};
this.fadeIn=function(){
if(_78){
_78.call();
}
_7c+=_7d;
if(_7c>_7e){
_7c=_7e;
}
setOpacity(_7a,_7c);
if((_7c<_7e)&&_7b){
setTimeout("FadeManager.fadeIn('"+_77+"')",_80);
}else{
if(_79){
_79.call();
}
}
};
this.showFaded=function(){
_7c=_7e;
setOpacity(_7a,_7c);
_7a.style.display="";
};
this.fadeOut=function(){
if(_7b){
return;
}
if(_78){
_78.call();
}
_7c-=_7d;
if(_7c<_7f){
_7c=_7f;
}
setOpacity(_7a,_7c);
if(_7c>_7f){
setTimeout("FadeManager.fadeOut('"+_77+"')",_80);
}else{
_7a.style.display="none";
if(_78){
_78.call();
}
}
};
}
var Info=new function(){
var _89;
var _8a=false;
var _8b=!window.ie6;
var _8c=10;
this.init=function(){
if(_8a){
return;
}
_89=document.createElement("div");
_89.className="ghostFontBig"+(window.ie6?" fourBorders":"");
_89.style.background="#FFFF99";
_89.style.color="black";
_89.style.padding=(_8c/2)+"px "+(_8c)+"px";
_89.style.position=_8b?"fixed":"absolute";
_89.style.visibility="hidden";
_89.style.overflow="hidden";
_89.style.display="none";
document.body.insertBefore(_89,document.body.firstChild);
_8a=true;
};
this.show=function(_8d){
this.init();
if(!_89||!_8d||!_8d.length){
return;
}
var _8e=elById("tbTop");
if(_8e){
_89.style.height=Math.max((_8e.offsetHeight-_8c),10)+"px";
}
_89.innerHTML="<nobr>"+_8d+"</nobr>";
_89.style.display="";
var pt=centerInTarget(_89,elById("tbTop"));
_89.style.top="0px";
if(!_8b){
pt=moveWithinWindow(_89,0);
}
_89.style.visibility="visible";
if(!window.ie6){
_89.style.zIndex="999";
ShadowManager.applySmallShadow("info",pt.x,0,_89);
_89.style.zIndex="1000";
}
_89.style.borderTop="0";
_89.style.borderLeft="0";
};
this.showBriefly=function(_90){
this.show(_90);
setTimeout("Info.hide()",4500);
};
this.hide=function(){
this.init();
if(!_89){
return;
}
ShadowManager.hideShadow("info");
_89.style.display="none";
_89.style.visibility="hidden";
};
this.queue=function(_91){
if(!window.fDomLoaded){
setTimeout(function(){
Info.queue(_91);
},500);
return;
}
this.showBriefly(_91);
};
};
var ToolTipper_oContents;
var ToolTipper_oTip;
function ToolTipper(){
var _92;
var _93;
var _94=this;
var _95=null;
var _96=false;
var _97=false;
this.init=function(){
if(_94.fInit){
return;
}
_94.fInit=true;
if(typeof (ToolTipper_oTip)=="undefined"){
ToolTipper_oContents=DOM.nobr();
ToolTipper_oTip=DOM.div({"class":"hoverBugTip","style":"display:none;"},ToolTipper_oContents);
document.body.insertBefore(ToolTipper_oTip,document.body.firstChild);
}
_92=ToolTipper_oContents;
_93=ToolTipper_oTip;
ourAttachEvent(document.body,"keyup",function(){
if(_94.fVisible&&_95){
_94.cancelTip();
}
});
};
this.fxnEventCancel=function(){
_94.cancelTip();
};
this.getFxnEventShowTip=function(_98,_99){
return function(e){
if(window.ie){
if(event&&event.fromElement==event.toElement){
return;
}
var _9b=getEventTarget(event);
if(_9b&&!isTagName(_9b,_99)){
return;
}
}
_94.showTip(this,_98);
};
};
this.getFxnEventIntercept=function(_9c,_9d){
return function(){
_9d.apply(this);
if(_9c){
return _9c.apply(this,arguments);
}
};
};
this.addTip=function(_9e,_9f){
if(!_9e||!_9f){
return;
}
if(!_9e.attributes){
return;
}
if(_9e.fTipAdded){
return;
}
function Intercept(_a0,fxn){
var e=_9e[_a0];
_9e[_a0]=_94.getFxnEventIntercept(e,fxn);
}
Intercept("onmousedown",this.fxnEventCancel);
Intercept("onmouseover",this.getFxnEventShowTip(_9f,_9e.nodeName));
Intercept("onmouseout",this.fxnEventCancel);
_9e.fTipAdded=true;
};
this.showTip=function(_a3,_a4){
if(!_a3||!_a4){
return;
}
this.init();
if(_a3.tagName=="LABEL"){
var _a5=elById(_a3.htmlFor);
if(_a5){
_a3=_a5;
}
}
if(_a3.tagName=="SELECT"){
var _a5=elById("idDropList_"+_a3.id+"_oText");
if(_a5){
_a3=_a5;
}
}
if(_a3.titleId){
var _a5=elById(_a3.titleId);
if(_a5){
_a3=_a5;
}
}
_95=_a3;
if(_96){
this.doShowTip(_a3,_a4);
}else{
setTimeout(function(){
_94.doShowTip(_a3,_a4);
},750);
}
};
this.doShowTip=function(_a6,_a7){
this.init();
if(!_95||_95!=_a6||_93.style.display==""||!isVisible(_a6)){
return;
}
_96=true;
_93.style.visibility="hidden";
_93.style.display="";
_92.innerHTML=_a7;
try{
var _a8=calculateOffset(_95,"offsetTop");
var _a9=calculateOffset(_95,"offsetLeft");
}
catch(e){
return;
}
var _aa=(_a9+(_95.offsetWidth/2)-(_93.offsetWidth/2));
_aa=Math.min(_aa,(windowRight()-_93.offsetWidth-20));
_aa=Math.max(_aa,scrollLeft()+20);
_93.style.left=_aa+"px";
_93.style.top=(_a8+_95.offsetHeight+10)+"px";
_93.style.visibility="visible";
this.fVisible=true;
};
this.cancelTip=function(){
this.init();
_93.style.display="none";
_95=null;
this.fVisible=false;
setTimeout(_94.stopImmediateTip,750);
};
this.stopImmediateTip=function(){
if(_95==null){
_96=false;
}
};
}
var Sliders=new function(){
this.rgsldr=[];
this.add=function(_ab,_ac){
this.rgsldr.push(_ac);
};
this.get=function(_ad){
return this.rgsldr.firstMatch(function(_ae){
return _ae.sName==_ad;
});
};
this.notifyMovement=function(){
this.rgsldr.foreach(function(_af){
_af.notifyMovement();
});
};
this.stopDrag=function(){
this.rgsldr.foreach(function(_b0){
_b0.stopDrag();
});
};
};
function Slider(_b1,_b2,_b3,_b4){
this.sName=_b1;
this.elContainer=elById(_b2);
this.fDragging=false;
this.rgYDrag=[];
this.sMatch="idSlider"+this.sName;
this.elOver=null;
this.ixSelected=null;
this.fxCallbackOnChunk=_b3;
this.fxCallbackOnMove=_b4;
Sliders.add(_b1,this);
}
Slider.prototype.setSelected=function(ix){
if(this.ixSelected==ix){
return;
}
this.ixSelected=ix;
var _b6=this.elContainer;
var _b7=XMLParser.getNodeArrayFrom(_b6,"a");
var fOn=true;
var _b9=this.sMatch+ix;
if(_b7){
for(var ix=0;ix<_b7.length;ix++){
var _ba=_b7[ix];
if(_ba&&this.isSliderChunk(_ba)){
if(this.fxCallbackOnChunk){
this.fxCallbackOnChunk(_ba,fOn);
}
if(_ba.id==_b9){
_ba.innerHTML=pictureOf(SliderChunkContents,true);
fOn=false;
}else{
_ba.innerHTML=pictureOf(SliderChunkContents,false);
}
_ba.parentNode.style.backgroundImage=SliderBackgroundImage(fOn);
}
}
}
};
Slider.prototype.isSliderChunk=function(el){
return el.id&&0==el.id.indexOf(this.sMatch);
};
Slider.prototype.startDrag=function(){
this.elOver=null;
this.rgYDrag=[];
var rgY=this.rgYDrag;
var _bd=this.elContainer;
var o=this;
var _bf=0;
var _c0=null;
new ListBrowser(_bd,function(el){
return o.isSliderChunk(el);
},null,null,null,function(el){
var pos=getAbsolutePosition(el);
rgY.push({yPrev:_bf,y:pos.y+el.offsetHeight,el:el});
_c0=el;
_bf=pos.y+el.offsetHeight;
},null);
rgY.push({yPrev:_bf,y:Number.POSITIVE_INFINITY,el:_c0});
this.fDragging=true;
document.body.style.cursor="pointer";
this.notifyMovement();
return false;
};
Slider.prototype.stopDrag=function(){
if(!this.fDragging){
return false;
}
removeTextSelections();
this.notifyMovement();
if(this.elOver){
this.elOver.onclick();
}
document.body.style.cursor="auto";
this.fDragging=false;
};
Slider.prototype.notifyMovement=function(){
if(!this.fDragging){
return;
}
document.body.style.cursor="pointer";
var _c4=yMouse+this.elContainer.scrollTop;
var _c5=this.rgYDrag.firstMatch(function(_){
return _.yPrev<_c4&&_.y>=_c4;
});
if(_c5){
this.elOver=_c5.el;
this.setSelected(this.ixFromId(this.elOver.id));
}
if(this.fxCallbackOnMove){
this.fxCallbackOnMove(_c4);
}
removeTextSelections();
};
Slider.prototype.ixFromId=function(id){
return id.substring(this.sMatch.length);
};
function DynamicUpdate(_c8,_c9){
this.el=_c8;
this.fxnQS=_c9;
this.oAjax=new AjaxRequest();
this.dtLastQueue=null;
this.sLastQS=null;
}
DynamicUpdate.prototype.queueUpdate=function(){
var _ca=this;
var dt=new UTCDate();
setTimeout(function(){
_ca.dequeueUpdate(dt);
},250);
this.dtLastQueue=dt;
};
DynamicUpdate.prototype.dequeueUpdate=function(dt){
if(dt!=this.dtLastQueue){
return;
}
this.update();
};
DynamicUpdate.prototype.update=function(){
var sQS=this.fxnQS();
if(sQS==this.sLastQS){
return;
}
if(this.oAjax.isBusy()){
this.queueUpdate();
return;
}
var _ce=this;
this.oAjax.initialize();
this.oAjax.bDefaultFailureBehavior=false;
this.oAjax.onreadystatechange(function(){
_ce.finishUpdate();
});
this.oAjax.open("GET",sDefaultURI+"?fAlaCarte=1&"+sQS,true);
this.oAjax.send(null);
this.sLastQS=sQS;
};
DynamicUpdate.prototype.finishUpdate=function(){
if(!this.oAjax.isReady()){
return;
}
var _cf=this.oAjax.responseXML();
if(!_cf){
return;
}
if(XMLParser.getTextFrom(_cf,"sError")){
return;
}
var _d0=XMLParser.getCDataFrom(_cf,"sHTML");
if(!_d0){
return;
}
this.el.innerHTML=_d0;
};
var DynamicOptions=new function(){
var _d1={};
this.add=function(_d2){
if(!elById("idText"+_d2)){
return;
}
_d1[_d2]=new DynamicOption(_d2);
};
};
function DynamicOption(_d3){
this.sName=_d3;
this.elText=elById("idText"+_d3);
this.elPop=elById("idPopup"+_d3);
this.elA=null;
this.rg=XMLParser.getArray(this.elPop,"input");
this.fxnAsText=window[_d3+"AsText"];
var _d4=this;
this.init=function(){
if(!this.elText||!this.elPop){
return;
}
this.elPop.style.display="none";
this.elPop.style.position="absolute";
this.elPop.style.zIndex="1";
this.elPop.className="popupMenu popFilterOpt dynamicOpt";
theMgr.add(this.elPop.id);
this.rg.foreach(function(_){
if(_.value==FB_DONE){
_.style.display="";
ourAttachEvent(_,"click",function(){
_d4.hide();
});
}else{
ourAttachEvent(_,"click",function(){
_d4.update();
});
}
});
setTimeout(function(){
_d4.update();
},1);
};
this.findLink=function(){
if(isInDOM(this.elA)&&this.elA.fAttached){
return;
}
this.elA=XMLParser.getNodeFrom(this.elText,"a");
if(!this.elA){
return;
}
ourAttachEvent(this.elA,"click",function(e){
_d4.show();
return cancel(e);
});
this.elA.fAttached=true;
};
this.show=function(){
theMgr.showPopup(this.elPop.id,this.elA,0,this.elA.offsetHeight+2,null,true);
};
this.hide=function(){
theMgr.hideAllPopups();
};
this.update=function(){
if(!this.fxnAsText){
return;
}
var s=pictureOf(this.fxnAsText,this.getParamArray());
this.elText.innerHTML=s;
this.findLink();
};
this.getParamArray=function(){
var _d8=[];
for(var ix=0;ix<this.rg.length;ix++){
var el=this.rg[ix];
if(el.type=="text"){
_d8[_d8.length]=el.value;
}else{
if(el.type=="checkbox"||el.type=="radio"){
_d8[_d8.length]=el.checked;
}
}
}
return _d8;
};
this.init();
}
function flash(el){
el.nFlash=4;
if(el.timerFlash){
clearInterval(el.timerFlash);
}
el.timerFlash=setInterval(function(){
doFlash(el);
},50);
}
function doFlash(el){
if(el.fFlashOff){
setOpacity(el,0.99);
el.fFlashOff=false;
}else{
setOpacity(el,0.1);
el.fFlashOff=true;
}
el.nFlash--;
if(el.nFlash<=0){
setOpacity(el,0.99);
clearInterval(el.timerFlash);
}
}


function TimeInterval(){
this.properties=["ixInterval","ixBug","dtStart","dtEnd","fDeleted","fChanged","sBugTitle","sLinkClass"];
this.serializeProperties=["ixInterval","ixBug","dtStart","dtEnd","fDeleted","fChanged"];
var o=this;
this.properties.foreach(function(s){
o[s]=null;
});
this.ixInterval=-1;
this.fDeleted=false;
this.sBugTitle="";
this.sLinkClass="";
}
TimeInterval.prototype.setChanged=function(f){
this.fChanged=f;
Timesheet.rgixBugChanged.push(this.ixBug);
};
TimeInterval.prototype.compare=function(ti){
if(this.dtStart>ti.dtStart){
return 1;
}
if(ti.dtStart>this.dtStart){
return -1;
}
if(!this.Ends()){
return 1;
}
if(!ti.Ends()){
return -1;
}
if(this.dtEnd>ti.dtEnd){
return 1;
}
if(ti.dtEnd>this.dtEnd){
return -1;
}
return 0;
};
TimeInterval.prototype.fromSJS=function(_5){
var _6=eval("("+_5+")");
var o=this;
this.properties.foreach(function(s){
o[s]=_6[s];
});
if(this.ixInterval<0){
this.ixInterval=Timesheet.getNextRowNumber();
}
this.idRow=IdTimesheetRow(this);
};
TimeInterval.prototype.fromPopup=function(){
this.dtStart=Timesheet.getUTCDateFromCTZsTime(elById("dtStartTime").value);
if(this.ixInterval<1||IsDate(this.dtEnd)){
this.dtEnd=Timesheet.getUTCDateFromCTZsTime(elById("dtEndTime").value);
}
this.ixBug=elById("ixBugEdit").value;
this.setChanged(true);
return true;
};
TimeInterval.prototype.checkBug=function(_9,_a,_b,_c,_d){
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
TimeInterval.checkBug(_9);
},200);
}else{
oAjaxRequest.initialize();
oAjaxRequest.onreadystatechange(function(){
TimeInterval.checkBugResponse(_a,_b,_c,_d);
});
var _e="pg=pgCanWorkOn&ixBug="+_9;
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&"+_e,true);
oAjaxRequest.send(null);
}
};
TimeInterval.checkBugResponse=function(_f,_10,_11,_12){
if(!oAjaxRequest||!oAjaxRequest.isReady()){
return;
}
var xml=oAjaxRequest.responseXML();
switch(XMLParser.getTextFrom(xml,"nCanWorkOn")){
case "1":
_f();
break;
case "-1":
_10();
break;
case "-2":
_f();
break;
case "-3":
_11();
break;
case "-4":
_12();
break;
}
};
TimeInterval.prototype.Ends=function(){
return IsDate(this.dtEnd);
};
TimeInterval.prototype.getEl=function(){
return elById(this.idRow);
};
TimeInterval.prototype.toggleDeleted=function(){
this.setChanged(true);
this.fDeleted=!this.fDeleted;
Timesheet.display();
setTimeout(function(){
Timesheet.check();
},1);
return true;
};
TimeInterval.prototype.close=function(){
this.setChanged(true);
Timesheet.fCloseInterval=true;
this.dtEnd=new UTCDate();
Timesheet.display();
setTimeout(function(){
Timesheet.check();
},1);
return true;
};
TimeInterval.prototype.serialize=function(){
var o=this;
var rgs=this.serializeProperties.map(function(s){
if(null==o[s]){
return "";
}
if(IsDate(o[s])){
return SerializeDate(o[s]);
}
return o[s];
});
return rgs.join("!!!");
};
TimeInterval.prototype.flashChanged=function(){
if(this.fChanged){
YFTManager.showYellow("TimeInterval",this.getEl());
this.setChanged(false);
}
};
TimeInterval.prototype.getStartDate=function(){
return this.dtStart;
};
TimeInterval.prototype.GetBugTitle=function(){
return this.sBugTitle;
};
TimeInterval.prototype.GetLinkClass=function(){
return this.sLinkClass;
};
function DayTimesheet(dt){
this.dt=dt;
this.rgti=[];
}
DayTimesheet.prototype.tiByIx=function(_18){
return this.rgti.firstMatch(function(ti){
return _18==ti.ixInterval;
});
};
DayTimesheet.prototype.serialize=function(){
return this.rgti.map(function(ti){
return ti.serialize();
}).join("|");
};
DayTimesheet.prototype.addTI=function(ti){
this.rgti.push(ti);
this.rgti.sort(function(ti1,ti2){
return ti1.compare(ti2);
});
};
var Timesheet=new function(){
this.rgday=[];
this.rgtiAdd=[];
this.cNewRows=0;
this.lastIntervalChanged=null;
this.fChanged=false;
this.fCloseInterval=false;
this.dt=UTCFromCTZNoon();
this.rgixBugChanged=[];
this.fixShadow=function(){
ClockPopup.fixShadow();
};
this.fixHotkeys=function(){
ClockPopup.fixHotkeys();
};
this.getEditor=function(){
if(!this.editor){
this.editor=new TimeIntervalEditor();
}
return this.editor;
};
this.showAdder=function(_1e){
if(!ClockPopup.isOpen()){
return true;
}
this.fChanged=true;
this.getEditor().showAdder(_1e);
return false;
};
this.showEditor=function(_1f){
if(!ClockPopup.isOpen()){
return true;
}
this.fChanged=true;
this.getEditor().show(this.tiByIx(_1f));
return false;
};
this.submitEditor=function(){
if(!ClockPopup.isOpen()){
return true;
}
this.getEditor().submit();
return false;
};
this.tiByIx=function(_20){
return this.rgday.map(function(day){
return day.tiByIx(_20);
}).firstMatch(function(ti){
return null!=ti;
});
};
this.display=function(){
this.clearDisplay();
var _23=this.getContainer();
this.showDt();
this.rgday=this.rgday.sort(function(d1,d2){
return (new UTCDate(d1.dt))>(new UTCDate(d2.dt))?1:-1;
});
var _26=[];
for(var i=0;i<this.rgday.length;i++){
_26=_26.concat(this.rgday[i].rgti);
}
_23.innerHTML=pictureOf(TimesheetDisplay,_26,true,true,this.dt);
elById("timesheet_submit").style.display=this.fChanged?"inline":"none";
elById("timesheet_cancel").value=this.fChanged?FB_CANCEL:FB_CLOSE;
elById("idTimesheetNext").style.visibility=InternalsDateRaw(Timesheet.dt)==InternalsDateRaw(new UTCDate())?"hidden":"visible";
_26.foreach(function(ti){
ti.flashChanged();
});
};
this.showDt=function(){
elById("idTimesheetDt").innerHTML=sDateWithDay(this.dt);
};
this.clearDisplay=function(){
var _29=this.getContainer();
while(_29.firstChild){
_29.removeChild(_29.firstChild);
}
this.hideError();
};
this.clearData=function(){
this.rgday=[];
this.rgtiAdd=[];
this.cNewRows=0;
};
this.dropEdits=function(){
this.clearData();
this.fChanged=false;
this.fCloseInterval=false;
this.rgixBugChanged=[];
};
this.getNextRowNumber=function(){
return -(++this.cNewRows);
};
this.getDay=function(dt){
var dt=new UTCDate(dt);
return this.rgday.firstMatch(function(_){
return dt.toDateString()==_.dt.toDateString();
});
};
this.addDay=function(dt){
var day=this.getDay(dt);
if(!day){
day=new DayTimesheet(dt);
this.rgday.push(day);
}
return day;
};
this.getContainer=function(){
return elById("idTimesheetContainer");
};
this.getErrorPane=function(){
return elById("idTimesheetError");
};
this.showError=function(s){
var _2f=this.getErrorPane();
if(_2f){
_2f.innerHTML=s;
_2f.style.display="block";
}
};
this.hideError=function(){
var _30=this.getErrorPane();
if(_30){
_30.style.display="none";
}
};
this.serialize=function(){
return this.rgtiAdd.map(function(_31){
return _31.serialize();
})+"|"+this.rgday.map(function(day){
return day.serialize();
}).join("|");
};
this.requestDt=function(dt){
if(dt>new UTCDate()||dt==this.dt){
return false;
}
this.dt=new UTCDate(dt);
this.showDt();
this.dropEdits();
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
Timesheet.requestDt(dt);
},200);
}else{
oAjaxRequest.initialize();
oAjaxRequest.onreadystatechange(Timesheet.response);
var _34="pg=pgAlaCarteLoadTimesheet&dt="+SerializeDate(CTZFromUTC(this.dt));
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&"+_34,true);
oAjaxRequest.send(null);
}
return true;
};
this.changeDt=function(dt){
return Timesheet.confirmLeaveEdits(function(){
Timesheet.requestDt(dt);
},FB_CONTINUE_LOSE_CHANGES);
};
this.shiftDate=function(_36){
var _37=new UTCDate(this.dt);
_37.setDate(this.dt.getDate()+_36);
return this.changeDt(_37);
};
this.nextDt=function(){
if(!ClockPopup.isOpen()){
return true;
}
this.shiftDate(1);
return false;
};
this.prevDt=function(){
if(!ClockPopup.isOpen()){
return true;
}
this.shiftDate(-1);
return false;
};
this.showCalendar=function(){
cal.bPastOK=true;
cal.bFutureOK=false;
cal.fTextBar=false;
cal.setDate(this.dt);
cal.show("dtPreviousTimesheet","","prevTimesheetButton");
cal.focus(false);
return true;
};
this.check=function(){
return this.requestAlter(false);
};
this.commit=function(){
return this.requestAlter(true);
};
this.requestAlter=function(_38){
this.fChanged=true;
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
Timesheet.requestAlter(_38);
},500);
}else{
oAjaxRequest.initialize();
Info.hide();
oAjaxRequest.onreadystatechange(function(){
Timesheet.response(true,_38);
});
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&pre=prePostTimesheet&sData="+this.serialize()+"&fCommit="+(_38?"1":"0"),true);
oAjaxRequest.send(null);
}
};
this.response=function(_39,_3a){
Timesheet.rgday=[];
if(!oAjaxRequest||!oAjaxRequest.isReady()){
return;
}
var xml=oAjaxRequest.responseXML();
var _3c=XMLParser.getNodeArrayFrom(xml,"TimeInterval");
if(_3c){
if(_39){
Timesheet.clearData();
}
if(_3a){
if("undefined"!=typeof (requestUpdateElapsedTime)){
requestUpdateElapsedTime(this.rgixBugChanged);
}
if(Timesheet.fCloseInterval){
setIxWorkingOnNothing();
}
Timesheet.dropEdits();
}
_3c.foreach(function(xml){
var ti=new TimeInterval;
ti.fromSJS(XMLParser.getCDataOf(xml));
var day=Timesheet.addDay(ti.dtStart);
day.addTI(ti);
});
Timesheet.display();
}
var _40=XMLParser.getTextFrom(xml,"sError");
if(_40){
Timesheet.showError(_40);
}
Timesheet.fixShadow();
Timesheet.fixHotkeys();
};
this.confirmNavigate=function(_41){
Timesheet.confirmLeaveEdits(function(){
ClockPopup.hide();
document.location.href=_41;
return false;
},FB_STILL_GO_TO_PAGE);
return false;
};
this.confirmLeaveEdits=function(_42,_43){
if(!Timesheet.fChanged){
_42();
return true;
}
var _44=elById("idTimesheetConfirmMsg");
var _45=elById("idTimesheetResolveMsg");
var oOk=elById("idTimesheetConfirmOk");
var _47=elById("idTimesheetConfirmCancel");
if(!(_44&&_45&&oOk&&_47)){
return true;
}
_44.innerHTML=FB_EDITS_WILL_BE_LOST;
_45.innerHTML=_43;
oOk.value=FB_YES;
oOk.onclick=function(){
_42();
EditableTableManager.hidePane("TimesheetTable");
return false;
};
_47.value=FB_NO;
EditableTableManager.showDeletePane("TimesheetTable",ClockPopup.getElPopup(),null,null,Timesheet.getContainer(),POPUP_POSITION_CENTER);
return false;
};
this.getUTCDateFromCTZsTime=function(_48){
return UTCFromCTZ(CombineDateTime(CTZFromUTC(this.dt),clo.CTZguessTime(_48)));
};
};
function TimeIntervalEditor(){
}
TimeIntervalEditor.prototype.show=function(ti){
var oed=this;
this.tiEdit=ti;
this.hideErrors();
EditableTableManager.showEditPane("TimesheetTable",ti.getEl(),this.createEditPane(ti.idRow,ti.dtStart,ti.dtEnd,ti.ixBug,FB_EDIT_INTERVAL),function(){
oed.showEndTime(ti.Ends());
},elById("timeclockPopup"),POPUP_POSITION_LEFT);
};
TimeIntervalEditor.prototype.showAdder=function(_4b){
var oed=this;
this.tiEdit=null;
this.hideErrors();
EditableTableManager.showEditPane("TimesheetTable",_4b,this.createEditPane(_4b.id,new UTCDate(),new UTCDate(),"",FB_ADD_INTERVAL),function(){
oed.showEndTime(true);
},elById("timeclockPopup"),POPUP_POSITION_LEFT);
};
TimeIntervalEditor.prototype.createEditPane=function(_4d,_4e,_4f,_50,_51){
return [{sId:"dtStartTime",sTag:"input",value:CTZsTimeFromUTC(_4e)},{sId:"dtEndTime",sTag:"input",value:CTZsTimeFromUTC(_4f?_4f:new UTCDate())},{sId:"ixBugEdit",sTag:"input",style:"display:none",value:_50},{sId:"sTimesheetEdit",sTag:"span",value:_51}];
};
TimeIntervalEditor.prototype.showEndTime=function(_52){
elById("idTimesheetEditorEndTime").style.display=(_52?"":"none");
this.fixShadow();
};
TimeIntervalEditor.prototype.submit=function(){
var ed=this;
this.hideErrors();
var ti=this.tiEdit;
var _55=false;
if(!ti){
_55=true;
ti=new TimeInterval();
}
var _56=function(){
if(clo.guessTime(elById("dtStartTime").value)>clo.guessTime(elById("dtEndTime").value)){
ed.showTimeErr(FB_END_TIME_BEFORE_START_TIME);
return;
}
ti.fromPopup();
if(_55){
Timesheet.rgtiAdd.push(ti);
}
EditableTableManager.hidePane("TimesheetTable");
Timesheet.check();
};
var _57=function(){
ed.showEditErr(FB_INVALID_CASE);
};
var _58=function(){
EstimatePopup.show("editTimesheetTable",elById("ixBugEdit").value,_56,function(_59){
elById("ixBugEdit").value=_59;
_56();
},function(){
EditableTableManager.hidePane("TimesheetTable");
},POPUP_POSITION_CENTER);
};
var _5a=function(){
ed.showEditErr(swap1(FB_NO_PERMISSION_ON_BUG,elById("ixBugEdit").value));
};
ti.checkBug(elById("ixBugEdit").value,_56,_57,_58,_5a);
};
TimeIntervalEditor.prototype.fixShadow=function(){
EditableTableManager.fixShadow("TimesheetTable");
};
TimeIntervalEditor.prototype.showEditErr=function(_5b){
var _5c=elById("ixBugEdit");
var _5d=elById("ixBugEditError");
_5c.className="error";
if(_5c.value.length>0){
_5d.innerHTML=Swap1(_5b,elById("ixBugEdit").value);
_5d.style.display="block";
}
this.fixShadow();
};
TimeIntervalEditor.prototype.hideEditErr=function(){
var _5e=elById("ixBugEdit");
var _5f=elById("ixBugEditError");
_5e.className="";
_5f.innerHTML="";
this.fixShadow();
};
TimeIntervalEditor.prototype.showTimeErr=function(_60){
elById("dtStartTime").className="error";
elById("dtEndTime").className="error";
var _61=elById("dtEditError");
_61.innerHTML=Swap1(_60,elById("ixBugEdit").value);
_61.style.display="block";
this.fixShadow();
};
TimeIntervalEditor.prototype.hideTimeErr=function(){
elById("dtEditError").style.display="none";
elById("dtStartTime").className="";
elById("dtEndTime").className="";
this.fixShadow();
};
TimeIntervalEditor.prototype.hideErrors=function(){
this.hideEditErr();
this.hideTimeErr();
};
var ClockPopup=new function(){
var _62=false;
this.isOpen=function(){
return _62;
};
this.closeOK=function(){
return !Timesheet.fChanged;
};
this.getElPopup=function(){
if(!elById("timeclockPopup")){
var el=document.createElement("DIV");
el.innerHTML=pictureOf(TimesheetPopup);
document.body.appendChild(el);
theMgr.addWithHandler("timeclockPopup",ClockPopup.theMgrHandler);
}
return (elById("timeclockPopup"));
};
this.show=function(dt){
_62=true;
var _65=elById("Working_On");
if(_65){
theMgr.showPopup(this.getElPopup().id,_65,0,30);
ShadowManager.applyRelativeShadow("shadowTimeclock",this.getElPopup());
Timesheet.changeDt(dt?dt:new UTCDate());
}
return false;
};
this.fixShadow=function(){
ShadowManager.fixShadow("shadowTimeclock");
};
this.fixHotkeys=function(){
KeyManager.registerElPopupKeys(this.getElPopup());
};
this.hide=function(){
Timesheet.dropEdits();
theMgr.hideAllPopups();
};
this.theMgrHandler=function(){
if(!ClockPopup.closeOK()){
BlinkManager.startBlink("CloseBlinker",elById("timeclockPopup"),"#666666",3,65,0.65);
return false;
}
_62=false;
Info.hide();
Timesheet.clearDisplay();
if(KeyManager.getElCursor()){
KeyManager.getElCursor().style.display="none";
}
ShadowManager.hideShadow("shadowTimeclock");
ShadowManager.hideShadow("idPop");
return true;
};
};
var g_obts=null;
function requestBugTimesheet(_66){
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
requestBugTimesheet(_66);
},200);
}else{
oAjaxRequest.initialize();
oAjaxRequest.onreadystatechange(responseBugTimesheet);
var _67="pg=pgAlaCarteBugTimesheet&ixBug="+_66;
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&"+_67,true);
oAjaxRequest.send(null);
}
return false;
}
function responseBugTimesheet(){
if(!oAjaxRequest||!oAjaxRequest.isReady()){
return;
}
var xml=oAjaxRequest.responseXML();
var _69=XMLParser.getCDataFrom(xml,"sHTML");
if(_69){
if(!g_obts){
g_obts=FancyPopupManager.create("bugTimesheetPopup");
g_obts.setWidth(450);
}
g_obts.oDiv.innerHTML=_69;
}
g_obts.show("bugTimesheet",POPUP_POSITION_CENTER_SCREEN,true);
autoScrollDiv(elById("idBugTimesheetOverflowDiv"),450);
}


var FavoritesIcons=new function(){
var _1=-1;
var _2;
var _3={Bug:{},WikiPage:{},DiscussTopic:{}};
var _4=function(_5,_6){
_3[_5][_6]={rgIcons:[],fFavorite:undefined,fAjax:undefined,fRemoveLater:false,fUserSet:false};
};
var _7=function(_8,_9){
var _a=_3[_8][_9];
if(_a.fRemoveLater){
_a.fFavorite=false;
}
var _b=_a.fFavorite;
if(_b==undefined){
return;
}
var _c=_a.rgIcons;
var _d;
if(_b){
_d="starFull";
}else{
_d="starEmpty";
}
for(var ix=0;ix<_c.length;ix++){
var _f=_c[ix];
var elA=_f.parentNode;
if(elA){
elA.className=_d;
}
if(_f){
_f.style.display="";
}
}
};
this.setFavorite=function(_11,_12,_13){
if(_3[_11][_12]&&_3[_11][_12].fFavorite!=_13){
if(_13){
if(_1>=0){
if(_3[_11][_12].fRemoveLater){
_3[_11][_12].fRemoveLater=false;
}else{
FavoritesList.change("Add",_1,_11,_12,0);
}
}
}else{
if(_1>=0){
if(FavoritesList.isPopupVisible()){
_3[_11][_12].fRemoveLater=true;
}else{
FavoritesList.change("Remove",_1,_11,_12,0);
}
}
}
_3[_11][_12].fFavorite=_13;
_7(_11,_12);
}
};
this.setAllFavorites=function(_14){
var rgs=[];
if(_14&&_14.split){
rgs=_14.split(",");
}
var _16={};
for(var ix=0;ix<rgs.length;ix++){
_16[rgs[ix]]=true;
}
for(var _18 in _3){
for(var _19 in _3[_18]){
var el=_3[_18][_19];
var _1b=el.fFavorite;
if(((!_1b&&(_18+_19) in _16)||(_1b&&!((_18+_19) in _16)))&&!el.fUserSet){
_3[_18][_19].fFavorite=!_1b;
_7(_18,_19);
}
}
}
if(!_2){
_2=elById("input_stars");
}
if(_2&&_2.value){
_2.value=_14;
}
};
this.elIsRegistered=function(el,_1d,_1e){
for(var ix=0;ix<_3[_1d].length;ix++){
if(_3[_1d][ix]==el){
return true;
}
}
return false;
};
this.register=function(el,_21,_22,_23,_24){
if(this.elIsRegistered(el,_21,_22)){
return;
}
if(_3[_21][_22]==undefined){
_4(_21,_22);
_3[_21][_22].fAjax=true;
if(_24!=undefined){
_3[_21][_22].fFavorite=_24;
}
}
if(!ourHasEvent(el,"mouseover")){
function finishAttachEvents(){
if(el.fAttached){
return;
}
if(el.parentNode){
ourAttachEvent(el.parentNode,"click",function(e){
FavoritesIcons.toggle(_21,_22);
cancel(e);
});
}
if(window.SM){
ourAttachEvent(el,"mouseout",function(){
SM.blockClick(false);
});
}
el.fAttached=true;
}
if(el.id!=undefined){
finishAttachEvents();
ourAttachEvent(el,"mouseover",function(){
if(window.SM){
SM.blockClick(true);
}
});
}else{
ourAttachEvent(el,"mouseover",function(){
finishAttachEvents();
if(window.SM){
SM.blockClick(true);
}
});
}
}
_3[_21][_22].rgIcons.push(el);
if(_23!=undefined){
_1=_23;
}
_7(_21,_22);
};
this.registerAjax=function(el,_27,_28){
if(_3[_27][_28]==undefined){
_4(_27,_28);
}
if(!_3[_27][_28].fAjax){
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
FavoritesIcons.registerAjax(el,_27,_28);
},500);
}else{
_3[_27][_28].fAjax=true;
oAjaxRequest.initialize();
oAjaxRequest.onreadystatechange(function(){
FavoritesIcons.registerAjaxCallback(el,_27,_28);
});
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&pg=pgAlaCarteIsFavorite&sType="+_27+"&ixItem="+_28,true);
oAjaxRequest.send("null");
}
}else{
this.register(el,_27,_28,undefined,undefined);
}
};
this.registerAjaxCallback=function(el,_2a,_2b){
if(!oAjaxRequest||!oAjaxRequest.isReady()){
return;
}
var _2c=oAjaxRequest.responseXML();
var _2d=Number(XMLParser.getTextFrom(_2c,"ixDocList"));
var _2e=(XMLParser.getTextFrom(_2c,"fFavorite")==1);
this.register(el,_2a,_2b,_2d,_2e);
this.setFavorite(_2a,_2b,_2e);
};
this.toggle=function(_2f,_30){
if(_3[_2f][_30]){
_3[_2f][_30].fUserSet=true;
this.setFavorite(_2f,_30,!_3[_2f][_30].fFavorite);
}
};
this.getRemoveLaterItems=function(){
var rg=[];
for(var _32 in _3){
for(var _33 in _3[_32]){
if(_3[_32][_33].fRemoveLater){
var o={};
o.sType=_32;
o.ixItem=Number(_33);
rg.push(o);
}
}
}
return rg;
};
this.sendRemoveLaterItems=function(_35,sPg){
var _37="";
var _38="";
var rg=this.getRemoveLaterItems();
var _3a,_3b;
for(var ix=0;ix<rg.length;ix++){
_3a=rg[ix].sType;
_3b=rg[ix].ixItem;
_38=_38+_3a+",";
_37=_37+_3b+",";
_3[_3a][_3b].fRemoveLater=false;
}
if(_37!=""){
_38=_38.substr(0,_38.length-1);
_37=_37.substr(0,_37.length-1);
FavoritesList.change("BulkRemove",_1,_38,_37,0,_35,sPg);
}
};
};
var FavoritesList=new function(){
var _3d;
var _3e;
var _3f;
var _40;
var _41;
var _42;
var _43;
var _44;
var _45;
var _46;
var _47;
var _48;
var _49;
var _4a;
var _4b;
var _4c;
var _4d;
var _4e;
var _4f;
var _50;
var _51;
var _52=4;
var _53=3;
var _54=3;
var _55=5;
var _56="#FBFBFB";
var _57="#F1F5FA";
var _58="#E0E0E0";
var _59="#DDDEE0";
this.initGhostDiv=function(){
_4b=document.createElement("div");
_4b.style.display="none";
_4b.style.position="absolute";
_4b.style.opacity=0.5;
_4b.style.filter="alpha(opacity=50)";
_4b.style.textAlign="left";
_4b.className="favoritesPopup";
_4b.style.color="#fff";
_4b.style.background="#FFFFFF";
_4b.style.border="#9F9F9F 1px solid";
_4b.style.zIndex=4;
document.body.insertBefore(_4b,null);
};
this.showGhostDiv=function(_5a){
_4e=xMouse-calculateOffset(_5a,"offsetLeft")-1;
_4f=yMouse-calculateOffset(_5a,"offsetTop")-1;
_4b.style.height=(_5a.offsetHeight-(_52/2)+2)+"px";
_4b.style.width=(_5a.offsetWidth-(_52/2))+"px";
var _5b="<table border=0 cellspacing=0 cellpadding=0 class=\"biglist\" width=\""+_4b.style.width+"\">";
var sTr="<tr id=\"ghostRow\" class=\""+_5a.className+"\">";
_4b.innerHTML=_5b+sTr+_5a.innerHTML+"</tr></table>";
var _5d=elById("ghostRow");
this.unhighlightRow(_5d);
};
this.keypress=function(e,_5f){
if(13==getKeyCode(e)){
var _60;
if(_5f&&_5f.id){
_60=elById(_5f.id+"_link");
}
this.delayedClick(_60,e);
}else{
if("*"==String.fromCharCode(KeyboardMap.fix(getKeyCode(e),false)).toLowerCase()){
var rgs=_5f.id.split("_");
var _62=rgs[rgs.length-1];
var _63=rgs[rgs.length-2];
FavoritesIcons.toggle(_63,_62);
}
}
};
this.delayedClick=function(_64,e){
if(_64&&FavoritesIcons.getRemoveLaterItems().length){
if(e){
cancel(e);
}
FavoritesIcons.sendRemoveLaterItems(function(){
KeyManager.simulateClick(_64);
},"pg=pgAlaCarteErrorOnly");
return false;
}
return true;
};
this.clearLastHighlight=function(){
if(_51){
this.unhighlightRow(_51);
}
};
this.highlightRow=function(_66){
if(!_66||!_66.tagName||!(_66.tagName.toLowerCase()=="tr")){
return;
}
if(null!=KeyManager.oPopupBrowser){
KeyManager.oPopupBrowser.setElCurrent(_66);
}
var el=elById(_66.id+"_link");
if(el){
safeFocus(el);
}
if(_66.className=="row"){
paintRow(_66,_58);
}else{
paintRow(_66,_59);
}
if(!window.opera){
removeTextSelections();
}
if(_66!=_51){
this.unhighlightRow(_51);
}
_51=_66;
};
this.unhighlightRow=function(_68){
if(!_68||!_68.tagName||!(_68.tagName.toLowerCase()=="tr")){
return;
}
if(_68.className=="row"){
paintRow(_68,_56);
}else{
paintRow(_68,_57);
}
if(_68==_51){
_51=undefined;
}
};
this.showToolbar=function(_69){
if(_51!=_69){
this.clearLastHighlight();
this.highlightRow(_69);
}
_69.style.cursor="move";
if(!_69.fEventsAttached){
new ListBrowser(_69,function(el){
return null!=el.tagName&&("a"==el.tagName.toLowerCase()||"img"==el.tagName.toLowerCase());
},null,null,null,function(el){
el.setAttribute("onmousedown","return false");
el.setAttribute("ondrag","return false");
el.setAttribute("ondragstart","return false");
el.setAttribute("ondragend","return false");
},null);
_69.fEventsAttached=true;
}else{
}
var el=elById(_69.id+"_spacer");
if(el){
el.style.display="none";
}
var el=elById(_69.id+"_updown");
if(el){
el.style.display="";
}
};
this.hideToolbar=function(_6d){
this.unhighlightRow(_6d);
var el=elById(_6d.id+"_spacer");
if(el){
el.style.display="";
}
var el=elById(_6d.id+"_updown");
if(el){
el.style.display="none";
}
};
this.startDrag=function(_6f,_70,_71,_72,_73){
this.sType=_71;
this.ixItem=_72;
this.ixDocList=_70;
this.nPosBegin=_73;
this.nPos=0;
this.ptDragBegin=undefined;
this.fDragBegin=false;
if(_4b==undefined){
this.initGhostDiv();
}
this.showGhostDiv(_6f);
this.rgYDrag=[];
elTable=_6f.parentNode;
elTable=getParentNode(elTable,"table");
if(!elTable||elTable.tagName.toLowerCase()!="table"){
return;
}
this.elList=elTable;
var rgY=this.rgYDrag;
var _73=0;
var _75=0;
new ListBrowser(this.elList,function(el){
return null!=el.tagName&&"tr"==el.tagName.toLowerCase();
},null,null,null,function(el){
var pos=getAbsolutePosition(el);
_73=el.getAttribute("pos");
rgY.push({yPrev:_75,y:pos.y+el.offsetHeight/2,el:el,nPos:_73});
_75=pos.y+el.offsetHeight/2;
},null);
this.nPosMax=++_73;
rgY.push({yPrev:_75,y:Number.POSITIVE_INFINITY,el:null,nPos:this.nPosMax});
this.fDragging=true;
document.body.style.cursor="move";
this.notifyMovement();
return false;
};
this.stopDrag=function(){
if(!this.fDragging){
return false;
}
document.body.style.cursor="auto";
_4b.style.display="none";
removeTextSelections();
this.ptDragBegin=undefined;
if(this.fDragBegin&&this.nPos!=this.nPosBegin&&this.nPos!=this.nPosBegin+1){
this.showLoadingDiv();
this.fDragging=false;
this.change("Move",this.ixDocList,this.sType,this.ixItem,this.nPos);
}else{
this.fDragging=false;
this.unmask();
if(this.elArrow){
this.elArrow.style.visibility="hidden";
}
}
return false;
};
this.placeArrow=function(x,y){
if(!this.elArrow){
this.elArrow=DOM.img({"src":"rightArrow.gif","style":"position:absolute;"});
document.body.appendChild(this.elArrow);
}
this.elArrow.style.visibility="visible";
this.elArrow.style.top=y+"px";
this.elArrow.style.left=x-(this.elArrow.offsetWidth)+"px";
};
this.notifyMovement=function(){
if(!this.fDragging){
return;
}
if(this.ptDragBegin==undefined){
this.ptDragBegin={};
this.ptDragBegin.x=xMouse;
this.ptDragBegin.y=yMouse;
}
if(!this.fDragBegin&&(Math.abs(yMouse-this.ptDragBegin.y)>_55||Math.abs(xMouse-this.ptDragBegin.x)>_55)){
this.fDragBegin=true;
this.mask();
}
removeTextSelections();
document.body.style.cursor="move";
if(this.fDragBegin){
_4b.style.display="";
_4b.style.top=(yMouse-_4f)+"px";
_4b.style.left=(xMouse-_4e)+"px";
this.elCurrDragPrev=this.elCurrDrag;
this.elCurrDrag=null;
this.nPos=this.nPosMax;
var _7b=this.rgYDrag.firstMatch(function(_){
return _.yPrev<yMouse&&_.y>=yMouse;
});
if(_7b){
this.elCurrDrag=_7b.el;
this.nPos=_7b.nPos;
}
if(this.elCurrDrag!=this.elCurrDragPrev){
if(null!=this.elCurrDrag){
var pos=getAbsolutePosition(this.elCurrDrag);
var _7e=getAbsolutePosition(this.elList);
this.placeArrow(_7e.x-_54,pos.y-_53);
}else{
var _7e=getAbsolutePosition(this.elList);
this.placeArrow(_7e.x-_54,_7e.y+this.elList.offsetHeight-_53);
}
}
}
};
this.sizeLoadingDiv=function(){
var _7f=elById("favoritesPopup");
var pos=getAbsolutePosition(_7f);
this.elLoadingDiv.style.top=pos.y+"px";
this.elLoadingDiv.style.left=pos.x+"px";
this.elLoadingDiv.style.height=_7f.offsetHeight+"px";
this.elLoadingDiv.style.width=_7f.offsetWidth+"px";
};
this.showLoadingDiv=function(){
if(!this.elLoadingDiv){
this.elLoadingDiv=DOM.div({"style":"background:silver;position:absolute;opacity:0.4;filter:alpha(opacity=40);z-index:4;display:none;"});
document.body.appendChild(this.elLoadingDiv);
}
FadeManager.startFadeIn("favoritesPopup",this.elLoadingDiv,function(){
FavoritesList.sizeLoadingDiv();
},false);
};
this.hideLoadingDiv=function(){
if(elById("favoritesPopup")&&this.elLoadingDiv){
FadeManager.startFadeOut("favoritesPopup",this.elLoadingDiv,null,false);
}
};
this.hideLoadingDivNow=function(){
if(elById("favoritesPopup")&&this.elLoadingDiv){
this.elLoadingDiv.style.display="none";
}
};
this.mask=function(){
theMgr.showSmallMask("favoritesPopup");
};
this.unmask=function(){
theMgr.unmaskClicks("favoritesPopup");
};
this.onPopupShow=function(){
KeyManager.oPopupBrowser=new ListBrowser(elById("favoritesPopup"),function(el){
return null!=el.tagName&&(("a"==el.tagName.toLowerCase()&&"favoritesheadline"==el.className.toLowerCase())||"tr"==el.tagName.toLowerCase());
},function(el){
if("tr"==el.tagName.toLowerCase()){
safeFocus(elById(el.id+"_link"));
}else{
safeFocus(el);
}
FavoritesList.highlightRow(el);
},function(el){
if(el&&el.blur){
el.blur();
}
FavoritesList.unhighlightRow(el);
},null,function(el){
if("a"==el.tagName.toLowerCase()){
el.onfocus=function(){
null!=KeyManager.oPopupBrowser&&KeyManager.oPopupBrowser.setElCurrent(this);
FavoritesList.clearLastHighlight();
};
el.onmouseover=function(){
if(!window.opera){
safeFocus(this);
}
};
el.onmouseout=function(){
if(!window.opera){
this.blur();
}
};
}else{
var _85=elById(el.id+"_link");
if(_85){
ourAttachEvent(_85,"keypress",function(e){
FavoritesList.keypress(e,el);
});
}
}
},null);
_50=true;
return false;
};
this.onPopupHide=function(){
document.body.style.cursor="auto";
if(_4b&&_4b.style){
_4b.style.display="none";
}
this.ptDragBegin=undefined;
this.fDragging=false;
this.unmask();
if(this.elArrow){
this.elArrow.style.visibility="hidden";
}
this.hideLoadingDivNow();
if(_51){
this.unhighlightRow(_51);
}
_50=false;
FavoritesIcons.sendRemoveLaterItems();
return true;
};
this.isPopupVisible=function(){
return _50;
};
this.change=function(_87,_88,_89,_8a,_8b,_8c,sPg){
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
FavoritesList.change(_87,_88,_89,_8a,_8b);
},500);
}else{
var _8e="";
if(_87&&_87.length&&_89&&_8a&&_88>0){
_8e="&pre=preDocList"+_87+"&ixDocList="+_88+"&sType="+_89+"&ixItem="+_8a+"&nPos="+_8b;
}
var _8f="";
var _90=FavoritesIcons.getRemoveLaterItems();
if(_90.length>0){
var _91="",_92="";
for(var ix=0;ix<_90.length;ix++){
_92=_92+_90[ix].sType+",";
_91=_91+_90[ix].ixItem+",";
}
_92=_92.substr(0,_92.length-1);
_91=_91.substr(0,_91.length-1);
_8f="&sTypesRemoveLater="+_92+"&sItemsRemoveLater="+_91;
}
var _94=false;
if(elById("pgFavorites")){
_94=true;
}
oAjaxRequest.initialize();
if(!_8c){
_8c=function(){
FavoritesList.resultDocListChange();
};
}
oAjaxRequest.onreadystatechange(_8c);
if(sPg){
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&"+sPg+_8e,true);
}else{
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&pg=pgFavoritesPopup"+_8f+"&fPgFavorites="+IntFromBool(_94)+_8e,true);
}
oAjaxRequest.send("null");
if(_94&&!_50){
if(_87=="Move"||_87=="MoveUp"||_87=="MoveDown"){
Info.show(FB_MOVING);
}else{
Info.show(FB_UPDATING);
}
}
}
return false;
};
this.resultDocListChange=function(){
if(!oAjaxRequest||!oAjaxRequest.isReady()){
return;
}
var _95=oAjaxRequest.responseXML();
if(XMLParser.getTextFrom(_95,"sError")){
alert(XMLParser.getTextFrom(_95,"sError"));
return;
}
setFavoritesContent(_95);
var _96=XMLParser.getCDataFrom(_95,"sHTML_workingOnFavorites");
var _97=elById("idWorkOnFavorites");
if(_97){
_97.innerHTML=_96;
}
var _98=elById("workingOnPopup");
if(_98){
_98.style.width="100px";
}
Info.hide();
this.unmask();
this.hideLoadingDiv();
if(_50&&KeyManager&&KeyManager.oPopupBrowser){
var _99=KeyManager.oPopupBrowser.elCurrent;
this.onPopupShow();
if(_99&&_99.id){
this.highlightRow(elById(_99.id));
var el=elById(_99.id+"_link");
if(el){
safeFocus(el);
}
}
}
if(this.elArrow){
this.elArrow.style.visibility="hidden";
}
ShadowManager.fixShadow("favoritesPopup");
};
};


var EstimatePopup=new function(){
this.oPopup=null;
this.show=function(_1,_2,_3,_4,_5,_6){
this.fxEst=_3;
this.fxSI=_4;
this.fxCancel=_5;
if(!this.oPopup){
var _7=elById("idEnterEstimateDiv");
if(_7){
this.oPopup=FancyPopupManager.create("enterEstimatePopup");
_7.parentNode.removeChild(_7);
this.oPopup.oDiv.appendChild(_7);
_7.style.display="";
}
}
var _8=elById("idEnterEstimateTitle");
if(_8){
_8.innerHTML=swap1(FB_NO_ESTIMATE_ENTERED,_2);
}
_8=elById("idIxBug");
if(_8){
_8.value=_2;
}
this.reset();
this.oPopup.show(_1,null==_6?POPUP_POSITION_LEFT:_6,false);
giveTextBoxFocus("idEnterEstimateInput");
};
this.hide=function(){
this.oPopup.hide();
};
this.changeEstimateCallback=function(){
var _9=oAjaxRequest.responseXML();
if(!_9){
return;
}
var _a=XMLParser.getTextFrom(_9,"sError");
if(_a&&_a!=""){
var _b=elById("idEnterEstimateError");
if(_b){
show(_b);
}
giveTextBoxFocus("idEnterEstimateInput");
EstimatePopup.oPopup.fixShadow();
return;
}
var _c=XMLParser.getCDataFrom(_9,"BugFieldsJS");
if(_c){
var _d=eval("("+_c+")");
updateGridEstimate(_d,parseFloat(XMLParser.getTextFrom(_9,"hrsRemainingChange")));
updateViewEstimate(_d);
if(EstimatePopup.fxEst&&_d.ixBug){
EstimatePopup.fxEst(_d.ixBug);
}
}
EstimatePopup.hide();
};
this.submit=function(){
var _e=elById("idEnterEstimateError");
if(_e){
hide(_e);
}
this.oPopup.fixShadow();
var _f;
_e=elById("idIxBug");
if(_e){
_f=Number(_e.value);
}
if(!_f){
return;
}
var _e=elById("idEnterEstimate");
if(_e&&_e.checked){
fEstimate=true;
}else{
_e=elById("idSelectScheduleItem");
if(!_e||!_e.checked){
return;
}
fEstimate=false;
}
if(fEstimate){
var _10;
_e=elById("idEnterEstimateInput");
if(_e){
_10=_e.value;
}
if(_10){
changeEstimate(_f,_10,EstimatePopup.changeEstimateCallback);
}
}else{
var _11;
_e=elById("idScheduleItemInput");
if(_e){
_11=Number(_e.value);
}
if(_11){
if(this.fxSI){
this.fxSI(_11);
}
this.hide();
}
}
};
this.cancel=function(){
this.hide();
if(this.fxCancel){
this.fxCancel();
}
this.reset();
};
this.reset=function(){
var elt=elById("idEnterEstimateInput");
if(elt&&elt.value){
elt.value="";
}
elt=elById("idScheduleItemInput");
if(elt&&elt.selectedIndex){
elt.selectedIndex=0;
}
elt=elById("idEnterEstimate");
if(elt){
elt.checked=true;
}
var elt=elById("idEnterEstimateError");
if(elt){
hide(elt);
}
this.oPopup.fixShadow();
};
};
var GridEstimateBox=new function(){
var _13,_14,_15,_16,_17;
this.init=function(){
_13=FancyPopupManager.create("idGridEstimatePopup");
_13.oDiv.appendChild(_14=DOM.form({"method":"get"},DOM.h1({},FB_ESTIMATE+": "),elTip=DOM.div(),_15=DOM.input({"type":"text","autocomplete":"off","value":"none","name":"estimate","style":"margin-bottom:5px;margin-top:5px;"})," ",DOM.br(),DOM.nobr({},_16=DOM.input({"type":"button","class":"dlgButton","cHotKey":"o","value":FB_OK,"id":"Button_OK"})," ",DOM.input({"type":"button","class":"dlgButton","cHotKey":"c","value":FB_CANCEL,"id":"Button_Cancel","onclick":function(){
FancyPopupManager.hide();
return false;
}}))));
elTip.innerHTML=FB_ESTIMATING_TIPS;
};
var _18=0;
this.edit=function(el,_1a){
if(!_13){
this.init();
}
var _1b=function(){
_13.disableForSubmit();
changeEstimate(_1a,_15.value,function(){
GridEstimateBox.resultChangeEst(_13,elTip);
});
return false;
};
var _1c=XMLParser.getCustomTagValueFrom(el,"FB:EST");
_15.value=_1c;
_16.onclick=_1b;
_14.onsubmit=_1b;
if(!el.id){
el.id="__idEditGridEstimate"+(++_18);
}
_13.setWidth("1");
_13.show(el.id,POPUP_POSITION_BELOW);
elTip.className="none";
safeFocus(_15);
_15.select();
};
this.resultChangeEst=function(_1d,_1e){
var _1f=oAjaxRequest.responseXML();
if(!_1f){
return;
}
var _20=XMLParser.getTextFrom(_1f,"sError");
if(_20&&_20!=""){
_1e.className="errorLabel";
FancyPopupManager.enable(_1d.id);
return;
}
var _21=XMLParser.getCDataFrom(_1f,"BugFieldsJS");
if(_21){
var _22=eval("("+_21+")");
updateGridEstimate(_22,parseFloat(XMLParser.getTextFrom(_1f,"hrsRemainingChange")));
}
_1e.className="none";
FancyPopupManager.hide();
Info.hide();
};
};
var g_changeEstimateCallback;
function changeEstimate(_23,_24,_25){
if(!_23||_23==0){
return;
}
if(!oAjaxRequest){
oAjaxRequest=new AjaxRequest();
}
if(oAjaxRequest.isBusy()){
setTimeout(function(){
changeEstimate(_23,_24,_25);
},500);
}else{
g_changeEstimateCallback=undefined;
if(_25){
g_changeEstimateCallback=_25;
}
oAjaxRequest.initialize();
oAjaxRequest.onreadystatechange(_25);
var _26="pre=preEditEstimate&pg=pgEstimate&ixBug="+_23+"&hrsEst="+_24;
oAjaxRequest.open("GET",sDefaultURI+"?fAlaCarte=1&"+_26,true);
oAjaxRequest.send(null);
}
}
function updateGridEstimate(_27,_28){
if(window.GridControl){
var _29=GridControl.rowFromBug(_27.ixBug);
if(_29>=0){
var _2a=GridControl.getRowNode(_29);
var _2b=GridControl.getColFromRow(_2a,COLTYPE_ESTIMATE_CURRENT);
var _2c=GridControl.getColFromRow(_2a,COLTYPE_REMAINING_TIME);
var _2d=Math.max(0,_27.hrsCurrEst-_27.hrsElapsed);
var _2e=0;
var _2f=false;
if(_2b){
var _30=XMLParser.getCustomTagValueFrom(_2b,"FB:EST");
_2f=_30&&_30.length&&_30.length>1;
_2e=parseFloat(XMLParser.getCustomTagValueFrom(_2b,"FB:CSV"));
XMLParser.setCustomTagValue(_2b,"FB:EST",SFromHours(_27.hrsCurrEst));
XMLParser.setCustomTagValue(_2b,"FB:CSV",_27.hrsCurrEst);
}
if(_2c){
XMLParser.setCustomTagValue(_2c,"FB:REMAIN",SFromHours(_2d));
XMLParser.setCustomTagValue(_2c,"FB:CSV",_2d);
}
GridControl.walkTheRow(_29);
var _31=elById("idCaseTotalNoEst");
var _32=elById("idHrsTotalRemaining");
var _33=elById("idTotalRemaining");
if(_31&&_32&&_33){
if(!_2f){
decrInnerCount(elById("idCaseTotalNoEst"));
}
setInnerHTML(_32,0+parseFloat(_32.innerHTML)+_28);
setInnerHTML(_33,SFromHours(_32.innerHTML));
}
}
}
}
function updateViewEstimate(_34){
if("undefined"!=typeof (TabManager)&&TabManager&&"view"==TabManager.currentBugView()){
if(TabManager.getBug()&&TabManager.getBug().ixBug==_34.ixBug){
loadBug(_34.ixBug,"view");
}
}
}

