var _byteLenKey="org.apache.myfaces.trinidad.validator.ByteLengthValidator.MAXIMUM";
function TrByteLengthValidator(
a0,
a1
)
{
this._length=a0;
this._messages=a1;
this._class="TrByteLengthValidator";
}
TrByteLengthValidator.prototype=new TrValidator();
function CjkFormat(
a0,
a1
)
{
this._base=TrByteLengthValidator;
this._base(a0,a1);
this._class="CjkFormat";
}
CjkFormat.prototype=new TrByteLengthValidator();
CjkFormat.prototype.getHints=function(
a2
)
{
var a3=null;
if(this._messages["hint"])
{
a3=new Array();
a3.push(TrMessageFactory.createCustomMessage(
this._messages["hint"],
this._length)
);
}
return a3;
}
CjkFormat.prototype.validate=function(
a4,
a5,
a6
)
{
var a7=0;
var a8=this._length;
while(a7<a4.length)
{
var a9=a4.charCodeAt(a7);
if((a9<0x80)||((0xFF60<a9)&&(a9<0xFFA0)))a8--;
else a8-=2;
if(a8<0)
{
var a10;
if(!this._messages["detail"])
{
a10=_createFacesMessage(_byteLenKey,
a5,
a4,
this._length);
}
else
{
a10=_createCustomFacesMessage(
TrMessageFactory.getSummaryString(_byteLenKey),
this._messages["detail"],
a5,
a4,
this._length);
}
throw new TrValidatorException(a10);
}
a7++;
}
return a4;
}
function Utf8Format(
a0,
a1
)
{
this._base=TrByteLengthValidator;
this._base(a0,a1);
this._class="Utf8Format";
}
Utf8Format.prototype=new TrByteLengthValidator();
Utf8Format.prototype.getHints=function(
a2
)
{
var a3=null;
if(this._messages["hint"])
{
a3=new Array();
a3.push(TrMessageFactory.createCustomMessage(
this._messages["hint"],
this._length)
);
}
return a3;
}
Utf8Format.prototype.validate=function(
a4,
a5,
a6
)
{
var a7=0;
var a8=this._length;
while(a7<a4.length)
{
var a9=a4.charCodeAt(a7);
if(a9<0x80)a8--;
else if(a9<0x800)a8-=2;
else
{
if((a9&0xF800)==0xD800)
a8-=2;
else
a8-=3;
}
if(a8<0)
{
var a10;
if(!this._messages["detail"])
{
a10=_createFacesMessage(_byteLenKey,
a5,
a4,
this._length);
}
else
{
a10=_createCustomFacesMessage(
TrMessageFactory.getSummaryString(_byteLenKey),
this._messages["detail"],
a5,
a4,
this._length);
}
throw new TrValidatorException(a10);
}
a7++;
}
return a4;
}
function SBFormat(
a0,
a1
)
{
this._base=TrByteLengthValidator;
this._base(a0,a1);
this._class="SBFormat";
}
SBFormat.prototype=new TrByteLengthValidator();
SBFormat.prototype.getHints=function(
a2
)
{
var a3=null;
if(this._messages["hint"])
{
a3=new Array();
a3.push(TrMessageFactory.createCustomMessage(
this._messages["hint"],
this._length)
);
}
return a3;
}
SBFormat.prototype.validate=function(
a4,
a5,
a6
)
{
if(this._length<a4.length)
{
var a7;
if(!this._messages["detail"])
{
a7=_createFacesMessage(_byteLenKey,
a5,
a4,
this._length);
}
else
{
a7=_createCustomFacesMessage(
TrMessageFactory.getSummaryString(_byteLenKey),
this._messages["detail"],
a5,
a4,
this._length);
}
throw new TrValidatorException(a7);
}
return a4;
}

function TrNumberFormat(a0)
{
if(!a0)
alert("type for TrNumberFormat not defined!");
this._type=a0;
this._pPre=getLocaleSymbols().getPositivePrefix();
this._pSuf=getLocaleSymbols().getPositiveSuffix();
this._nPre=getLocaleSymbols().getNegativePrefix();
this._nSuf=getLocaleSymbols().getNegativeSuffix();
this._maxFractionDigits=3;
this._maxIntegerDigits=40;
this._minFractionDigits=0;
this._minIntegerDigits=1;
this._groupingUsed=true;
}
TrNumberFormat.getNumberInstance=function()
{
return new TrNumberFormat("number");
}
TrNumberFormat.getCurrencyInstance=function()
{
return new TrNumberFormat("currency");
}
TrNumberFormat.getPercentInstance=function()
{
return new TrNumberFormat("percent");
}
TrNumberFormat.prototype.setGroupingUsed=function(a1)
{
this._groupingUsed=a1;
}
TrNumberFormat.prototype.isGroupingUsed=function()
{
return this._groupingUsed;
}
TrNumberFormat.prototype.setMaximumIntegerDigits=function(a2)
{
if(a2)
{
this._maxIntegerDigits=a2<0?0:a2;
if(this._minIntegerDigits>this._maxIntegerDigits)
{
this._minIntegerDigits=this._maxIntegerDigits;
}
}
}
TrNumberFormat.prototype.getMaximumIntegerDigits=function()
{
return this._maxIntegerDigits;
}
TrNumberFormat.prototype.setMaximumFractionDigits=function(a3)
{
if(a3)
{
this._maxFractionDigits=a3<0?0:a3;
if(this._maxFractionDigits<this._minFractionDigits)
{
this._minFractionDigits=this._maxFractionDigits;
}
}
}
TrNumberFormat.prototype.getMaximumFractionDigits=function()
{
return this._maxFractionDigits;
}
TrNumberFormat.prototype.setMinimumIntegerDigits=function(a4)
{
if(a4)
{
this._minIntegerDigits=a4<0?0:a4;
if(this._minIntegerDigits>this._maxIntegerDigits)
{
this._maxIntegerDigits=this._minIntegerDigits;
}
}
}
TrNumberFormat.prototype.getMinimumIntegerDigits=function()
{
return this._minIntegerDigits;
}
TrNumberFormat.prototype.setMinimumFractionDigits=function(a5)
{
if(a5)
{
this._minFractionDigits=a5<0?0:a5;
if(this._maxFractionDigits<this._minFractionDigits)
{
this._maxFractionDigits=this._minFractionDigits;
}
}
}
TrNumberFormat.prototype.getMinimumFractionDigits=function()
{
return this._minFractionDigits;
}
TrNumberFormat.prototype.format=function(a6)
{
if(this._type=="percent")
return this.percentageToString(a6);
else if(this._type=="currency")
return this.currencyToString(a6);
else if(this._type=="number")
return this.numberToString(a6);
}
TrNumberFormat.prototype.parse=function(a7)
{
if(this._type=="percent")
return this.stringToPercentage(a7);
else if(this._type=="currency")
return this.stringToCurrency(a7);
}
TrNumberFormat.prototype.stringToCurrency=function(a8)
{
var a9=a8.indexOf(this._nPre);
if(a9!=-1)
{
a8=a8.substr(this._nPre.length,a8.length);
var a10=a8.indexOf(this._nSuf);
if(a10!=-1)
{
a8=a8.substr(0,a8.length-this._nSuf.length);
return(parseFloat(a8)*-1);
}
else
{
throw new TrParseException("not able to parse number");
}
}
else
{
var a11=a8.indexOf(this._pPre);
if(a11!=-1)
{
a8=a8.substr(this._pPre.length,a8.length);
var a12=a8.indexOf(this._pSuf);
if(a12!=-1)
{
a8=a8.substr(0,a8.length-this._pSuf.length);
a8=parseFloat(a8);
}
else
{
throw new TrParseException("not able to parse number");
}
return a8;
}
else
{
throw new TrParseException("not able to parse number");
}
}
}
TrNumberFormat.prototype.stringToPercentage=function(a13)
{
var a14=(a13.indexOf('%')!=-1);
var a15=a13.replace(/\%/g,'');
a15=parseFloat(a15);
if(!a14||isNaN(a15))
{
throw new TrParseException("not able to parse number");
}
return a15;
}
TrNumberFormat.prototype.numberToString=function(a16)
{
var a17=a16<0;
if(a17)
a16=(a16*-1);
var a18=a16+"";
var a19=a18.indexOf(".");
var a20=a18.length;
var a21;
var a22;
if(a19!=-1)
{
a21=a18.substring(0,a19);
a22=a18.substring(a19+1,a20);
}
else
{
a21=a18;
a22="";
}
a21=this._formatIntegers(a21);
a22=this._formatFractions(a22)
var a23=getLocaleSymbols().getDecimalSeparator();
if(a22!="")
a18=(a21+a23+a22);
else
a18=(a21);
if(a17)
a18="-"+a18;
return a18;
}
TrNumberFormat.prototype.currencyToString=function(a24)
{
if(a24<0)
{
a24=(a24*-1)+"";
a24=this.numberToString(a24);
return this._nPre+a24+this._nSuf;
}
else
{
a24=this.numberToString(a24);
return this._pPre+a24+this._pSuf;
}
}
TrNumberFormat.prototype.percentageToString=function(a25)
{
a25=a25*100;
a25=this.getRounded(a25);
if(isNaN(a25))
{
throw new TrParseException("not able to parse number");
}
a25=this.numberToString(a25);
return a25+'%';
}
TrNumberFormat.prototype.getRounded=function(a26)
{
a26=this.moveDecimalRight(a26);
a26=Math.round(a26);
a26=this.moveDecimalLeft(a26);
return a26;
}
TrNumberFormat.prototype.moveDecimalRight=function(a27)
{
var a28='';
a28=this.moveDecimal(a27,false);
return a28;
}
TrNumberFormat.prototype.moveDecimalLeft=function(a29)
{
var a30='';
a30=this.moveDecimal(a29,true);
return a30;
}
TrNumberFormat.prototype.moveDecimal=function(a31,a32)
{
var a33='';
a33=this.moveDecimalAsString(a31,a32);
return parseFloat(a33);
}
TrNumberFormat.prototype.moveDecimalAsString=function(a34,a35)
{
var a36=2;
if(a36<=0)
return a34;
var a37=a34+'';
var a38=this.getZeros(a36);
var a39=new RegExp('([0-9.]+)');
if(a35)
{
a37=a37.replace(a39,a38+'$1');
var a40=new RegExp('(-?)([0-9]*)([0-9]{'+a36+'})(\\.?)');
a37=a37.replace(a40,'$1$2.$3');
}
else
{
var a41=a39.exec(a37);
if(a41!=null)
{
a37=a37.substring(0,a41.index)+a41[1]+a38+a37.substring(a41.index+a41[0].length);
}
var a40=new RegExp('(-?)([0-9]*)(\\.?)([0-9]{'+a36+'})');
a37=a37.replace(a40,'$1$2$4.');
}
a37=a37.replace(/\.$/,'');
return a37;
}
TrNumberFormat.prototype.getZeros=function(a42)
{
var a43='';
var a44;
for(a44=0;a44<a42;a44++){
a43+='0';
}
return a43;
}
TrNumberFormat.prototype._formatIntegers=function(a45)
{
var a46=a45.length;
var a47=this.getMaximumIntegerDigits();
var a48=this.getMinimumIntegerDigits();
var a49;
if(a46>a47)
{
a49=a46-a47;
a45=a45.substring(a49,a46);
}
else if(a46<a48)
{
a49=a48-a46;
var a50="";
while(a49>0)
{
a50="0"+a50;
--a49;
}
a45=a50+a45;
}
if(this.isGroupingUsed())
{
a45=this._addGroupingSeparators(a45);
}
return a45;
}
TrNumberFormat.prototype._formatFractions=function(a51)
{
var a52=a51.length;
var a53=this.getMaximumFractionDigits();
var a54=this.getMinimumFractionDigits();
if(a52>a53&&a53>a54)
{
a51=a51.substring(0,a53);
}
if(a52<a54)
{
var a55=a54-a52;
while(a55>0)
{
a51=a51+"0";
--a55;
}
}
return a51;
}
TrNumberFormat.prototype._addGroupingSeparators=function(a56)
{
var a57=a56.length;
var a58=a57%3;
var a59;
var a60;
var a61="";
if(a58>0)
{
a59=a56.substring(0,a58);
a60=a56.substring(a58,a57);
}
else
{
a59="";
a60=a56;
}
var a62=getLocaleSymbols().getGroupingSeparator();
for(i=0;i<a60.length;i++)
{
if(i%3==0&&i!=0)
{
a61+=a62;
}
a61+=a60.charAt(i);
}
a56=a59+a61;
return a56;
}
function TrParseException(
a0
)
{
this._message=a0;
}
TrParseException.prototype.getMessage=function()
{
return this._message;
}

function TrNumberConverter(
a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11)
{
this._pattern=a0;
this._type=a1;
this._locale=a2;
this._messages=a3;
this._currencyCode=a6;
this._currencySymbol=a7;
this._maxFractionDigits=a8;
this._maxIntegerDigits=a9;
this._minFractionDigits=a10;
this._minIntegerDigits=a11;
if(a4!==undefined)
this._integerOnly=a4;
else
this._integerOnly=false;
if(a5!==undefined)
this._groupingUsed=a5;
else
this._groupingUsed=true;
this._initNumberFormat();
this._class="TrNumberConverter";
}
TrNumberConverter.prototype=new TrConverter();
TrNumberConverter.prototype.setCurrencyCode=function(a12)
{
this._currencyCode=a12;
}
TrNumberConverter.prototype.getCurrencyCode=function()
{
return this._currencyCode;
}
TrNumberConverter.prototype.setCurrencySymbol=function(a13)
{
this._currencySymbol=a13;
}
TrNumberConverter.prototype.getCurrencySymbol=function()
{
return this._currencySymbol;
}
TrNumberConverter.prototype.setMaxFractionDigits=function(a14)
{
this._maxFractionDigits=a14;
}
TrNumberConverter.prototype.getMaxFractionDigits=function()
{
return this._maxFractionDigits;
}
TrNumberConverter.prototype.setMaxIntegerDigits=function(a15)
{
this._maxIntegerDigits=a15;
}
TrNumberConverter.prototype.getMaxIntegerDigits=function()
{
return this._maxIntegerDigits;
}
TrNumberConverter.prototype.setMinFractionDigits=function(a16)
{
this._minFractionDigits=a16;
}
TrNumberConverter.prototype.getMinFractionDigits=function()
{
return this._minFractionDigits;
}
TrNumberConverter.prototype.setMinIntegerDigits=function(a17)
{
this._minIntegerDigits=a17;
}
TrNumberConverter.prototype.getMinIntegerDigits=function()
{
return this._minIntegerDigits;
}
TrNumberConverter.prototype.setGroupingUsed=function(a18)
{
this._groupingUsed=a18;
}
TrNumberConverter.prototype.isGroupingUsed=function()
{
return this._groupingUsed;
}
TrNumberConverter.prototype.setIntegerOnly=function(a19)
{
this._integerOnly=a19;
}
TrNumberConverter.prototype.isIntegerOnly=function()
{
return this._integerOnly;
}
TrNumberConverter.prototype.getFormatHint=function()
{
if(this._messages&&this._messages["hintPattern"])
{
return TrMessageFactory.createCustomMessage(
this._messages["hintPattern"],
this._pattern);
}
else
{
if(this._pattern)
{
return TrMessageFactory.createMessage(
"org.apache.myfaces.trinidad.convert.NumberConverter.FORMAT_HINT",
this._pattern);
}
else
{
return null;
}
}
}
TrNumberConverter.prototype.getAsString=function(
a20,
a21
)
{
if(this._isConvertible())
{
if(this._type=="percent"||this._type=="currency")
{
var a22=this._numberFormat.format(a20);
if(this._type=="currency")
{
if(this._currencyCode)
{
a22=a22.replace(getLocaleSymbols().getCurrencyCode(),this._currencyCode);
}
else if(this._currencySymbol)
{
a22=a22.replace(getLocaleSymbols().getCurrencySymbol(),this._currencySymbol);
}
}
return a22;
}
else
{
return this._numberFormat.format(a20);
}
}
else
{
return undefined;
}
}
TrNumberConverter.prototype.getAsObject=function(
a23,
a24
)
{
if(a23==null)
return null;
a23=TrUIUtils.trim(a23);
if(a23.length==0)
return null
if(this._isConvertible())
{
var a25;
if(this._type=="percent"||this._type=="currency")
{
try
{
var a26=getLocaleSymbols().getGroupingSeparator();
var a27=new RegExp("\\"+a26,"g");
a23=a23.replace(a27,"");
var a28=getLocaleSymbols().getDecimalSeparator();
var a29=new RegExp("\\"+a28,"g");
a23=a23.replace(a29,".");
a23=this._numberFormat.parse(a23)+"";
var a30=new RegExp("\\"+".","g");
a23=a23.replace(a30,a28);
}
catch(e)
{
var a31;
var a32=this._numberFormat.format(this._example);
var a33="org.apache.myfaces.trinidad.convert.NumberConverter.CONVERT_"+this._type.toUpperCase();
if(this._messages&&this._messages[this._type])
{
a31=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a33),
this._messages[this._type],
a24,
a23,
a32);
}
else
{
a31=_createFacesMessage(a33,
a24,
a23,
a32);
}
throw new TrConverterException(a31);
}
}
a25=_decimalParse(a23,
this._messages,
"org.apache.myfaces.trinidad.convert.NumberConverter",
null,
null,
null,
null,
a24,
!this.isIntegerOnly());
a25=parseFloat(a25.toFixed(this._numberFormat.getMaximumFractionDigits()));
if(this._type=="percent")
{
a25=a25/100;
}
return a25;
}
else
{
return undefined;
}
}
TrNumberConverter.prototype._isConvertible=function()
{
if((this._pattern==null)&&(this._locale==null))
{
return true;
}
else
{
return false;
}
}
TrNumberConverter.prototype._initNumberFormat=function()
{
if(this._type=="percent")
{
this._example=0.3423;
this._numberFormat=TrNumberFormat.getPercentInstance();
}
else if(this._type=="currency")
{
this._example=10250;
this._numberFormat=TrNumberFormat.getCurrencyInstance();
}
else if(this._type=="number")
{
this._numberFormat=TrNumberFormat.getNumberInstance();
}
this._numberFormat.setGroupingUsed(this.isGroupingUsed());
this._numberFormat.setMaximumFractionDigits(this.getMaxFractionDigits());
this._numberFormat.setMaximumIntegerDigits(this.getMaxIntegerDigits());
this._numberFormat.setMinimumFractionDigits(this.getMinFractionDigits());
this._numberFormat.setMinimumIntegerDigits(this.getMinIntegerDigits());
}

function TrIntegerConverter(
a0,
a1,
a2,
a3,
a4)
{
this._message=a0;
this._maxPrecision=a1;
this._maxScale=a2;
this._maxValue=a3;
this._minValue=a4;
this._class="TrIntegerConverter";
}
TrIntegerConverter.prototype=new TrConverter();
TrIntegerConverter.prototype.getFormatHint=function()
{
return null;
}
TrIntegerConverter.prototype.getAsString=function(
a5,
a6
)
{
return""+a5;
}
TrIntegerConverter.prototype.getAsObject=function(
a7,
a8
)
{
return _decimalParse(a7,
this._message,
"org.apache.myfaces.trinidad.convert.IntegerConverter",
this._maxPrecision,
this._maxScale,
this._maxValue,
this._minValue,
a8,
null);
}
function TrLongConverter(
a0,
a1,
a2,
a3,
a4)
{
this._message=a0;
this._maxPrecision=a1;
this._maxScale=a2;
this._maxValue=a3;
this._minValue=a4;
this._class="TrLongConverter";
}
TrLongConverter.prototype=new TrConverter();
TrLongConverter.prototype.getFormatHint=function()
{
return null;
}
TrLongConverter.prototype.getAsString=function(
a5,
a6
)
{
return""+a5;
}
TrLongConverter.prototype.getAsObject=function(
a7,
a8
)
{
return _decimalParse(a7,
this._message,
"org.apache.myfaces.trinidad.convert.LongConverter",
this._maxPrecision,
this._maxScale,
this._maxValue,
this._minValue,
a8,
null);
}
function TrShortConverter(
a0,
a1,
a2,
a3,
a4)
{
this._message=a0;
this._maxPrecision=a1;
this._maxScale=a2;
this._maxValue=a3;
this._minValue=a4;
this._class="TrShortConverter";
}
TrShortConverter.prototype=new TrConverter();
TrShortConverter.prototype.getFormatHint=function()
{
return null;
}
TrShortConverter.prototype.getAsString=function(
a5,
a6
)
{
return""+a5;
}
TrShortConverter.prototype.getAsObject=function(
a7,
a8
)
{
return _decimalParse(a7,
this._message,
"org.apache.myfaces.trinidad.convert.ShortConverter",
this._maxPrecision,
this._maxScale,
this._maxValue,
this._minValue,
a8,
null);
}
function TrByteConverter(
a0,
a1,
a2,
a3,
a4)
{
this._message=a0;
this._maxPrecision=a1;
this._maxScale=a2;
this._maxValue=a3;
this._minValue=a4;
this._class="TrByteConverter";
}
TrByteConverter.prototype=new TrConverter();
TrByteConverter.prototype.getFormatHint=function()
{
return null;
}
TrByteConverter.prototype.getAsString=function(
a5,
a6
)
{
return""+a5;
}
TrByteConverter.prototype.getAsObject=function(
a7,
a8
)
{
return _decimalParse(a7,
this._message,
"org.apache.myfaces.trinidad.convert.ByteConverter",
this._maxPrecision,
this._maxScale,
this._maxValue,
this._minValue,
a8,
null);
}
function TrDoubleConverter(
a0,
a1,
a2,
a3,
a4)
{
this._message=a0;
this._maxPrecision=a1;
this._maxScale=a2;
this._maxValue=a3;
this._minValue=a4;
this._class="TrDoubleConverter";
}
TrDoubleConverter.prototype=new TrConverter();
TrDoubleConverter.prototype.getFormatHint=function()
{
return null;
}
TrDoubleConverter.prototype.getAsString=function(
a5,
a6
)
{
var a7=""+a5;
var a8=a7.indexOf(".");
if(a8!=-1)
return a7;
else
return""+a5.toFixed(1);
}
TrDoubleConverter.prototype.getAsObject=function(
a9,
a10
)
{
return _decimalParse(a9,
this._message,
"org.apache.myfaces.trinidad.convert.DoubleConverter",
this._maxPrecision,
this._maxScale,
this._maxValue,
this._minValue,
a10,
true);
}
function TrFloatConverter(
a0,
a1,
a2,
a3,
a4)
{
this._message=a0;
this._maxPrecision=a1;
this._maxScale=a2;
this._maxValue=a3;
this._minValue=a4;
this._class="TrFloatConverter";
}
TrFloatConverter.prototype=new TrConverter();
TrFloatConverter.prototype.getFormatHint=function()
{
return null;
}
TrFloatConverter.prototype.getAsString=function(
a5,
a6
)
{
var a7=""+a5;
var a8=a7.indexOf(".");
if(a8!=-1)
return a7;
else
return""+a5.toFixed(1);
}
TrFloatConverter.prototype.getAsObject=function(
a9,
a10
)
{
return _decimalParse(a9,
this._message,
"org.apache.myfaces.trinidad.convert.FloatConverter",
this._maxPrecision,
this._maxScale,
this._maxValue,
this._minValue,
a10,
true);
}
function TrRangeValidator(
a0,
a1,
a2)
{
this._maxValue=a0;
this._minValue=a1;
this._messages=a2;
this._class="TrRangeValidator";
}
TrRangeValidator.prototype=new TrValidator();
TrRangeValidator.prototype.getHints=function(
a3
)
{
return _returnRangeHints(
this._messages,
this._maxValue,
this._minValue,
"org.apache.myfaces.trinidad.validator.RangeValidator.MAXIMUM_HINT",
"org.apache.myfaces.trinidad.validator.RangeValidator.MINIMUM_HINT",
"org.apache.myfaces.trinidad.validator.RangeValidator.RANGE_HINT",
"hintMax",
"hintMin",
"hintRange"
);
}
TrRangeValidator.prototype.validate=function(
a4,
a5,
a6
)
{
string=""+a4;
numberValue=parseFloat(string);
var a7;
if(this._minValue!=null&&this._maxValue!=null)
{
if(numberValue>=this._minValue&&numberValue<=this._maxValue)
{
return string;
}
else
{
var a8="org.apache.myfaces.trinidad.validator.LongRangeValidator.NOT_IN_RANGE";
if(this._messages&&this._messages["range"])
{
a7=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a8),
this._messages["range"],
a5,
string,
""+this._minValue,
""+this._maxValue);
}
else
{
a7=_createFacesMessage(a8,
a5,
string,
""+this._minValue,
""+this._maxValue);
}
}
}
else
{
if(this._minValue!=null)
{
if(numberValue>=this._minValue)
{
return string;
}
else
{
var a8="org.apache.myfaces.trinidad.validator.LongRangeValidator.MINIMUM";
if(this._messages&&this._messages["min"])
{
a7=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a8),
this._messages["min"],
a5,
string,
""+this._minValue);
}
else
{
a7=_createFacesMessage(a8,
a5,
string,
""+this._minValue);
}
}
}
else
{
if(this._maxValue==null||numberValue<=this._maxValue)
{
return string;
}
else
{
var a8="org.apache.myfaces.trinidad.validator.LongRangeValidator.MAXIMUM";
if(this._messages&&this._messages["max"])
{
a7=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a8),
this._messages["max"],
a5,
string,
""+this._maxValue);
}
else
{
a7=_createFacesMessage(a8,
a5,
string,
""+this._maxValue);
}
}
}
}
throw new TrConverterException(a7);
}
function TrLengthValidator(
a0,
a1,
a2)
{
this._maxValue=a0;
this._minValue=a1;
this._messages=a2;
this._class="TrLengthValidator";
}
TrLengthValidator.prototype=new TrValidator();
TrLengthValidator.prototype.getHints=function(
a3
)
{
return _returnRangeHints(
this._messages,
this._maxValue,
this._minValue,
"org.apache.myfaces.trinidad.validator.LengthValidator.MAXIMUM_HINT",
"org.apache.myfaces.trinidad.validator.LengthValidator.MINIMUM_HINT",
(this._minValue==this._maxValue)
?"org.apache.myfaces.trinidad.validator.LengthValidator.EXACT_HINT"
:"org.apache.myfaces.trinidad.validator.LengthValidator.RANGE_HINT",
"hintMax",
"hintMin",
"hintRange"
);
}
TrLengthValidator.prototype.validate=function(
a4,
a5,
a6
)
{
var a7=""+a4;
var a8=a7.length;
if(a8>=this._minValue&&
((this._maxValue==null)||(a8<=this._maxValue)))
{
return a7;
}
else
{
if((this._minValue>0)&&(this._maxValue!=null))
{
var a9=(this._minValue==this._maxValue);
var a10=a9
?"org.apache.myfaces.trinidad.validator.LengthValidator.EXACT"
:"org.apache.myfaces.trinidad.validator.LengthValidator.NOT_IN_RANGE";
var a11;
var a12="range";
if(this._messages&&this._messages[a12])
{
a11=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a10),
this._messages[a12],
a5,
a7,
""+this._minValue,
""+this._maxValue);
}
else
{
a11=_createFacesMessage(a10,
a5,
a7,
""+this._minValue,
""+this._maxValue);
}
throw new TrConverterException(a11);
}
else if(a8<this._minValue)
{
var a10="org.apache.myfaces.trinidad.validator.LengthValidator.MINIMUM";
var a11;
if(this._messages&&this._messages["min"])
{
a11=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a10),
this._messages["min"],
a5,
a7,
""+this._minValue);
}
else
{
a11=_createFacesMessage(a10,
a5,
a7,
""+this._minValue);
}
throw new TrConverterException(a11);
}
else
{
var a10="org.apache.myfaces.trinidad.validator.LengthValidator.MAXIMUM";
var a11;
if(this._messages&&this._messages["max"])
{
a11=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a10),
this._messages["max"],
a5,
a7,
""+this._maxValue);
}
else
{
a11=_createFacesMessage(a10,
a5,
a7,
""+this._maxValue);
}
throw new TrConverterException(a11);
}
}
}
function TrDateTimeRangeValidator(
a0,
a1,
a2)
{
this._maxValue=a0;
this._minValue=a1;
this._messages=a2;
this._class="TrDateTimeRangeValidator";
}
TrDateTimeRangeValidator.prototype=new TrValidator();
TrDateTimeRangeValidator.prototype.getHints=function(
a3
)
{
var a4=null;
var a5=null;
if(this._maxValue)
a4=this._maxValue;
if(this._minValue)
a5=this._minValue;
return _returnRangeHints(
this._messages,
a4,
a5,
"org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.MAXIMUM_HINT",
"org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.MINIMUM_HINT",
"org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.RANGE_HINT",
"hintMax",
"hintMin",
"hintRange"
);
}
TrDateTimeRangeValidator.prototype.validate=function(
a6,
a7,
a8
)
{
dateTime=a6.getTime();
var a9;
if(this._minValue&&this._maxValue)
{
try
{
minDate=(a8.getAsObject(this._minValue)).getTime();
maxDate=(a8.getAsObject(this._maxValue)).getTime();
}
catch(e)
{
return a6;
}
if(dateTime>=minDate&&dateTime<=maxDate)
{
return a6;
}
else
{
var a10="org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.NOT_IN_RANGE";
if(this._messages&&this._messages["range"])
{
a9=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a10),
this._messages["range"],
a7,
""+a8.getAsString(a6),
""+this._minValue,
""+this._maxValue);
}
else
{
a9=_createFacesMessage(a10,
a7,
""+a8.getAsString(a6),
""+this._minValue,
""+this._maxValue);
}
}
}
else
{
if(this._minValue)
{
try
{
minDate=(a8.getAsObject(this._minValue)).getTime();
}
catch(e)
{
return a6;
}
if(dateTime>=minDate)
{
return a6;
}
else
{
var a10="org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.MINIMUM";
if(this._messages&&this._messages["min"])
{
a9=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a10),
this._messages["min"],
a7,
""+a8.getAsString(a6),
""+this._minValue);
}
else
{
a9=_createFacesMessage(a10,
a7,
""+a8.getAsString(a6),
""+this._minValue);
}
}
}
else if(this._maxValue)
{
try
{
maxDate=(a8.getAsObject(this._maxValue)).getTime();
}
catch(e)
{
return a6;
}
if(dateTime<=maxDate)
{
return a6;
}
else
{
var a10="org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.MAXIMUM";
if(this._messages&&this._messages["max"])
{
a9=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a10),
this._messages["max"],
a7,
""+a8.getAsString(a6),
""+this._maxValue);
}
else
{
a9=_createFacesMessage(a10,
a7,
""+a8.getAsString(a6),
""+this._maxValue);
}
}
}
else
{
return a6;
}
}
throw new TrConverterException(a9);
}
function TrDateRestrictionValidator(
a0,
a1,
a2)
{
this._weekdaysValue=a0;
this._monthValue=a1;
this._messages=a2;
this._weekdaysMap={'2':'tue','4':'thu','6':'sat','1':'mon','3':'wed','5':'fri','0':'sun'};
this._translatedWeekdaysMap={'sun':'0','mon':'1','tue':'2','wed':'3','thu':'4','fri':'5','sat':'6'};
this._monthMap={'2':'mar','4':'may','9':'oct','8':'sep','11':'dec','6':'jul','1':'feb','3':'apr','10':'nov','7':'aug','5':'jun','0':'jan'};
this._translatedMonthMap={'jan':'0','feb':'1','mar':'2','apr':'3','may':'4','jun':'5','jul':'6','aug':'7','sep':'8','oct':'9','nov':'10','dec':'11'};
this._class="TrDateRestrictionValidator";
}
TrDateRestrictionValidator.prototype=new TrValidator();
TrDateRestrictionValidator.prototype.getHints=function(
a3
)
{
var a4=['mon','tue','wed','thu','fri','sat','sun'];
var a5=['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'];
if(this._weekdaysValue)
TrCollections.removeValuesFromArray(this._weekdaysValue,a4);
if(this._monthValue)
TrCollections.removeValuesFromArray(this._monthValue,a5);
return _returnHints(
this._messages,
!this._weekdaysValue?this._weekdaysValue:this._translate(a4,this._translatedWeekdaysMap,a3.getLocaleSymbols().getWeekdays()),
!this._monthValue?this._monthValue:this._translate(a5,this._translatedMonthMap,a3.getLocaleSymbols().getMonths()),
"org.apache.myfaces.trinidad.validator.DateRestrictionValidator.WEEKDAY_HINT",
"org.apache.myfaces.trinidad.validator.DateRestrictionValidator.MONTH_HINT",
"hintWeek",
"hintMonth"
);
}
TrDateRestrictionValidator.prototype._translate=function(
values,
map,
valueArray
)
{
if(values)
{
var translatedValues=new Array();
var valuesAsArray=eval(values);
for(i=0;i<valuesAsArray.length;i++)
{
translatedValues.push(valueArray[map[valuesAsArray[i].toLowerCase()]]);
}
return eval(translatedValues);
}
else
{
return values;
}
}
TrDateRestrictionValidator.prototype.validate=function(
value,
label,
converter
)
{
submittedDay=value.getDay();
weekDaysArray=eval(this._weekdaysValue);
if(weekDaysArray)
{
var dayString=this._weekdaysMap[submittedDay];
for(var i=0;i<weekDaysArray.length;++i)
{
if(weekDaysArray[i].toLowerCase()==dayString)
{
var allWeekdays=['mon','tue','wed','thu','fri','sat','sun'];
TrCollections.removeValuesFromArray(this._weekdaysValue,allWeekdays);
var days=this._translate(allWeekdays,this._translatedWeekdaysMap,converter.getLocaleSymbols().getWeekdays());
var facesMessage;
var key="org.apache.myfaces.trinidad.validator.DateRestrictionValidator.WEEKDAY";
if(this._messages&&this._messages["days"])
{
facesMessage=_createCustomFacesMessage(TrMessageFactory.getSummaryString(key),
this._messages["days"],
label,
""+converter.getAsString(value),
days);
}
else
{
facesMessage=_createFacesMessage(key,
label,
""+converter.getAsString(value),
days);
}
throw new TrConverterException(facesMessage);
}
}
}
submittedMonth=value.getMonth();
monthArray=eval(this._monthValue);
if(monthArray)
{
var monthString=this._monthMap[submittedMonth];
for(var i=0;i<monthArray.length;++i)
{
if(monthArray[i].toLowerCase()==monthString)
{
var allMonth=['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'];
TrCollections.removeValuesFromArray(this._monthValue,allMonth);
var month=this._translate(allMonth,this._translatedMonthMap,converter.getLocaleSymbols().getMonths());
var facesMessage;
var key="org.apache.myfaces.trinidad.validator.DateRestrictionValidator.MONTH";
if(this._messages&&this._messages["month"])
{
facesMessage=_createCustomFacesMessage(TrMessageFactory.getSummaryString(key),
this._messages["month"],
label,
""+converter.getAsString(value),
month);
}
else
{
facesMessage=_createFacesMessage(key,
label,
""+converter.getAsString(value),
month);
}
throw new TrConverterException(facesMessage);
}
}
}
return value;
}
function _decimalParse(
a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8
)
{
if(a0==null)
return null;
a0=TrUIUtils.trim(a0);
if(a0.length==0)
return null
var a9=null;
var a10=getLocaleSymbols();
if(a10)
{
var a11=a10.getGroupingSeparator();
if((a0.indexOf(a11)==0)||
(a0.lastIndexOf(a11)==(a0.length-1)))
{
a9=_createFacesMessage(a2+".CONVERT",
a7,
a0);
throw new TrConverterException(a9);
}
if(a11=="\xa0"){
var a12=new RegExp("\\ ","g");
a0=a0.replace(a12,"\xa0");
}
var a13=new RegExp("\\"+a11,"g");
a0=a0.replace(a13,"");
var a14=new RegExp("\\"+a10.getDecimalSeparator(),"g");
a0=a0.replace(a14,".");
}
if((a0.indexOf('e')<0)&&
(a0.indexOf('E')<0)&&
(((a0*a0)==0)||
((a0/a0)==1)))
{
var a15=null;
var a16=false;
if(a8!=null)
{
a15=parseFloat(a0);
}
else
{
a15=parseInt(a0);
if(a15<parseFloat(a0))
{
a16=true;
}
}
if(!a16&&!isNaN(a15))
{
var a17=a0.length;
var a18=0;
var a19=a0.lastIndexOf('.');
if(a19!=-1)
{
a17=a19;
a18=parseInt(a0.length-parseInt(a19-1));
}
var a20;
var a21;
if((a5!=null)&&
(a15>a5))
{
a20=a2+".MAXIMUM";
a21=a5;
}
else if((a6!=null)&&
(a15<a6))
{
a20=a2+".MINIMUM";
a21=a6;
}
if(a20)
{
a9=_createFacesMessage(a20,
a7,
a0,
""+a21);
throw new TrConverterException(a9);
}
return a15;
}
}
var a22=null;
var a23=false;
if(a2.indexOf("NumberConverter")==-1)
{
a22=a2+".CONVERT";
}
else
{
a22=a2+".CONVERT_NUMBER";
if(a1&&a1["number"])
{
a9=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a22),
a1["number"],
a7,
a0);
a23=true;
}
}
if(!a23)
{
a9=_createFacesMessage(a22,
a7,
a0);
}
throw new TrConverterException(a9);
}
function TrRegExpValidator(
a0,
a1
)
{
this._pattern=a0;
this._messages=a1;
this._class="TrRegExpValidator";
}
TrRegExpValidator.prototype=new TrValidator();
TrRegExpValidator.prototype.getHints=function(
a2
)
{
var a3=null;
if(this._messages["hint"])
{
a3=new Array();
a3.push(TrMessageFactory.createCustomMessage(
this._messages["hint"],
""+this._pattern)
);
}
return a3;
}
TrRegExpValidator.prototype.validate=function(
a4,
a5,
a6
)
{
a4=a4+'';
var a7=a4.match(this._pattern);
if((a7!=(void 0))&&(a7[0]==a4))
{
return a4;
}
else
{
var a8="org.apache.myfaces.trinidad.validator.RegExpValidator.NO_MATCH";
var a9;
if(this._messages&&this._messages["detail"])
{
a9=_createCustomFacesMessage(
TrMessageFactory.getSummaryString(a8),
this._messages["detail"],
a5,
a4,
this._pattern);
}
else
{
a9=_createFacesMessage(a8,
a5,
a4,
this._pattern);
}
throw new TrValidatorException(a9);
}
}
function _returnRangeHints(
a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8
)
{
if(a1&&a2)
{
var a9=new Array();
if(a0&&a0[a8])
{
a9.push(
TrMessageFactory.createCustomMessage(
a0[a8],
""+a2,
""+a1)
);
}
else
{
a9.push(
TrMessageFactory.createMessage(
a5,
""+a2,
""+a1)
);
}
return a9;
}
return _returnHints(
a0,
a1,
a2,
a3,
a4,
a6,
a7
);
}
function _returnHints(
a0,
a1,
a2,
a3,
a4,
a5,
a6
)
{
var a7;
if(a1)
{
a7=new Array();
if(a0&&a0[a5])
{
a7.push(
TrMessageFactory.createCustomMessage(
a0[a5],
""+a1)
);
}
else
{
a7.push(
TrMessageFactory.createMessage(
a3,
""+a1)
);
}
}
if(a2)
{
if(!a7)
{
a7=new Array();
}
if(a0&&a0[a6])
{
a7.push(
TrMessageFactory.createCustomMessage(
a0[a6],
""+a2)
);
}
else
{
a7.push(
TrMessageFactory.createMessage(
a4,
""+a2)
);
}
}
return a7;
}

var TrCollections=new Object();
TrCollections.removeValuesFromArray=function(
a0,
a1
)
{
if(a0&&a1)
{
for(i=0;i<a0.length;i++)
{
var a2=a0[i];
for(j=0;j<a1.length;j++)
{
if(a1[j].toLowerCase()==a2.toLowerCase())
{
a1.splice(j,1);
}
}
}
}
}

function _dfsv(
a0,
a1
)
{
if((a0==(void 0))||(a1==(void 0)))
return;
a1+=_getDayLightSavOffset(a1);
a1+=_getTimePortion(a0);
a1+=_getLocaleTimeZoneDifference();
var a2=new Date(a1);
var a3=_getDateFieldFormat(a0);
var a4=a0.value;
var a1=a3.getAsString(a2);
if(a0.value!=a1)
{
if(a0.onchange!=(void 0))
{
if(_agent.isIE)
{
a0.onpropertychange=function()
{
var a5=window.event;
if(a5.propertyName=='value')
{
a0.onpropertychange=function(){};
a0.onchange(a5);
}
}
a0.value=a1;
}
else
{
a0.value=a1;
var a5=new Object();
a5.type='change';
a5.target=a0;
a0.onchange(a5);
}
}
else
{
a0.value=a1;
}
}
a0.select();
a0.focus();
}
function _getDayLightSavOffset(a0)
{
var a1=new Date();
var a2=new Date(a0);
var a3=a2.getTimezoneOffset()-a1.getTimezoneOffset();
return(a3*60*1000);
}
function _returnCalendarValue(
a0,
a1
)
{
var a2=a0.returnValue;
if(a2!=(void 0))
{
var a3=a0._dateField;
if(a3==(void 0))
{
a3=_savedField1879034;
}
_dfsv(a3,a2);
}
}
function _returnPopupCalendarValue(
a0,
a1
)
{
if(a1!=(void 0))
{
var a2=a0['formName'];
var a3=a0['fieldName'];
var a4=document.forms[a2][a3];
_dfsv(a4,a1);
}
}
function _ldp(
a0,
a1,
a2,
a3,
a4,
a5
)
{
var a6=document.forms[a0][a1];
var a7=_dfgv(a6);
if(!a7)
{
a7=new Date();
}
if(!a5)
{
a5=_jspDir+_getQuerySeparator(_jspDir);
if(a2)
a5+="_t=cd";
else
a5+="_t=fred&_red=cd";
}
else
{
var a8=a5.lastIndexOf('?');
var a9="";
if(a8==-1)
{
a8=a5.length;
}
else
{
a9=a5.substr(a8+1);
}
var a10=a5.lastIndexOf('/',a8);
var a11=a5.substring(0,a10+1);
a11+=_jspDir+_getQuerySeparator(_jspDir);
a11+=a9;
a11+=_getQuerySeparator(a11);
a11+="_t=fred";
var a12=a5.substring(a10+1,a8);
a5=a11;
a5+="&redirect="+escape(a12);
}
a5+="&value="+a7.getTime();
a5+="&loc="+_locale;
if(window["_enc"])
{
a5+="&enc="+_enc;
}
if(a3!=(void 0))
{
a5+="&minValue="+a3;
}
if(a4!=(void 0))
{
a5+="&maxValue="+a4;
}
if(a2)
{
TrPopupDialog._launchDialog(
a5,
{},
_returnPopupCalendarValue,
{'formName':a0,'fieldName':a1});
}
else
{
var a13=openWindow(self,
a5,
'uix_2807778',
{width:350,height:370},
true,
void 0,
_returnCalendarValue);
a13._dateField=a6;
_savedField1879034=a6;
}
}
function _dfgv(a0)
{
if(a0.value!="")
{
try{
var a1=_getDateFieldFormat(a0).getAsObject(a0.value);
return a1;
}
catch(e)
{
}
}
return null;
}
function _getTimePortion(a0)
{
var a1=_dfgv(a0);
if(!a1)
a1=new Date();
var a2=new Date(a1.getFullYear(),
a1.getMonth(),
a1.getDate());
return a1-a2;
}
function _getLocaleTimeZoneDifference()
{
var a0=new Date();
var a1=a0.getTimezoneOffset()*-1;
var a2=0;
if(_uixLocaleTZ)
a2=(_uixLocaleTZ-a1)*60*1000;
return a2;
}
function _dfb(a0,a1)
{
_fixDFF(a0);
}
function _dff(a0,a1)
{
_dfa(a0,a1);
}
function _dfa(a0,a1)
{
if(a1!=(void 0))
{
if(window._calActiveDateFields==(void 0))
window._calActiveDateFields=new Object();
if(typeof(a0)=="string")
{
a0=_getElementById(document,a0);
}
window._calActiveDateFields[a1]=a0;
}
}
function _calsd(a0,a1)
{
if(window._calActiveDateFields!=(void 0))
{
var a2=window._calActiveDateFields[a0];
if(a2)
_dfsv(a2,a1);
}
return false;
}
function _updateCal(a0,a1,a2)
{
a1+=('&scrolledValue='+a0.options[a0.selectedIndex].value);
if(a2)
_firePartialChange(a1);
else
document.location.href=a1;
}
function _doCancel()
{
var a0=parent.TrPopupDialog.getInstance();
if(a0)
{
a0.returnValue=(void 0);
parent.TrPopupDialog._returnFromDialog();
}
else
{
top.returnValue=(void 0);
top.close();
}
return false;
}
function _selectDate(a0)
{
var a1=parent.TrPopupDialog.getInstance();
if(a1)
{
a1.returnValue=a0;
parent.TrPopupDialog._returnFromDialog();
}
else
{
top.returnValue=a0;
top._unloadADFDialog(window.event);
top.close();
}
return false;
}
var _DATE_DIALOG;
var _savedField1879034;

function _getDateFieldFormat(a0)
{
var a1=a0.name;
if(a1&&_dfs)
{
var a2=_dfs[a1];
if(_dl)
{
var a3=_dl[a1];
return new TrDateTimeConverter(a2,a3);
}
return new TrDateTimeConverter(a2);
}
return new TrDateTimeConverter();
}
function _fixDFF(a0)
{
var a1=_getDateFieldFormat(a0);
if(a0.value!="")
{
try
{
var a2=a1.getAsObject(a0.value);
if(a2!=null)
a0.value=a1.getAsString(a2);
}
catch(e)
{
}
}
}

var _AD_ERA=null;
function _getADEra()
{
if(_AD_ERA==null)
{
_AD_ERA=new Date(0);
_AD_ERA.setFullYear(1);
}
return _AD_ERA;
}
function _isStrict(
a0,
a1)
{
var a2=["FullYear","Month","Date","Hours","Minutes",
"Seconds","Milliseconds"];
for(var a3=0;a3<a2.length;a3++)
{
var a4="parsed"+a2[a3];
if(a0[a4]!=null&&
a0[a4]!=a1["get"+a2[a3]]())
{
return false;
}
}
return true;
}
function _doClumping(
a0,
a1,
a2,
a3,
a4
)
{
var a5=a0.length;
var a6=false;
var a7=0;
var a8=void 0;
var a9=0;
for(var a10=0;a10<a5;a10++)
{
var a11=a0.charAt(a10);
if(a6)
{
if(a11=="\'")
{
a6=false;
if(a7!=1)
{
a9++;
a7--;
}
if(!a2(a0,
a1,
"\'",
a9,
a7,
a3,
a4))
{
return false;
}
a7=0;
a8=void 0;
}
else
{
a7++;
}
}
else
{
if(a11!=a8)
{
if(a7!=0)
{
if(!a2(a0,
a1,
a8,
a9,
a7,
a3,
a4))
{
return false;
}
a7=0;
a8=void 0;
}
if(a11=='\'')
{
a6=true;
}
a9=a10;
a8=a11;
}
a7++;
}
}
if(a7!=0)
{
if(!a2(a0,
a1,
a8,
a9,
a7,
a3,
a4))
{
return false;
}
}
return true;
}
function _subformat(
a0,
a1,
a2,
a3,
a4,
a5,
a6
)
{
var a7=null;
var a8=false;
if((a2>='A')&&(a2<='Z')||
(a2>='a')&&(a2<='z'))
{
switch(a2)
{
case'D':
a7="(Day in Year)";
break;
case'E':
{
var a9=a5.getDay();
a7=(a4<=3)
?a1.getShortWeekdays()[a9]
:a1.getWeekdays()[a9];
}
break;
case'F':
a7="(Day of week in month)";
break;
case'G':
{
var a10=a1.getEras();
a7=(a5.getTime()<_getADEra().getTime())
?a10[0]
:a10[1];
}
break;
case'M':
{
var a11=a5.getMonth();
if(a4<=2)
{
a7=_getPaddedNumber(a11+1,a4);
}
else if(a4==3)
{
a7=a1.getShortMonths()[a11];
}
else
{
a7=a1.getMonths()[a11];
}
}
break;
case'S':
a7=_getPaddedNumber(a5.getMilliseconds(),a4);
break;
case'W':
a7="(Week in Month)";
break;
case'a':
{
var a12=a1.getAmPmStrings();
a7=(_isPM(a5.getHours()))
?a12[1]
:a12[0];
}
break;
case'd':
a7=_getPaddedNumber(a5.getDate(),a4);
break;
case'h':
hours=a5.getHours();
if(_isPM(hours))
hours-=12;
if(hours==0)
hours=12;
a7=_getPaddedNumber(hours,a4);
break;
case'K':
hours=a5.getHours();
if(_isPM(hours))
hours-=12;
a7=_getPaddedNumber(hours,a4);
break;
case'k':
hours=a5.getHours();
if(hours==0)
hours=24;
a7=_getPaddedNumber(hours,a4);
break;
case'H':
a7=_getPaddedNumber(a5.getHours(),a4);
break;
case'm':
a7=_getPaddedNumber(a5.getMinutes(),a4);
break;
case's':
a7=_getPaddedNumber(a5.getSeconds(),a4);
break;
case'w':
a7="(Week in year)";
break;
case'y':
{
var a13=a5.getFullYear();
var a14=(a4<=2)
?a4
:null;
a7=_getPaddedNumber(a13,a4,a14);
}
break;
case'z':
{
a7="GMT";
var a15=_getTimeZoneOffsetString(a5,false);
if(a15)
{
a7+=a15[0];
a7+=":"
a7+=a15[1];
}
}
break;
case'Z':
{
var a15=_getTimeZoneOffsetString(a5,true);
if(a15)
{
a7=a15[0];
a7+=a15[1];
}
else
{
a7="";
}
}
break;
default:
a7="";
}
}
else
{
a7=a0.substring(a3,a3+a4);
}
a6.value+=a7;
return true;
}
function _getTimeZoneOffsetString(a0,a1)
{
var a2=-1*a0.getTimezoneOffset();
a2+=_getLocaleTimeZoneDifference();
if(a1||a2!=0)
{
var a3=new Array(2);
if(a2<0)
{
a3[0]="-";
a2=-a2
}
else
{
a3[0]="+";
}
a3[0]+=_getPaddedNumber(Math.floor(a2/60),2);
a3[1]=_getPaddedNumber(a2%60,2);
return a3;
}
}
function _getLocaleTimeZoneDifference()
{
var a0=new Date();
var a1=a0.getTimezoneOffset()*-1;
var a2=0;
return a2-a1;
}
function _subparse(
a0,
a1,
a2,
a3,
a4,
a5,
a6
)
{
var a7=a5.currIndex;
if((a2>='A')&&(a2<='Z')||
(a2>='a')&&(a2<='z'))
{
switch(a2)
{
case'D':
if(_accumulateNumber(a5,3)==null)
{
return false;
}
break;
case'E':
{
var a8=_matchArray(a5,
(a4<=3)
?a1.getShortWeekdays()
:a1.getWeekdays());
if(a8==null)
{
return false;
}
}
break;
case'F':
if(_accumulateNumber(a5,2)==null)
{
return false;
}
break;
case'G':
{
var a9=_matchArray(a5,a1.getEras());
if(a9!=null)
{
if(a9==0)
{
a5.isBC=true;
}
}
else
{
return false;
}
}
break;
case'M':
{
var a10;
var a11=0;
if(a4<=2)
{
a10=_accumulateNumber(a5,2);
a11=-1;
}
else
{
var a12=(a4==3)
?a1.getShortMonths()
:a1.getMonths();
a10=_matchArray(a5,a12);
}
if(a10!=null)
{
a5.parsedMonth=(a10+a11);
}
else
{
return false;
}
}
break;
case'S':
{
var a13=_accumulateNumber(a5,3);
if(a13!=null)
{
a5.parsedMilliseconds=a13;
}
else
{
return false;
}
}
break;
case'W':
if(_accumulateNumber(a5,2)==null)
{
return false;
}
break;
case'a':
{
var a14=_matchArray(a5,
a1.getAmPmStrings());
if(a14==null)
{
return false;
}
else
{
if(a14==1)
{
a5.isPM=true;
}
}
}
break;
case'd':
{
var a15=_accumulateNumber(a5,2);
if(a15!=null)
{
a5.parsedDate=a15;
}
else
{
return false;
}
}
break;
case'h':
case'k':
case'H':
case'K':
{
var a16=_accumulateNumber(a5,2);
if(a16!=null)
{
if((a2=='h')&&(a16==12))
a16=0;
if((a2=='k')&&(a16==24))
a16=0;
a5.parsedHour=a16;
}
else
{
return false;
}
}
break;
case'm':
{
var a17=_accumulateNumber(a5,2);
if(a17!=null)
{
a5.parsedMinutes=a17;
}
else
{
return false;
}
}
break;
case's':
{
var a18=_accumulateNumber(a5,2);
if(a18!=null)
{
a5.parsedSeconds=a18;
}
else
{
return false;
}
}
break;
case'w':
if(_accumulateNumber(a5,2)==null)
{
return false;
}
break;
case'y':
{
var a19=_accumulateNumber(a5,4);
var a20=a5.currIndex-a7;
if(a19!=null)
{
if((a20>2)&&
(a4<=2)&&
(a19<=999))
{
return false;
}
else if((a4<=2)&&(a19>=0)&&(a19<=100))
{
a19=_fix2DYear(a19);
}
else if(a4==4)
{
if(a20==3)
return false;
if(a20<=2)
a19=_fix2DYear(a19);
}
if(a19==0)
return false;
a5.parsedFullYear=a19;
}
else
{
return false;
}
}
break;
case'z':
{
if(!_matchText(a5,"GMT"))
{
return false;
}
if((a5.parseString.length-a5.currIndex)>0)
{
if(_matchArray(a5,["-","+"])==null)
{
return false;
}
var a21=_accumulateNumber(a5,2);
if(a21==null)
{
return false;
}
a5.hourOffset=a21;
if(!_matchText(a5,":"))
{
return false;
}
var a22;
if(((a5.parseString.length-a5.currIndex)<2)||
(a22=_accumulateNumber(a5,2))==null)
{
return false;
}
a5.minOffset=a22;
}
}
break;
case'Z':
{
if((a5.parseString.length-a5.currIndex)<5)
{
return false;
}
if(_matchArray(a5,["-","+"])==null)
{
return false;
}
var a21=_accumulateNumber(a5,2)
if(a21==null)
{
return false;
}
a5.hourOffset=a21;
var a22=_accumulateNumber(a5,2)
if(a22==null)
{
return false;
}
a5.minOffset=null;
}
break;
default:
}
}
else
{
return _matchText(a5,
a0.substring(a3,a3+a4));
}
return true;
}
function _fix2DYear(a0)
{
var a1;
if(_df2DYS!=null)
{
var a2=_df2DYS;
a1=a2-(a2%100);
a0+=a1;
if(a0<a2)
a0+=100;
}
else
{
var a3=new Date().getFullYear();
a1=a3-(a3%100)-100;
a0+=a1;
if(a0+80<a3)
{
a0+=100;
}
}
return a0;
}
function _matchArray(
a0,
a1
)
{
for(var a2=0;a2<a1.length;a2++)
{
if(_matchText(a0,a1[a2]))
{
return a2;
}
}
return null;
}
function _matchText(
a0,
a1
)
{
if(!a1)
return false;
var a2=a1.length;
var a3=a0.currIndex;
var a4=a0.parseString;
if(a2>a4.length-a3)
{
return false;
}
var a5=a4.substring(a3,a3+a2);
var a6=a5.toLowerCase();
var a7=a1.toLowerCase();
if(a6!=a7)
return false;
a0.currIndex+=a2;
return true;
}
function _accumulateNumber(
a0,
a1
)
{
var a2=a0.currIndex;
var a3=a2;
var a4=a0.parseString;
var a5=a4.length;
if(a5>a3+a1)
a5=a3+a1;
var a6=0;
while(a3<a5)
{
var a7=parseDigit(a4.charAt(a3));
if(!isNaN(a7))
{
a6*=10;
a6+=a7;
a3++;
}
else
{
break;
}
}
if(a2!=a3)
{
a0.currIndex=a3;
return a6;
}
else
{
return null;
}
}
function _isPM(
a0
)
{
return(a0>=12);
}
function _getPaddedNumber(
a0,
a1,
a2
)
{
var a3=a0.toString();
if(a1!=null)
{
var a4=a1-a3.length;
while(a4>0)
{
a3="0"+a3;
a4--;
}
}
if(a2!=null)
{
var a5=a3.length-a2;
if(a5>0)
{
a3=a3.substring(a5,
a5+a2);
}
}
return a3;
}
function TrDateTimeConverter(
a0,
a1,
a2,
a3,
a4
)
{
this._class="TrDateTimeConverter";
this._exampleString=a2;
this._type=a3;
this._messages=a4;
this._offset=null;
this._localeSymbols=getLocaleSymbols(a1);
if(a0==null)
a0=this._localeSymbols.getShortDatePatternString();
var a5=this._initPatterns(a0);
this._pattern=a5;
}
TrDateTimeConverter.prototype=new TrConverter();
TrDateTimeConverter.prototype.getFormatHint=function()
{
if(this._messages&&this._messages["hint"])
{
return TrMessageFactory.createCustomMessage(
this._messages["hint"],
""+this._exampleString);
}
else
{
var a6="org.apache.myfaces.trinidad.convert.DateTimeConverter."+this._type+"_HINT";
return TrMessageFactory.createMessage(
a6,
""+this._exampleString);
}
}
TrDateTimeConverter.prototype.getAsString=function(
a7
)
{
if(this._offset)
{
var a8=a7.getMinutes();
a7.setMinutes((+a8)-parseInt(this._offset));
}
var a9=new Object();
a9.value="";
var a10=this._pattern;
if(typeof a10!="string")
a10=a10[0];
_doClumping(a10,
this._localeSymbols,
_subformat,
a7,
a9);
if(this._offset)
{
var a11=(((this._offset+a7.getTimezoneOffset())*-1)/60);
if(parseInt(a11)>0)
{
a9.value=a9.value+"+"
}
a9.value=a9.value+a11+":00";
}
return a9.value;
}
TrDateTimeConverter.prototype.setDiffInMins=function(
a12
)
{
this._offset=a12;
}
TrDateTimeConverter.prototype.getDiffInMins=function()
{
return this._offset;
}
TrDateTimeConverter.prototype.getLocaleSymbols=function()
{
return this._localeSymbols;
}
TrDateTimeConverter.prototype.getAsObject=function(
a13,
a14
)
{
if(a13==null)
return null;
a13=TrUIUtils.trim(a13);
if(a13.length==0)
return null
var a15=this._pattern;
var a16;
var a17="org.apache.myfaces.trinidad.convert.DateTimeConverter.CONVERT_"+this._type;
if(this._messages&&this._messages["detail"])
{
a16=_createCustomFacesMessage(TrMessageFactory.getSummaryString(a17),
this._messages["detail"],
a14,
a13,
this._exampleString);
}
else
{
a16=_createFacesMessage(a17,
a14,
a13,
this._exampleString);
}
if(typeof a15=="string")
{
return this._simpleDateParseImpl(a13,
a15,
this._localeSymbols,
a16);
}
else
{
var a18;
for(a18=0;a18<a15.length;a18++)
{
try{
var a19=this._simpleDateParseImpl(a13,
a15[a18],
this._localeSymbols,
a16);
return a19;
}
catch(e)
{
if(a18==a15.length-1)
throw e;
}
}
}
}
TrDateTimeConverter.prototype._initPatterns=function(
a20)
{
var a21=new Array();
if(a20)
a21=a21.concat(a20);
a21=a21.concat(["MMMM dd, yy","dd-MMMM-yy","MMMM/dd/yy"]);
var a22=a21.length;
for(var a23=0;a23<a22;a23++)
{
if(a21[a23].indexOf('MMM')!=-1)
{
a21[a21.length]=a21[a23].replace(/MMM/g,'MM');
a21[a21.length]=a21[a23].replace(/MMM/g,'M');
}
}
var a22=a21.length;
for(var a23=0;a23<a22;a23++)
{
if(a21[a23].indexOf('/')!=-1)
{
a21[a21.length]=a21[a23].replace(/\//g,'-');
a21[a21.length]=a21[a23].replace(/\//g,'.');
}
if(a21[a23].indexOf('-')!=-1)
{
a21[a21.length]=a21[a23].replace(/-/g,'/');
a21[a21.length]=a21[a23].replace(/-/g,'.');
}
if(a21[a23].indexOf('.')!=-1)
{
a21[a21.length]=a21[a23].replace(/\./g,'-');
a21[a21.length]=a21[a23].replace(/\./g,'/');
}
}
return a21;
}
TrDateTimeConverter.prototype._simpleDateParseImpl=function(
a24,
a25,
a26,
a27)
{
var a28=new Object();
a28.currIndex=0;
a28.parseString=a24;
a28.parsedHour=null;
a28.parsedMinutes=null;
a28.parsedSeconds=null;
a28.parsedMilliseconds=null;
a28.isPM=false;
a28.parsedBC=false;
a28.parsedFullYear=null;
a28.parsedMonth=null;
a28.parsedDate=null;
a28.hourOffset=null;
a28.minOffset=null;
a28.parseException=new TrConverterException(a27);
var a29=new Date(0);
a29.setDate(1);
if(_doClumping(a25,
a26,
_subparse,
a28,
a29))
{
if(a24.length!=a28.currIndex)
{
throw a28.parseException;
}
if((a28.hourOffset!=null)||
(a28.minOffset!=null))
return undefined;
var a30=a28.parsedFullYear;
if(a30!=null)
{
if(a28.parsedBC)
{
a30=_getADEra().getFullYear()-a30;
}
a29.setFullYear(a30);
a28.parsedFullYear=a30;
}
var a31=a28.parsedMonth;
if(a31!=null)
a29.setMonth(a31);
var a32=a28.parsedDate;
if(a32!=null)
a29.setDate(a32);
var a33=a28.parsedHour;
if(a33!=null)
{
if(a28.isPM&&(a33<12))
{
a33+=12;
}
a29.setHours(a33);
a28.parsedHour=a33;
}
var a34=a28.parsedMinutes;
if(a34!=null)
a29.setMinutes(a34);
var a35=a28.parsedSeconds;
if(a35!=null)
a29.setSeconds(a35);
var a36=a28.parsedMilliseconds;
if(a36!=null)
a29.setMilliseconds(a36);
if(!_isStrict(a28,a29))
{
throw a28.parseException;
}
if(this._offset)
{
var a37=a29.getMinutes();
a29.setMinutes((+a37)+parseInt(this._offset));
}
return a29;
}
else
{
throw a28.parseException;
}
}

var _digits;
var _decimalSep;
var _groupingSep;
function isDigit(
a0
)
{
return(_getDigits()[a0]!=null);
}
function _getDigits()
{
if(_digits==null)
{
var a0=[
0x0030,
0x0660,
0x06F0,
0x0966,
0x09E6,
0x0A66,
0x0AE6,
0x0B66,
0x0BE7,
0x0C66,
0x0CE6,
0x0D66,
0x0E50,
0x0ED0,
0x0F20,
0xFF10
];
_digits=new Object();
for(var a1=0;a1<a0.length;a1++)
{
for(var a2=0;a2<10;a2++)
{
var a3=String.fromCharCode(a0[a1]+a2);
_digits[a3]=a2;
}
}
}
return _digits;
}
function parseDigit(
a0
)
{
var a1=_getDigits()[a0];
if(a1==null)
{
return NaN;
}
else
{
return a1;
}
}
function isNotLowerCase()
{
var a0=alphaChar.charCodeAt(0);
if(a0>0xFF)
{
return true;
}
else
{
return!_isLowerCaseStrict(alphaChar);
}
}
function isLowerCase(
a0
)
{
var a1=a0.charCodeAt(0);
if(a1>0xFF)
{
return!isDigit(a0);
}
else
{
return _isLowerCaseStrict(a0);
}
}
function _isLowerCaseStrict(
a0
)
{
var a1=a0.charCodeAt(0);
return(((a1>=0x61)&&(a1<=0x7A))||
((a1>=0xDF)&&(a1<=0xFF)));
}
function isUpperCase(
a0
)
{
var a1=a0.charCodeAt(0);
if(a1>0xFF)
{
return!isDigit(a0);
}
else
{
return _isUpperCaseStrict(a0);
}
}
function isNotUpperCase(
a0
)
{
var a1=a0.charCodeAt(0);
if(a1>0xFF)
{
return true;
}
else
{
return!_isUpperCaseStrict(a0);
}
}
function _isUpperCaseStrict(
a0
)
{
var a1=a0.charCodeAt(0);
return(((a1>=0x41)&&(a1<=0x5A))||
((a1>=0xC0)&&(a1<=0xDe)));
}
function isLetter(
a0
)
{
return isLowerCase(a0)|isUpperCase(a0);
}
function getUserLanguage()
{
var a0=_locale;
if(a0==null)
{
a0=window.navigator.userLanguage;
if(a0==null)
{
a0=window.navigator.language;
}
}
return a0;
}
function getJavaLanguage(
a0
)
{
if(a0==null)
{
a0=getUserLanguage();
}
var a1=a0.indexOf("-",0);
if(a1==-1)
return a0;
var a2=a0.length;
var a3=a0.substring(0,a1);
a3+="_";
a1++;
var a4=a0.indexOf("-",a1);
if(a4==-1)
{
a4=a2;
}
var a5=a0.substring(a1,
a4);
a3+=a5.toUpperCase();
if(a4!=a2)
{
a3+="_";
a3+=a0.substring(a4+1,
a2);
}
return a3;
}
function getLocaleSymbols(
a0
)
{
var a1=getJavaLanguage(a0);
while(true)
{
var a2=window["LocaleSymbols_"+a1];
if(a2!=null)
{
return a2;
}
else
{
var a3=a1.lastIndexOf("_");
if(a3!=-1)
{
a1=a1.substring(0,a3);
}
else
{
break;
}
}
}
}
function _getEras()
{
return this.getLocaleElements()["Eras"];
}
function _getMonths()
{
return this.getLocaleElements()["MonthNames"];
}
function _getShortMonths()
{
return this.getLocaleElements()["MonthAbbreviations"];
}
function _getWeekdays()
{
return this.getLocaleElements()["DayNames"];
}
function _getShortWeekdays()
{
return this.getLocaleElements()["DayAbbreviations"];
}
function _getAmPmStrings()
{
return this.getLocaleElements()["AmPmMarkers"];
}
function _getZoneStrings()
{
return this.getLocaleElements()["zoneStrings"];
}
function _getLocalPatternChars()
{
return this.getLocaleElements()["localPatternChars"];
}
function _getDecimalSeparator()
{
if(_decimalSep!=null)
return _decimalSep;
return this.getLocaleElements()["NumberElements"][0];
}
function _getGroupingSeparator()
{
if(_groupingSep!=null)
return _groupingSep;
return this.getLocaleElements()["NumberElements"][1];
}
function _getPatternSeparator()
{
return this.getLocaleElements()["NumberElements"][2];
}
function _getPercent()
{
return this.getLocaleElements()["NumberElements"][3];
}
function _getZeroDigit()
{
return this.getLocaleElements()["NumberElements"][4];
}
function _getDigit()
{
return this.getLocaleElements()["NumberElements"][5];
}
function _getMinusSign()
{
return this.getLocaleElements()["NumberElements"][6];
}
function _getExponential()
{
return this.getLocaleElements()["NumberElements"][7];
}
function _getPerMill()
{
return this.getLocaleElements()["NumberElements"][8];
}
function _getInfinity()
{
return this.getLocaleElements()["NumberElements"][9];
}
function _getNaN()
{
return this.getLocaleElements()["NumberElements"][10];
}
function _getCurrencySymbol()
{
return this.getLocaleElements()["CurrencyElements"][0];
}
function _getCurrencyCode()
{
return this.getLocaleElements()["CurrencyElements"][1];
}
function _getPositivePrefix()
{
return this.getLocaleElements()["CurrencyElements"][2];
}
function _getPositiveSuffix()
{
return this.getLocaleElements()["CurrencyElements"][3];
}
function _getNegativePrefix()
{
return this.getLocaleElements()["CurrencyElements"][4];
}
function _getNegativeSuffix()
{
return this.getLocaleElements()["CurrencyElements"][5];
}
function _getLocaleElements()
{
return this["LocaleElements"];
}
function _getFullTimePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][0];
}
function _getLongTimePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][1];
}
function _getMediumTimePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][2];
}
function _getShortTimePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][3];
}
function _getFullDatePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][4];
}
function _getLongDatePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][5];
}
function _getMediumDatePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][6];
}
function _getShortDatePatternString()
{
return this.getLocaleElements()["DateTimePatterns"][7];
}
function _getDateTimeFormatString()
{
return this.getLocaleElements()["DateTimePatterns"][8];
}
function LocaleSymbols(
a0
)
{
this["LocaleElements"]=a0;
}
LocaleSymbols.prototype.getFullTimePatternString=_getFullTimePatternString;
LocaleSymbols.prototype.getLongTimePatternString=_getLongTimePatternString;
LocaleSymbols.prototype.getMediumTimePatternString=_getMediumTimePatternString;
LocaleSymbols.prototype.getShortTimePatternString=_getShortTimePatternString;
LocaleSymbols.prototype.getFullDatePatternString=_getFullDatePatternString;
LocaleSymbols.prototype.getLongDatePatternString=_getLongDatePatternString;
LocaleSymbols.prototype.getMediumDatePatternString=_getMediumDatePatternString;
LocaleSymbols.prototype.getShortDatePatternString=_getShortDatePatternString;
LocaleSymbols.prototype.getDateTimeFormatString=_getDateTimeFormatString;
LocaleSymbols.prototype.getEras=_getEras;
LocaleSymbols.prototype.getMonths=_getMonths;
LocaleSymbols.prototype.getShortMonths=_getShortMonths;
LocaleSymbols.prototype.getWeekdays=_getWeekdays;
LocaleSymbols.prototype.getShortWeekdays=_getShortWeekdays;
LocaleSymbols.prototype.getAmPmStrings=_getAmPmStrings;
LocaleSymbols.prototype.getZoneStrings=_getZoneStrings;
LocaleSymbols.prototype.getLocalPatternChars=_getLocalPatternChars;
LocaleSymbols.prototype.getDecimalSeparator=_getDecimalSeparator;
LocaleSymbols.prototype.getGroupingSeparator=_getGroupingSeparator;
LocaleSymbols.prototype.getPatternSeparator=_getPatternSeparator;
LocaleSymbols.prototype.getPercent=_getPercent;
LocaleSymbols.prototype.getZeroDigit=_getZeroDigit;
LocaleSymbols.prototype.getDigit=_getDigit;
LocaleSymbols.prototype.getMinusSign=_getMinusSign;
LocaleSymbols.prototype.getExponential=_getExponential;
LocaleSymbols.prototype.getPerMill=_getPerMill;
LocaleSymbols.prototype.getInfinity=_getInfinity;
LocaleSymbols.prototype.getNaN=_getNaN;
LocaleSymbols.prototype.getCurrencySymbol=_getCurrencySymbol;
LocaleSymbols.prototype.getCurrencyCode=_getCurrencyCode;
LocaleSymbols.prototype.getPositivePrefix=_getPositivePrefix;
LocaleSymbols.prototype.getPositiveSuffix=_getPositiveSuffix;
LocaleSymbols.prototype.getNegativePrefix=_getNegativePrefix;
LocaleSymbols.prototype.getNegativeSuffix=_getNegativeSuffix;
LocaleSymbols.prototype.getLocaleElements=_getLocaleElements;
function TrConverterHint()
{
this._class="TrConverterHint";
}
TrConverterHint.prototype.getFormatHint=function(){}
function TrValidatorHint()
{
this._class="TrValidatorHint";
}
TrConverterHint.prototype.getHints=function(a0){}
function TrConverter()
{
this._class="TrConverter";
}
TrConverter.prototype.getAsString=function(a0,a1){}
TrConverter.prototype.getAsObject=function(a2,a3){}
function TrValidator()
{
this._class="TrValidator";
}
TrValidator.prototype.validate=function(a0,a1,a2){}
function TrConverterException(
a0,
a1,
a2
)
{
if(a0==null)
{
this._facesMessage=new TrFacesMessage(a1,
a2,
TrFacesMessage.SEVERITY_ERROR);
}
else
{
this._facesMessage=a0;
}
}
TrConverterException.prototype.getFacesMessage=
function()
{
return this._facesMessage;
}
function TrValidatorException(
a0,
a1,
a2
)
{
if(a0==null)
{
this._facesMessage=new TrFacesMessage(a1,
a2,
TrFacesMessage.SEVERITY_ERROR);
}
else
{
this._facesMessage=a0;
}
}
TrValidatorException.prototype.getFacesMessage=
function()
{
return this._facesMessage;
}
function TrFacesMessage(
a0,
a1,
a2
)
{
this._summary=a0;
this._detail=a1;
if(a2==null)
{
this._severity=TrFacesMessage.SEVERITY_INFO;
}
else
{
this._severity=a2;
}
}
TrFacesMessage.SEVERITY_INFO=0;
TrFacesMessage.SEVERITY_WARN=1;
TrFacesMessage.SEVERITY_ERROR=2;
TrFacesMessage.SEVERITY_FATAL=3;
TrFacesMessage._SEVERITY_DEFAULT=TrFacesMessage.SEVERITY_INFO;
TrFacesMessage.prototype.getDetail=
function()
{
return this._detail;
}
TrFacesMessage.prototype.getSummary=
function()
{
return this._summary;
}
TrFacesMessage.prototype.setDetail=
function(
a3
)
{
this._detail=a3;
}
TrFacesMessage.prototype.setSummary=
function(
a4
)
{
this._summary=a4;
}
TrFacesMessage.prototype.getSeverity=
function()
{
return this._severity;
}
TrFacesMessage.prototype.setSeverity=
function(
a5
)
{
this._severity=a5;
}
var TrFastMessageFormatUtils=new Object();
TrFastMessageFormatUtils.format=function(
a6,
a7
)
{
var a8=new Array();
for(var a9=1;a9<arguments.length;a9++)
{
a8[a9-1]=arguments[a9];
}
return _formatErrorString(a6,a8);
}
var TrMessageFactory=new Object();
TrMessageFactory.createFacesMessage=function(
a10,
a11,
a12,
a13
)
{
var a14=TrMessageFactory.getSummaryString(a10);
var a15=a11;
var a16=a13;
if(a16==null)
{
a16=TrFacesMessage.SEVERITY_ERROR
}
if(a15==null)
{
a15=TrMessageFactory.getDetailString(a10);
}
if(a15!=null)
{
if(a12!=null)
{
a15=TrFastMessageFormatUtils.format(a15,a12);
}
}
return new TrFacesMessage(a14,a15,a16);
}
TrMessageFactory.getSummaryString=function(
a17
)
{
if(a17==null)
return null;
return TrMessageFactory._TRANSLATIONS[a17];
}
TrMessageFactory.getDetailString=function(
a18
)
{
if(a18==null)
return null;
return TrMessageFactory._TRANSLATIONS[a18+"_detail"];
}
TrMessageFactory.getString=function(
a19
)
{
return TrMessageFactory.getSummaryString(a19);
}
TrMessageFactory.createMessage=function(
a20,
a21,
a22
)
{
var a23=TrMessageFactory.getSummaryString(a20);
if(a23!=null)
{
a23=TrFastMessageFormatUtils.format(a23,a21,a22);
}
return a23;
}
TrMessageFactory.createCustomMessage=function(
a24,
a25,
a26
)
{
var a27;
if(a24!=null)
{
a27=TrFastMessageFormatUtils.format(a24,a25,a26);
}
return a27;
}

TrMessageBox._registerMessageBox=function(a0)
{
if(!TrMessageBox._MESSAGE_BOX)
TrMessageBox._MESSAGE_BOX=new TrMessageBox(a0);
}
TrMessageBox.addMessage=function(a1,a2,a3)
{
var a4=TrMessageBox._MESSAGE_BOX;
if(!a4)
return;
a4.addMessage(a1,a2,a3);
}
TrMessageBox.removeMessages=function(a5)
{
var a6=TrMessageBox._MESSAGE_BOX;
if(!a6)
return;
a6.removeMessages(a5);
}
TrMessageBox.isPresent=function()
{
return(TrMessageBox._MESSAGE_BOX)?true:false;
}
function TrMessageBox(a0)
{
if(a0==undefined)
return;
this._messageBoxId=a0;
TrMessageBox._LINK_STYLE=TrPage.getInstance().getStyleClass("OraLink");
TrMessageBox._LIST_STYLE=TrPage.getInstance().getStyleClass("af|messages::list");
TrMessageBox._LIST_SINGLE_STYLE=TrPage.getInstance().getStyleClass("af|messages::list-single");
}
TrMessageBox.prototype.addMessage=function(a1,a2,a3)
{
var a4=this._getMessageList();
var a5=document.createElement("li");
if(a1)
{
if(!a2)
a2=a3.getSummary();
var a6=document.createElement("a");
a6.className=TrMessageBox._LINK_STYLE;
a6.href="#"+a1;
a6.innerHTML=a2;
a5.appendChild(a6);
a5.name=this._getMessageNameForInput(a1);
var a7=document.createTextNode(" - "+a3.getSummary());
a5.appendChild(a7);
}
else
{
var a7=document.createTextNode(a3.getSummary()+" - "+a3.getDetail());
a5.appendChild(a7);
}
a4.appendChild(a5);
if(a4.hasChildNodes())
{
var a8=a4.getElementsByTagName("li");
if(a8.length==1)
a4.className=TrMessageBox._LIST_SINGLE_STYLE;
else
a4.className=TrMessageBox._LIST_STYLE;
}
this._showMessageBox();
}
TrMessageBox.prototype.removeMessages=function(a9)
{
var a10=this._getMessageList();
if(!a10.hasChildNodes())
return;
var a11=this._getMessageNameForInput(a9);
var a12=a10.getElementsByTagName("li");
for(var a13=0;a13<a12.length;)
{
var a14=a12[a13];
if(a14.name&&a14.name==a11)
{
a10.removeChild(a14);
continue;
}
a13++;
}
if(a12.length==0)
this._hideMessageBox();
else if(a12.length==1)
a10.className=TrMessageBox._LIST_SINGLE_STYLE;
else
a10.className=TrMessageBox._LIST_STYLE;
}
TrMessageBox.prototype._getMessageBox=function()
{
if(this._messageBoxId==null)
return null;
return _getElementById(document,this._messageBoxId);
}
TrMessageBox.prototype._getMessageList=function()
{
if(this._messageBoxId==null)
return null;
return _getElementById(document,this._messageBoxId+"__LIST__");
}
TrMessageBox.prototype._showMessageBox=function()
{
var a15=this._getMessageBox();
if(!a15)
return;
a15.style.display="";
}
TrMessageBox.prototype._hideMessageBox=function()
{
var a16=this._getMessageBox();
if(!a16)
return;
a16.style.display="none";
}
TrMessageBox.prototype._getMessageNameForInput=function(a17)
{
if(!this._messageBoxId||!a17)
return null;
return this._messageBoxId+"__"+a17+"__";
}

var _pprBackRestoreInlineScripts=false;
var _pprBlocking=false;
var _blockOnEverySubmit=false;
var _pprFirstClickPass=false;
var _pprdivElementName='tr_pprBlockingDiv';
var _pprLibStore;
var _pprBlockStartTime=0;
var _pprBlockingTimeout=null;
var _pprEventElement=null;
var _pprSavedCursorFlag=false;
var _pprChoiceChanged=false;
var _agent=new Object();
var _lastDateSubmitted;
var _lastDateReset=0;
var _lastDateValidated=0;
var _lastValidationFailure=0;
var _delayedEventParams=new Object();
var _initialFocusID=null;
var _TrFocusRequestDoc=null;
var _TrFocusRequestID=null;
var _TrFocusRequestNext=false;
var _TrEventBasedValidation=false;
var _blockCheckUnloadFromDialog=false;
var _saveForm=null;
var _saveDoValidate=null;
var _saveParameters=null;
var _submitRejected=false;
var _inPartialSubmit=false;
var _pendingRadioButton=false;
var _IE_MOUSE_CAPTURE_EVENTS=[
"onclick",
"ondblclick",
"onmousedown",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup"
];
var _GECKO_MOUSE_CAPTURE_EVENTS=[
"click",
"mousedown",
"mouseup",
"mouseover",
"mousemove",
"mouseout",
"contextmenu"
];
function _atLeast(
a0,
a1
)
{
return(!a0||(a0==_agent.kind))&&
(!a1||(a1<=_agent.version));
}
function _atMost(
a0,
a1
)
{
return(a0==_agent.kind)&&(a1>=_agent.version);
}
function _supportsDOM()
{
var a0=false;
if(_agent.isIE)
{
a0=_agent.version>=5.5;
}
else if(_agent.isNav)
{
a0=false;
}
else if(_agent.isGecko||_agent.isSafari||_agent.isOpera)
{
a0=true;
}
else if(_agent.isBlackBerry)
{
a0=false;
}
return a0;
}
function _agentInit()
{
var a0=navigator.userAgent.toLowerCase();
var a1=parseFloat(navigator.appVersion);
var a2=false;
var a3=false;
var a4=false;
var a5=false;
var a6=false;
var a7=false;
var a8=false;
var a9=false;
var a10=false;
var a11=false;
var a12=false;
var a13="unknown";
var a14=false;
var a15=false;
var a16=true;
var a17=true;
var a18=true;
if(a0.indexOf("msie")!=-1)
{
var a19=a0.match(/msie (.*);/);
a1=parseFloat(a19[1]);
a14=true;
if(a0.indexOf("windows ce")!=-1)
{
a17=false;
a16=false;
a18=false;
if(a0.indexOf("ppc")!=-1&&
a1>=4.0)
{
a8=true;
a15=true;
a13="pie";
}
else
{
a12=true;
a13="iemobile";
}
}
else
{
a4=true;
a13="ie";
}
}
else if(a0.indexOf("opera")!=-1)
{
a7=true;
a13="opera";
}
else if((a0.indexOf("applewebkit")!=-1)||
(a0.indexOf("safari")!=-1))
{
a9=true
a13="safari";
}
else if(a0.indexOf("gecko/")!=-1)
{
a3=true;
a13="gecko";
a1=1.0;
}
else if(a0.indexOf("blackberry")!=-1)
{
a15=true;
a2=true;
a13="blackberry";
mobileBrowser=true;
a16=false;
a18=false;
}
else if((a0.indexOf('mozilla')!=-1)&&
(a0.indexOf('spoofer')==-1)&&
(a0.indexOf('compatible')==-1))
{
if(a1>=5.0)
{
a3=true;
a13="gecko";
a1=1.0;
}
else
{
a6=true;
a13="nn";
}
}
if(a0.indexOf('win')!=-1)
{
a11=true;
}
else if(a0.indexOf('mac')!=-1)
{
a5=true;
}
else if(a0.indexOf('sunos')!=-1)
{
a10=true;
}
_agent.isBlackBerry=a2;
_agent.isGecko=a3;
_agent.isIE=a4;
_agent.isIEGroup=a14;
_agent.isMac=a5;
_agent.isNav=a6;
_agent.isOpera=a7;
_agent.isPIE=a8;
_agent.isSafari=a9;
_agent.isSolaris=a10;
_agent.isWindows=a11;
_agent.isWindowsMobile6=a12;
_agent.kind=a13;
_agent.pprUnsupported=a15;
_agent.supportsDomDocument=a16;
_agent.supportsNodeType=a17;
_agent.supportsValidation=a18;
_agent.version=a1;
_agent.atLeast=_atLeast;
_agent.atMost=_atMost;
}
_agentInit();
var _ieFeatures=
{
channelmode:1,
copyhistory:1,
directories:1,
fullscreen:1,
height:1,
location:1,
menubar:1,
resizable:1,
scrollbars:1,
status:1,
titlebar:1,
toolbar:1,
width:1
};
var _nnFeatures=
{
alwayslowered:1,
alwaysraised:1,
copyhistory:1,
dependent:1,
directories:1,
height:1,
hotkeys:1,
innerheight:1,
innerwidth:1,
location:1,
menubar:1,
outerwidth:1,
outerheight:1,
resizable:1,
scrollbars:1,
status:1,
titlebar:1,
toolbar:1,
width:1,
"z-lock":1
}
var _modelessFeatureOverrides=
{
};
var _modalFeatureOverrides=
{
};
var _featureDefaults=
{
document:
{
channelmode:false,
copyhistory:true,
dependent:false,
directories:true,
fullscreen:false,
hotkeys:false,
location:true,
menubar:true,
resizable:true,
scrollbars:true,
status:true,
toolbar:true
},
dialog:
{
channelmode:false,
copyhistory:false,
dependent:true,
directories:false,
fullscreen:false,
hotkeys:true,
location:false,
menubar:false,
resizable:true,
scrollbars:true,
status:true
}
}
var _signedFeatures=
{
alwayslowered:1,
alwaysraised:1,
titlebar:1,
"z-lock":1
};
var _booleanFeatures=
{
alwayslowered:1,
alwaysraised:1,
channelmode:1,
copyhistory:1,
dependent:1,
directories:1,
fullscreen:1,
hotkeys:1,
location:1,
menubar:1,
resizable:1,
scrollbars:1,
status:1,
titlebar:1,
toolbar:1,
"z-lock":1
};
function _addEvent(a0,a1,a2)
{
if(a0.addEventListener)
{
a0.addEventListener(a1,a2,false);
return true;
}
else if(a0.attachEvent)
{
var a3=a0.attachEvent("on"+a1,a2);
return a3;
}
else
{
return false;
}
}
function _removeEvent(a0,a1,a2)
{
if(a0.removeEventListener)
{
a0.removeEventListener(a1,a2,false);
return true;
}
else if(a0.detachEvent)
{
var a3=a0.detachEvent("on"+a1,a2);
return a3;
}
else
{
return false;
}
}
function _getBodyWidth(
a0,
a1,
a2
)
{
var a3=_getContentWidth(a0,a1,0);
var a4=10;
if(_isLTR()||(a2<=5))
{
a4=2*a2;
}
return a3+a4;
}
function _getContentWidth(
a0,
a1,
a2
)
{
var a3=a0.childNodes;
var a4=_agent.isIE;
var a5=(a4)
?"canHaveHTML"
:"tagName";
var a6=0;
for(var a7=0;a7<a3.length;a7++)
{
var a8=a3[a7];
if(a8[a5]&&(a8.offsetWidth>0))
{
var a9=0;
var a10=a8["offsetWidth"];
if(!a4)
{
if((a10==a1)||
(a10<=1))
{
var a11=a8.offsetLeft;
if(a8.parentNode!=a8.offsetParent)
{
a11=a11-
(a8.parentNode.offsetLeft);
}
a9=_getContentWidth(a8,
a10,
a11);
}
else
{
a9=a10;
}
}
else
{
a9=a8["clientWidth"];
if(a9==0)
{
var a11=a8.offsetLeft;
if(a8.parentElement!=a8.offsetParent)
{
a11=a11-
(a8.parentElement.offsetLeft);
}
a9=_getContentWidth(a8,
a10,
a11);
}
}
if(a9>a6)
{
a6=a9;
}
}
}
if(a6==0)
a6=a1;
return a6+a2;
}
function _getParentWindow(a0)
{
var a1=a0.parent;
try
{
a1.name;
return a1;
}
catch(e)
{
return undefined;
}
}
function _getTop(a0)
{
var a1=_getParentWindow(a0);
while(a1&&(a1!=a0))
{
a0=a1;
a1=_getParentWindow(a0);
}
return a0;
}
function t(a0,a1)
{
if(_tURL)
{
document.write('<img src="'+_tURL+'"');
if(a0)
document.write(' width="'+a0+'"');
if(a1)
document.write(' height="'+a1+'"');
if(_axm)
document.write(' alt=""');
document.write('>');
}
}
function _getDependents(
a0,
a1
)
{
var a2;
if(a0)
{
a2=a0["_dependents"];
if(!a2)
{
if(a1)
{
a2=new Object();
a0["_dependents"]=a2;
}
}
}
return a2;
}
function _getDependent(
a0,
a1
)
{
var a2=_getDependents(a0);
var a3;
if(a2)
{
a3=a2[a1];
}
return a3;
}
function _setDependent(
a0,
a1,
a2
)
{
var a3=_getDependents(a0,true);
if(a3)
{
a3[a1]=a2;
}
}
function _getModalDependent(
a0
)
{
return _getDependent(a0,"modalWindow");
}
function _isModalDependent(
a0,
a1
)
{
return(a1==_getModalDependent(a0));
}
function _unloadADFDialog(
a0
)
{
_blockCheckUnloadFromDialog=false;
_checkUnload(a0);
_blockCheckUnloadFromDialog=true;
}
function _checkUnload(
a0
)
{
a0=_getEventObj();
if(_blockCheckUnloadFromDialog)
{
_blockCheckUnloadFromDialog=false;
return;
}
if(_isModalAbandoned())
return;
var a1=_getModalDependent(window);
if(a1!=null)
{
_setModalAbandoned(a1);
a1.close();
}
var a2=_getTop(self);
if(!a2)
return;
var a3=a2["opener"];
if(!a3)
return;
var a4=_getDependent(a3,self.name);
if(_isModalDependent(a3,self))
{
_setDependent(a3,"modalWindow",(void 0));
a3.onfocus=null;
if(_agent.supportsDomDocument)
{
var a5=a3.document.body;
if(_agent.atLeast("ie",4))
{
if(_agent.atLeast("ie",5)&&_agent.isWindows)
{
a5.onlosecapture=null;
_removeModalCaptureIE(a5);
}
a5.style.filter=null;
}
if(_agent.isGecko)
{
if(a5!=(void 0))
{
_removeModalCaptureGecko(a3,a5);
}
}
}
}
if(a4!=(void 0))
{
_setDependent(a3,self.name,(void 0));
if(a0==(void 0))
a0=self.event;
a4(a2,a0);
}
}
function _addModalCaptureIE(a0)
{
var a1=new Object();
var a2=_IE_MOUSE_CAPTURE_EVENTS;
var a3=a2.length;
for(var a4=0;a4<a3;a4++)
{
var a5=a2[a4];
a1[a5]=a0[a5];
a0[a5]=_captureEventIE;
}
window._modalSavedListeners=a1;
a0.setCapture();
}
function _removeModalCaptureIE(a0)
{
a0.releaseCapture();
var a1=window._modalSavedListeners;
if(a1)
{
var a2=_IE_MOUSE_CAPTURE_EVENTS;
var a3=a2.length;
for(var a4=0;a4<a3;a4++)
{
var a5=a2[a4];
a0[a5]=a1[a5];
}
window._modalSavedListeners=null;
}
}
function _captureEventIE()
{
window.event.cancelBubble=true;
}
function _addModalCaptureGecko(a0)
{
var a1=_GECKO_MOUSE_CAPTURE_EVENTS;
var a2=a1.length;
for(var a3=0;a3<a2;a3++)
{
var a4=a1[a3];
a0.addEventListener(a4,_captureEventGecko,true);
}
}
function _removeModalCaptureGecko(a0,a1)
{
var a2=_GECKO_MOUSE_CAPTURE_EVENTS;
var a3=a2.length;
for(var a4=0;a4<a3;a4++)
{
var a5=a2[a4];
a1.removeEventListener(a5,
a0._captureEventGecko,
true);
}
}
function _captureEventGecko(
a0
)
{
a0.stopPropagation();
window.preventDefault=true;
}
function _isModalAbandoned()
{
var a0=_getTop(self);
return a0._abandoned;
}
function _setModalAbandoned(
a0
)
{
a0._abandoned=true;
}
function _getKeyValueString(
a0,
a1,
a2
)
{
var a3=a0[a1];
if(typeof(a3)=="function")
{
a3="[function]";
}
var a4=(_agent.isGecko)
?((a2+1)%3==0)
?'\n'
:'    '
:'\t';
return a1+':'+a3+a4;
}
function _dumpSuppress(
a0
)
{
_dump(a0,{innerText:1,outerText:1,outerHTML:1,innerHTML:1});
}
function _dump(
a0,
a1,
a2
)
{
var a3="";
if(a0)
{
if(!a2)
{
a2=a0["name"];
}
var a4="return _getKeyValueString(target, key, index);";
if(_agent.atLeast("ie",5)||_agent.isGecko||_agent.isSafari)
a4="try{"+a4+"}catch(e){return '';}";
var a5=new Function("target","key","index",a4);
var a6=0;
var a7=new Array();
for(var a8 in a0)
{
if((!a1||!a1[a8])&&!a8.match(/DOM/))
{
a7[a6]=a8;
a6++;
}
}
a7.sort();
for(var a9=0;a9<a7.length;a9++)
{
a3+=a5(a0,a7[a9],a9);
}
}
else
{
a2="(Undefined)";
}
if(a3=="")
{
a3="No properties";
}
alert(a2+":\n"+a3);
}
function _getJavascriptId(a0)
{
return a0.split(':').join('_');
}
function _getFormName(a0)
{
var a1=a0.name;
if((typeof a1)!='string')
{
if(_agent.isIE)
{
a1=a0.attributes['name'].nodeValue;
}
else
{
a1=a0.getAttribute('name');
}
}
return a1;
}
function _validateForm(
a0,
a1
)
{
if(!_agent.supportsValidation)
{
return true;
}
var a2='_'+_getJavascriptId(_getFormName(a0))+'Validator';
var a3=window[a2];
if(a3)
return a3(a0,a1);
return false;
}
function _valField(
formName,
nameInForm
)
{
if(nameInForm)
{
var target=document.forms[formName][nameInForm];
var blurFunc=target.onblur;
if(blurFunc)
{
var valFunc=blurFunc.toString();
var valContents=valFunc.substring(valFunc.indexOf("{")+1,
valFunc.lastIndexOf("}"));
var targetString="document.forms['"+
formName+
"']['"+
nameInForm+
"']";
valContents=valContents.replace(/this/,targetString);
var lastArg=valContents.lastIndexOf(",");
valContents=valContents.substring(0,lastArg)+")";
eval(valContents);
}
}
}
function _validateAlert(
a0,
a1,
a2,
a3,
a4
)
{
if(!a2)
a2=_getValidators(a0);
var a5=_multiValidate(a0,a1,a2);
var a6=true;
var a7=a4+'\n';
for(var a8 in a2)
{
var a9=a5[a8];
if(!a9||a9.length==0)
continue;
var a10=_getFormElement(a0,a8);
if(!a10)
continue;
var a11=a2[a8].label;
for(var a12=0;a12<a9.length;a12=a12+2)
{
if(a6)
{
_setFocus(a10);
a6=false;
}
var a13=a9[a12];
var a14=_getGlobalErrorString(a10,
a3,
a13.getDetail(),
a11);
a7+=a14+'\n';
}
}
if(a6)
return true;
_recordValidation(true,0);
alert(a7);
_recordValidation(true,0);
return false;
}
function _validateInline(
a0,
a1,
a2
)
{
if(!a2)
a2=_getValidators(a0);
var a3=_multiValidate(a0,a1,a2);
var a4=true;
for(var a5 in a2)
{
var a6=false;
var a7=_getElementById(document,a5+"::icon");
var a8=_getElementById(document,a5+"::msg");
if(a8)
a8.innerHTML="";
TrMessageBox.removeMessages(a5);
var a9=a3[a5];
if(!a9||a9.length==0)
{
if(a8)
a8.style.display="none";
if(a7)
a7.style.display="none";
continue;
}
var a10=_getFormElement(a0,a5);
if(!a10)
continue;
var a11=a2[a5].label;
for(var a12=0;a12<a9.length;a12=a12+2)
{
if(a4)
{
a4=false;
_setFocus(a10);
}
var a13=a9[a12];
if(a8)
a8.innerHTML+=a13.getDetail();
if(!a8&&!TrMessageBox.isPresent())
alert("Field Error ["+a5+"] - "+a13.getDetail());
TrMessageBox.addMessage(a5,a11,a13);
}
if(a8)
a8.style.display="";
if(a7)
a7.style.display="";
}
return a4;
}
function _validateInput(a0,a1)
{
if(!a0)
return true;
var a2=a0.target||a0.srcElement;
if(!a2||!a2.id)
return true;
var a3=_getForm(a2);
if(!a3)
return true;
var a4=_getValidators(a3);
if(!a4)
return true;
var a5=a2.id;
var a6=a4[a5];
if(!a6&&a2.name)
{
a5=a2.name;
a6=a4[a5];
}
if(!a6)
return true;
var a7=new Object();
a7[a5]=a6;
var a8=_validateInline(a3,null,a7,1,null);
if(a1)
return a8;
}
function _recordValidation(a0,a1)
{
if(!a1)
a1=new Date();
_lastDateValidated=a1;
if(a0)
_lastValidationFailure=a1;
}
function _recentValidation(a0)
{
var a1=false;
var a2=250;
if(_agent.isMac)
{
a2=600;
}
var a3=new Date();
var a4;
a4=a3-_lastValidationFailure;
if((a4>=0)&&(a4<a2))
{
a1=true;
}
else if(!a0)
{
a4=a3-_lastDateValidated;
if((a4>=0)&&(a4<a2))
{
a1=true;
}
}
return a1;
}
function _commandChoice(
a0,
a1
)
{
var a2=document.forms[a0].elements[a1].value;
if(a2==void(0))
a2=(document.forms[a0].elements[a1])[0].value;
var a3=a2.indexOf("#");
if(a3==0)
window.document.location.href=a2.substring(1,a2.length);
else
{
var a4=a2.indexOf("[");
var a5=a2.substring(0,a4);
var a6=a2.substring(a4+1,a4+2)
var a7=parseInt(a6);
submitForm(a0,a7,{source:a5});
}
}
function submitForm(
a0,
a1,
a2,
a3
)
{
var a4=true;
if(_agent.isIEGroup)
{
a4=false;
for(var a5 in _delayedEventParams)
{
a4=true;
break;
}
}
if(a4)
{
_delayedEventParams=new Object();
_delayedEventParams["reset"]=true;
}
if((typeof a0)=="string")
{
a0=document[a0];
}
else if((typeof a0)=="number")
{
a0=document.forms[a0];
}
if(!a0)
return false;
var a6=window["_"+_getJavascriptId(_getFormName(a0))+"Validator"];
if(a6==(void 0))
{
_saveFormForLaterSubmit(a0,a1,a2);
return false;
}
var a7=new Date();
if(_recentSubmit(a7))
{
if(_pprFirstClickPass&&_pprBlocking)
{
_saveFormForLaterSubmit(a0,a1,a2);
}
return;
}
_submitRejected=false;
_inPartialSubmit=false;
_lastDateSubmitted=a7;
if(a1==(void 0))
a1=true;
var a8=true;
var a9;
if(a2!=null)
a9=a2.source;
else
a9="";
if(a1&&!_validateForm(a0,a9))
a8=false;
var a10=window["_"+_getJavascriptId(_getFormName(a0))+"_Submit"];
if(a10!=(void 0))
{
var a11=new Function("doValidate",a10);
a0._tempFunc=a11;
var a12=a0._tempFunc(a1);
a0._tempFunc=(void 0);
if(a1&&(a12==false))
{
a8=false;
}
}
if(a8)
{
TrPage.getInstance()._resetHiddenValues(a0);
if(a3&&_supportsPPR())
{
TrPage.getInstance().sendPartialFormPost(a0,a2);
}
else
{
var a13=_supportsDOM();
var a14=new Object();
if(a2)
{
for(var a15 in a2)
{
var a16=a2[a15];
if(a16!=(void 0))
{
var a17=a0.elements[a15];
if(_agent.isPIE)
{
a17.value=a16;
}
else
{
var a18=false;
if(a17&&(typeof(a17)!="string"))
{
if(a17.type=='submit'||a17.type=='button')
{
var a19=document.createElement("input");
a19.type="hidden";
a19.name=a15;
a19.value=a2[a15];
a0.appendChild(a19);
a14[a15]=a19;
a18=true;
}
else
{
a17.value=a16;
}
}
else
{
if(a13)
{
if(!a18)
{
var a19=document.createElement("input");
a19.type="hidden";
a19.name=a15;
a19.value=a2[a15];
a0.appendChild(a19);
a14[a15]=a19;
}
}
}
}
}
}
}
if(_agent.isIE&&window.external)
window.external.AutoCompleteSaveForm(a0);
a0.submit();
if(_blockOnEverySubmit)
_pprStartBlocking(window);
if(a13)
{
for(var a15 in a14)
a0.removeChild(a14[a15]);
}
}
}
return a8;
}
function _submitOnEnter(a0,a1,a2)
{
if(window.event!=(void 0))
a0=window.event;
var a3;
if(a0.srcElement==undefined)
a3=a0.target;
else
a3=a0.srcElement;
if(!a3)return true;
if(a3.tagName=='A')return true;
if((a3.tagName=='INPUT')&&
(a3.type!='submit')&&
(a3.type!='reset'))
{
if(_getKC(a0)==13)
{
if(a2!=(void 0))
{
var a4=new Object();
a4[a2]=a2;
a4['source']=a2;
submitForm(a1,0,a4);
}
return false;
}
}
return true;
}
function _saveFormForLaterSubmit(a0,a1,a2)
{
_saveForm=a0;
_saveDoValidate=a1;
_saveParameters=a2;
_submitRejected=true;
}
function _submitFormCheck()
{
if(_submitRejected)
{
if(_inPartialSubmit)
{
_submitPartialChange(_saveForm,_saveDoValidate,_saveParameters);
_inPartialSubmit=false;
}
else
{
submitForm(_saveForm,_saveDoValidate,_saveParameters);
}
_saveForm=null;
_saveDoValidate=null;
_saveParameters=null;
}
}
function resetForm(
a0
)
{
var a1=false;
if((typeof a0)=="string")
{
a0=document[a0];
}
else if((typeof a0)=="number")
{
a0=document.forms[a0];
}
if(!a0)
return false;
var a1=TrPage.getInstance()._resetForm(a0);
if(a1)
{
window.document.location.reload();
}
else
{
a0.reset();
}
_lastDateReset=new Date();
return a1;
}
function createNameValueString(a0){
var a1="";
try
{
var a2=a0.elements;
for(var a3=0;a3<a2.length;a3++)
{
try
{
var a4=a2[a3];
if(a4.name)
{
if(a4.type=="text"
||a4.type=="password"
||a4.type=="textarea"
||a4.type=="hidden")
{
a1+=(a4.name+"="+escape(a4.value)+"&");
}
else if(a4.type.indexOf("select")!=-1)
{
var a5="";
for(var a6=0;a6<a4.options.length;a6++)
{
if(a4.options[a6].selected==true)
a5+=a4.name+"="
+escape(a4.options[a6].value)+"&";
}
if(!a5)
{
var a7=_getValue(a4);
if(a7)
{
a5+=a4.name+"="+escape(a7)+"&";
}
}
if(a5)
{
a1+=a5;
}
}
else if(a4.type=="checkbox"&&a4.checked)
a1+=(a4.name+"="+escape(a4.value)+"&");
else if(a4.type=="radio"&&a4.checked==true)
a1+=(a4.name+"="+escape(a4.value)+"&");
}
}
catch(e)
{
}
a4=null;
}
}
catch(e)
{
}
return(a1.substring(0,a1.length-1));
}
function _getValue(a0)
{
var a1=a0;
var a2=a0.type;
if(!a2&&a0.length)
{
for(var a3=0;a3<a0.length;a3++)
{
a2=a0[a3].type;
if(a2!=(void 0))
{
a1=a0[a3];
break;
}
}
}
if(a2=="checkbox")
{
if(a0.length)
{
for(var a3=0;a3<a0.length;a3++)
{
if(a0[a3].type=="checkbox"&&
a0[a3].checked)
{
return a0[a3].value;
}
}
}
else
{
return a0.checked;
}
}
else if(a2=="select-multiple")
{
var a4=new Array();
for(var a3=0;a3<a0.length;a3++)
{
if(a0.options[a3].selected)
{
a4[a4.length]=a0.options[a3].value;
}
}
return(a4.length>0)?a4:"";
}
else if(a2.substring(0,6)=="select")
{
a0=a1;
var a5=a0.selectedIndex;
if(a5!=(void 0)&&
a5!=null&&
a5>=0)
{
var a6=a0.options[a5];
var a7=a6.value;
if(!a7)
{
for(var a3=0;a3<a0.options.length;a3++)
{
if(a0.options[a3].value)
return a7;
}
return a6.text;
}
return a7;
}
return"";
}
else if(a2=="radio")
{
if(a0.length)
{
for(var a3=0;a3<a0.length;a3++)
{
if(a0[a3].type=="radio"&&
a0[a3].checked)
{
return a0[a3].value;
}
}
}
else
{
if(a0.checked)
{
return a0.value;
}
}
return"";
}
else
{
return a0.value;
}
}
function _setSelectIndexById(a0,a1)
{
var a2=_getElementById(document,a0);
if(a2!=null)
a2.selectedIndex=a1;
}
function _syncChoiceIndex(a0)
{
var a1=a0.form;
var a2=a0.name;
var a3=a1.elements[a2];
for(i=0;i<a3.length;i++)
{
a3[i].selectedIndex=a0.selectedIndex;
}
}
function _clearPassword(a0,a1)
{
if(window.event!=(void 0))
a1=window.event;
if(a0.value!="******")
return true;
if((a1.keyCode==8)||
((a1.keyCode>=46)&&(a1.keyCode<112)))
a0.value="";
return true;
}
function _setFocus(a0)
{
if(_isShowing(a0))
{
if(a0.focus)
a0.focus();
if((a0.type=="text")
&&(a0.value!=(void 0))
&&(a0.value!=null)
&&(a0.value.length>0))
{
if(true!=_delayedEventParams["reset"])
a0.select();
}
}
}
function _addValidators(a0,a1,a2,a3,a4)
{
var a5=document.forms[a0];
var a6=_getValidators(a5);
if(!a6)
a6=new Object();
for(var a7=0;a7<a1.length;a7+=5)
{
var a8=a1[a7];
var a9=new Object();
if(a1[a7+1])
{
var a10=a1[a7+2];
a9.required=true;
a9.requiredFormat=a4[a10];
}
var a11=a1[a7+3];
if(a11!=null)
{
a9.converter=a2[a11];
}
var a12=a1[a7+4];
if(a12)
{
for(j=0;j<a12.length;j++)
{
a12[j]=a2[a12[j]];
}
a9.validators=a12;
}
var a13=a3[a8];
if(a13)
a9.label=a13;
a6[a8]=a9;
if(_TrEventBasedValidation)
{
var a14=_getElementById(document,a8);
if(a14)
{
_addEvent(a14,"change",_validateInput);
}
}
}
window["_"+_getJavascriptId(_getFormName(a5))+"_Validators"]=a6;
}
function _multiValidate(
form,
source,
validators
)
{
var failureMap=new Object();
var subforms=window[_getFormName(form)+"_SF"];
var ignorePrefixes=new Array();
var foundUsedSubform=false;
var key;
if(source!=(void 0))
{
for(key in subforms)
{
if(source.indexOf(key+":")==0)
{
foundUsedSubform=true;
break;
}
}
for(key in subforms)
{
if(source.indexOf(key+":")!=0)
{
if((foundUsedSubform)||(subforms[key]==1))
ignorePrefixes.push(key+":");
}
}
}
if(validators&&!_recentValidation(true))
{
for(var id in validators)
{
if(_getElementById(document,id)==null)
{
continue;
}
var isIgnored=false;
for(var j=0;j<ignorePrefixes.length;j++)
{
if(id.indexOf(ignorePrefixes[j])==0)
{
isIgnored=true;
break;
}
}
if(isIgnored)
continue;
var currInput=_getFormElement(form,id);
if(!currInput)
continue;
var inputFailures=new Array();
var descriptor=validators[id];
var label=descriptor.label;
var elementType=currInput.type;
if(!elementType&&currInput.length)
{
var firstType=currInput[0].type;
if(firstType!="radio"&&firstType!="checkbox")
{
currInput=currInput[0];
}
}
var value=_getValue(currInput);
var required=descriptor.required;
if(required&&((value=="")||(value==null)))
{
var requiredErrorString=_getErrorString(currInput,label,
descriptor.requiredFormat);
inputFailures[inputFailures.length]=
new TrFacesMessage(requiredErrorString,requiredErrorString);
}
else
{
var converterConstructor=descriptor.converter;
var converterError=false;
if(converterConstructor)
{
if((value!=null)&&
!((typeof value=="string")&&(value=="")))
{
var converter=eval(converterConstructor);
try
{
value=converter.getAsObject(value,label);
}
catch(e)
{
converterError=true;
inputFailures[inputFailures.length]=e.getFacesMessage();
}
}
}
if(converterError==false)
{
var validatorArray=descriptor.validators;
if(validatorArray)
{
for(var j=0;j<validatorArray.length;j=j+1)
{
if((value!==null)&&
!((typeof value=="string")&&value==""))
{
var validatorConstructor=validatorArray[j];
if(validatorConstructor&&value!==undefined)
{
var validator=eval(validatorConstructor);
try
{
validator.validate(value,label,converter);
}
catch(e)
{
inputFailures[inputFailures.length]=e.getFacesMessage();
}
}
}
}
}
}
}
if(inputFailures.length>0)
{
failureMap[id]=inputFailures;
}
}
}
return failureMap;
}
function _createFacesMessage(
a0,
a1,
a2,
a3,
a4
)
{
var a5=TrMessageFactory.getSummaryString(a0);
var a6=TrMessageFactory.getDetailString(a0);
if(a6!=null)
{
a6=TrFastMessageFormatUtils.format(a6,a1,a2,a3,a4);
}
return new TrFacesMessage(a5,
a6,
TrFacesMessage.SEVERITY_ERROR);
}
function _createCustomFacesMessage(
a0,
a1,
a2,
a3,
a4,
a5
)
{
if(a1!=null)
{
a1=TrFastMessageFormatUtils.format(a1,a2,a3,a4,a5);
}
return new TrFacesMessage(a0,
a1,
TrFacesMessage.SEVERITY_ERROR);
}
function _getGlobalErrorString(
a0,
a1,
a2,
a3
)
{
var a4=_getForm(a0);
if(a1&&a3!=null)
{
return _formatErrorString(a1,
{
"0":a3,
"1":a2
});
}
return a2;
}
function _isShowing(
a0)
{
if(a0.type=='hidden')
return false;
if(_agent.isIEGroup)
{
var a1=a0;
while(a1!=(void 0))
{
computedStyle=a1.currentStyle;
if((computedStyle!=(void 0))&&
((computedStyle["visibility"]=="hidden")||
(computedStyle["display"]=="none")))
{
return false;
}
a1=a1.parentNode;
}
return true;
}
if(_agent.isGecko||_agent.isSafari||_agent.BlackBerry)
{
if(!a0.ownerDocument&&a0.length)
a0=a0[0];
var a2=a0.ownerDocument.defaultView.getComputedStyle(a0,
null);
return((a2["visibility"]!="hidden")&&
(a2["display"]!="none"));
}
return true;
}
function _getID(
a0
)
{
if(_agent.isPIE)
{
return a0.name;
}
var a1=a0.id;
var a2=a0.type;
if(!a2&&a0.length)
a2=a0[0].type;
if(a2=="radio")
{
var a3;
if(a0.length)
{
a3=a0[0].parentNode;
if(a3.tagName=='FIELDSET')
a3=a3.parentNode;
}
else
{
a3=a0.parentNode;
}
a1=a3.id;
}
return a1;
}
function _getForm(
a0
)
{
var a1=a0.form;
if(a1==(void 0))
{
if(a0.length)
{
a1=a0[0].form;
}
}
return a1;
}
function _getFormElement(
a0,
a1)
{
var a2=null;
if(_agent.isPIE)
{
a2=a0.elements[a1];
}
else
{
a2=a0[a1];
if(a2==undefined)
{
a2=a0.elements[a1+":trailing:items"];
}
}
return a2;
}
function _getName(
a0
)
{
var a1=a0.name;
if(a1==(void 0))
{
var a2=a0.type;
if(!a2&&a0.length)
a2=a0[0].type;
if(a2=="radio"&&a0.length)
{
a1=a0[0].name;
}
}
return a1;
}
function _instanceof(
a0,
a1
)
{
if(a1==(void 0))
return false;
if(a0==(void 0))
return false;
while(typeof(a0)=="object")
{
if(a0.constructor==a1)
return true;
a0=a0.prototype;
}
return false;
}
function _getErrorString(
a0,
a1,
a2,
a3
)
{
var a4;
var a5=_getForm(a0);
var a6=_getValue(a0);
if(_instanceof(a3,window["TrConverterException"]))
{
a4=a3.getFacesMessage().getDetail();
}
else if(_instanceof(a3,window["TrValidatorException"]))
{
a4=a3.getFacesMessage().getDetail();
}
else
{
a4=a2;
}
if(a4)
{
var a7=_formatErrorString(a4,
{
"0":a1,
"1":a6
});
return a7;
}
}
function _getValidators(
a0
)
{
return window["_"+_getJavascriptId(_getFormName(a0))+"_Validators"];
}
function _formatErrorString(
a0,
a1
)
{
var a2=a0;
for(var a3 in a1)
{
var a4=a1[a3];
if(!a4)
{
a4="";
}
if(typeof a4=="string")
{
a4=a4.replace("{","{'");
a4=a4.replace("}","'}");
}
var a5="{"+a3+"}";
a2=a2.replace(new RegExp('%'+a3+'%','g'),
a5);
var a6=a2.indexOf(a5);
if(a4.indexOf&&a4.indexOf(a5)>=0)
{
var a7='';
for(i=0;i<a4.length;i++)
{
a7=a7+'placeHolderString';
}
while(a6>=0)
{
a2=(a2.substring(0,a6)
+a7
+a2.substring(a6+a5.length));
a6=a2.indexOf(a5);
}
a6=a2.indexOf(a7);
while(a6>=0)
{
a2=(a2.substring(0,a6)
+a4
+a2.substring(a6+a7.length));
a6=a2.indexOf(a7);
}
}
else
while(a6>=0)
{
a2=(a2.substring(0,a6)
+a4
+a2.substring(a6+a5.length));
a6=a2.indexOf(a5);
}
}
while(a2.indexOf("{'")!=-1)
{
a2=a2.replace("{'","{");
a2=a2.replace("'}","}");
}
var a8=/''/g;
return a2.replace(a8,"'");
}
function _chain(
a0,
a1,
a2,
a3,
a4
)
{
var a5=_callChained(a0,a2,a3);
if(a4&&(a5==false))
return false;
var a6=_callChained(a1,a2,a3);
return!((a5==false)||(a6==false));
}
function _callChained(
a0,
a1,
a2
)
{
if(a0&&(a0.length>0))
{
if(a2==(void 0))
{
a2=a1.window.event;
}
var a3=new Function("event",a0);
a1._tempFunc=a3;
var a4=a1._tempFunc(a2);
a1._tempFunc=(void 0);
return!(a4==false);
}
else
{
return true;
}
}
function _checkLength(a0,a1,a2)
{
elementLength=a0.value.length;
if(elementLength>a1)
{
a0.value=a0.value.substr(0,a1);
return true;
}
if(elementLength<a1)
return true;
if(_agent.isIE)
{
if(a2["type"]=="hidden")
a2=window.event;
}
if(a2.type=='change')
return true;
if(a2)
{
if((a2.which<32)
||((a2.which==118)&&(a2["ctrlKey"])))
return true;
}
return false;
}
function _getElementById(
a0,
a1
)
{
if(typeof(a0.getElementById)!='undefined')
{
if(((_agent.kind!="ie")||(_agent.version>=5))&&(!_agent.isBlackBerry))
{
var a2=a0.getElementById(a1);
if((a2==null)||(a2.id==a1))
return a2;
return _findElementById(a0,a1);
}
return a0.getElementById(a1);
}
else if(typeof(a0.all)=='undefined')
{
if(a0.forms.length==0)
return window[a1];
else
for(var a3=0;a3<a0.forms.length;a3++)
{
var a4=a0.forms[a3];
if(a4[a1])
return a4[a1];
}
return window[a1];
}
else
{
return a0.all[a1];
}
}
function _findElementById(
a0,
a1
)
{
if(a0.id==a1)
return a0;
if(a0.childNodes)
{
var a2=a0.childNodes;
for(var a3=0;a3<a2.length;a3++)
{
var a4=_findElementById(a2.item(a3),a1);
if(a4!=null)
return a4;
}
}
return null;
}
function _getQuerySeparator(a0)
{
var a1=a0.charAt(a0.length-1);
if((a1=='&')||(a1=='?'))
return"";
return(a0.indexOf('?')>=0)?'&':'?';
}
function _addParameter(
a0,
a1,
a2
)
{
var a3=a0.indexOf('?');
if(a3==-1)
{
return a0+'?'+a1+'='+a2;
}
else
{
var a4=a0.indexOf('?'+a1+'=',a3);
if(a4==-1)
a4=a0.indexOf('&'+a1+'=',a3+1);
if(a4==-1)
{
return a0+'&'+a1+'='+a2;
}
else
{
var a5=a4+a1.length+2;
var a6=a0.substring(0,a5);
a6+=a2;
var a7=a0.indexOf('&',a5);
if(a7!=-1)
{
a6+=a0.substring(a7);
}
return a6;
}
}
}
function _addFormParameter(
a0,
a1,
a2
)
{
var a3=new Object();
if(a0)
{
for(var a4 in a0)
a3[a4]=a0[a4];
}
a3[a1]=a2;
return a3;
}
function _pprInstallBlockingHandlers(a0,a1)
{
var a2=a0.document;
if(a2==(void 0))
return;
if(!a2.attachEvent&&!a2.addEventListener)
{
return;
}
if(a2.attachEvent)
{
var a3=a0._pprConsumeFirstClick;
if(a1)
{
var a4=a0.event;
if(a4!=(void 0))
{
var a5=document.elementFromPoint(a4.x,a4.y);
if(!a0._pprFirstClickPass
||(((a4.type=='change')||(a4.type=='blur'))
&&(a4.srcElement==a5))
||(!_isSubmittingElement(a5)))
{
_pprControlCapture(a0,true);
return;
}
}
a2.attachEvent('onclick',a3);
}
else
{
a2.detachEvent('onclick',a3);
_pprControlCapture(a0,false);
}
}
else
{
var a3=a0._pprConsumeBlockedEvent;
var a6={'click':1,'keyup':1,'keydown':1,'keypress':1};
for(var a7 in a6)
{
if(a1)
a2.addEventListener(a7,a3,true);
else
a2.removeEventListener(a7,a3,true);
}
}
}
function _pprConsumeClick(a0)
{
if(_agent.isIE)
{
var a1=document.body;
if((a0.x<a1.offsetLeft)||(a0.y<a1.offsetTop)
||(a0.x>a1.offsetWidth)||(a0.y>a1.offsetHeight))
{
_pprStopBlocking(window);
}
}
return false;
}
function _pprStartBlocking(a0)
{
if(_agent.isIE)
{
a0._pprTimeoutFunc=a0.setTimeout("_doPprStartBlocking(window);",
1);
return;
}
else
{
_doPprStartBlocking(a0);
}
}
function _doPprStartBlocking(a0)
{
if(a0._pprTimeoutFunc)
a0.clearTimeout(a0._pprTimeoutFunc);
if(!a0._pprBlocking)
{
var a1=a0.document.body;
a0._pprBlockStartTime=new Date();
if(_agent.isGecko)
{
if(a0._pprBlockingTimeout!=null)
{
a0.clearTimeout(a0._pprBlockingTimeout);
}
a0._pprBlockingTimeout=a0.setTimeout("_pprStopBlocking(window);",
8000);
}
else if(_agent.isIEGroup)
{
_pprEventElement=window.document.activeElement;
}
_pprInstallBlockingHandlers(a0,true);
a0._pprBlocking=true;
}
}
function _pprStopBlocking(a0)
{
var a1=a0.document;
if(a0._pprBlocking)
{
if(_agent.isGecko)
{
if(a0._pprBlockingTimeout!=null)
{
a0.clearTimeout(a0._pprBlockingTimeout);
a0._pprBlockingTimeout==null;
}
}
_pprInstallBlockingHandlers(a0,false);
a0._pprEventElement=null;
a0._pprBlocking=false;
}
a0._pprBlocking=false;
}
function _pprFocus(a0,a1)
{
if(_agent.isIEGroup)
{
if(a0.parentNode==null)
return;
var a2=_getElementById(a1,_pprdivElementName);
if((a2)&&(a2["focus"]))
a2.focus();
}
a0.focus();
}
function _pprConsumeBlockedEvent(a0)
{
var a1=true;
if(_pprBlocking)
{
var a2=true;
if(window._pprFirstClickPass)
{
var a3=new Date();
var a4=a3-_pprBlockStartTime;
var a5=150;
if((a4<a5)&&(a0.type=='click'))
{
var a6=a0.explicitOriginalTarget;
a2=!_isSubmittingElement(a6);
}
}
if(a2)
{
a0.stopPropagation();
a0.preventDefault();
a1=false;
}
}
return a1;
}
function _pprConsumeFirstClick(a0)
{
if(_agent.isIE)
{
_pprControlCapture(window,true);
window.document.detachEvent('onclick',_pprConsumeFirstClick);
}
return false;
}
function _pprControlCapture(a0,a1)
{
if(_agent.isIE)
{
var a2=a0.document;
var a3=a2.body;
var a4=_getElementById(a2,_pprdivElementName);
if(a4)
{
if(a1)
{
a4.setCapture();
if(a0._pprEventElement)
a4.focus();
a0._pprSavedCursor=a3.style.cursor;
a3.style.cursor="wait";
a0._pprSavedCursorFlag=true;
}
else if(a0._pprSavedCursorFlag)
{
a4.releaseCapture();
if(a0._pprEventElement)
a0._pprEventElement.focus();
a3.style.cursor=a0._pprSavedCursor;
a0._pprSavedCursor=null;
a0._pprSavedCursorFlag=false;
}
}
}
return;
}
function _pprChoiceAction()
{
if(!_agent.isIE)
return true;
var a0=false;
if((!window._pprBlocking)&&(_pprChoiceChanged))
{
_pprChoiceChanged=false;
a0=true;
}
return a0;
}
function _pprChoiceChangeEvent(a0)
{
if(!_agent.isIE)
return true;
if(!window._pprBlocking)
_pprChoiceChanged=true;
return true;
}
function _supportsPPR()
{
return!_agent.pprUnsupported;
}
function _firePartialChange(a0)
{
var a1=TrPage.getInstance();
var a2=a1.getRequestQueue();
a2.sendRequest(
a1,a1._requestStatusChanged,a0);
}
function _submitPartialChange(
a0,
a1,
a2)
{
if(!_supportsPPR())
return submitForm(a0,a1,a2);
if((typeof a0)=="string")
a0=document[a0];
if(!a0)
return false;
a2=_addFormParameter(a2,"partial","true");
_pprStartBlocking(window);
var a3=submitForm(a0,a1,a2,true);
if(!a3)
{
_pprStopBlocking(window);
}
}
function _setRequestedFocusNode(a0,a1,a2,a3)
{
if(!a3)
a3=window;
a3._TrFocusRequestDoc=a0;
a3._TrFocusRequestID=a1;
a3._TrFocusRequestNext=(a2==true);
}
function _getRequestedFocusNode(a0)
{
if(a0==(void 0))
a0=window;
if((a0._TrFocusRequestDoc!=null)
&&(a0._TrFocusRequestID!=null))
{
var a1=_getElementById(a0._TrFocusRequestDoc,
a0._TrFocusRequestID);
if(!a1)
return null;
if(a0._TrFocusRequestNext)
{
for(var a2=a1.nextSibling;
a2!=null;
a2=a2.nextSibling)
{
if(_isFocusable(a2)
||((_agent.isIE)&&(a2.nodeName.toLowerCase()=='a')))
{
a1=a2;
break;
}
}
}
return a1;
}
return null;
}
function _getFirstFocusable(a0)
{
if((a0==null)||_isFocusable(a0))
return a0;
if(a0.hasChildNodes)
{
var a1=a0.childNodes;
for(var a2=0;a2<a1.length;a2++)
{
var a3=a1[a2];
var a4=_getFirstFocusable(a3);
if(a4!=null)
return a4;
}
}
return null;
}
function _restoreFocus(a0,a1,a2)
{
if(a0==null)
return;
var a3=_getAncestorByName(a0,"DIV");
if(!a3)
{
_pprFocus(a0,a2);
}
else
{
var a4=a3.scrollTop;
var a5=a3.scrollLeft;
if(((a4==0)&&(a5==0))||!a1)
{
_pprFocus(a0,a2);
}
}
if((_agent.isIE)
&&(a0.tagName=='INPUT')
&&(_getAncestorByName(a0,'TABLE')))
{
_pprFocus(a0,a2);
}
}
function _getAncestorByName(
a0,
a1
)
{
a1=a1.toUpperCase();
while(a0)
{
if(a1==a0.nodeName)
return a0;
a0=a0.parentNode;
}
return null;
}
function _isDescendent(
a0,
a1
)
{
if(a0==null)
return false;
while(a0.parentNode)
{
if(a0==a1)
return true;
a0=a0.parentNode;
}
return false;
}
function _isFocusable(a0)
{
if(a0==null)
return false;
var a1=a0.nodeName.toLowerCase();
if(('a'==a1)&&(a0.href))
{
if(!_agent.isIE||(a0.id))
return true;
var a2=a0.childNodes;
if((a2)&&(a2.length==1))
{
var a3=a2[0].nodeName;
if('img'==a3.toLowerCase())
return false;
}
return true;
}
if(a0.disabled)
return false;
if('input'==a1)
{
return(a0.type!='hidden');
}
return(('select'==a1)||
('button'==a1)||
('textarea'==a1));
}
function _eval(targetWindow,code)
{
if(code==null)
return;
if(_agent.isIEGroup)
{
targetWindow.execScript(code);
}
else
targetWindow.eval(code);
}
function _getInputField(a0)
{
var a1=(void 0);
var a2=(void 0);
if(window.event)
{
kc=window.event.keyCode;
a2=window.event.srcElement;
}
else if(a0)
{
kc=a0.which;
a2=a0.target;
}
if(a2!=(void 0)
&&(a2.tagName=="INPUT"||
a2.tagName=="TEXTAREA"))
a1=a2;
return a1;
}
function _enterField(
a0
)
{
var a1;
var a2;
var a3=true;
var a1=_getInputField(a0);
if(a1!=(void 0))
{
a1.form._mayResetByInput=false;
a1._validValue=a1.value;
a3=false;
}
return a3;
}
function _resetOnEscape(a0)
{
var a1;
var a2=_getInputField(a0);
if(a2!=(void 0))
{
var a3=a2.form;
if(a1==27)
{
var a4=false;
if((a2.selectionStart!=(void 0))&&
(a2.selectionEnd!=(void 0)))
{
a4=(a2.selectionStart!=a2.selectionEnd);
}
else if(document.selection)
{
a4=(document.selection.createRange().text.length!=0);
}
if(!a4)
{
a2.value=a2._validValue;
if(a3._mayResetByInput==true)
{
a3.reset();
a3._mayResetByInput=false;
}
else
{
a3._mayResetByInput=true;
}
}
return false;
}
else
{
a3._mayResetByInput=false;
}
}
return true;
}
function _checkLoadNoPPR()
{
if(_initialFocusID!=null)
_setFocus(_getElementById(document,_initialFocusID));
_agent.pprUnsupported=true;
}
function _checkLoad()
{
if(!_agent.isIEGroup&&document.addEventListener)
{
document.addEventListener("keyup",_trTrackActiveElement,false);
document.addEventListener("mousedown",_trTrackActiveElement,false);
}
if(document.forms)
{
for(var a0=0;a0<document.forms.length;a0++)
{
var a1=document.forms[a0];
if(a1.addEventListener)
{
a1.addEventListener('focus',_enterField,true);
a1.addEventListener('keydown',_resetOnEscape,true);
}
else if(a1.attachEvent)
{
a1.attachEvent('onfocusin',_enterField);
a1.attachEvent('onkeydown',_resetOnEscape);
}
}
}
var a2=_getTop(self);
if((self!=a2)&&a2["_blockReload"])
{
document.onkeydown=_noReload;
}
if((!_agent.isNav)&&(_initialFocusID!=null))
{
var a3=_getElementById(document,_initialFocusID);
if(a3)
_setFocus(a3);
}
TrPopupDialog._initDialogPage();
}
function _getActiveElement()
{
if(document.activeElement)
return document.activeElement;
return window._trActiveElement;
}
function _trTrackActiveElement(a0)
{
window._trActiveElement=a0.target;
}
function _noReload(a0)
{
if(!a0)a0=window.event;
var a1=a0.keyCode;
if((a1==116)||(a1==82&&a0.ctrlKey))
{
if(a0.preventDefault)a0.preventDefault();
a0.keyCode=0;
return false;
}
}
function _handleClientEvent(a0,a1,a2,a3)
{
var a4=new Object();
a4.type=a0;
a4.source=a1;
a4.params=a2;
var a5=new Function("event",a3);
return a5(a4);
}
function _getCookie(a0)
{
var a1=document.cookie;
var a2="";
var a3=a0+"=";
if(a1)
{
var a4=a1.indexOf("; "+a3);
if(a4<0)
{
a4=a1.indexOf(a3);
if(a4>0)
a4=-1;
}
else
a4+=2;
if(a4>=0)
{
var a5=a1.indexOf(";",a4);
if(a5<0)
a5=a1.length;
a2=unescape(a1.substring(a4+a0.length+1,a5));
}
}
return a2;
}
function _setCookie(a0,a1)
{
var a2=window.location.host;
var a3=a2.indexOf(":");
if(a3>=0)
a2=a2.substr(0,a3);
var a4=new Date();
a4.setFullYear(a4.getFullYear()+10);
var a5=a0+"="+a1+
"; path=/;domain="+a2+"; expires="+a4.toGMTString();
document.cookie=a5;
}
function _setTrCookie(a0,a1)
{
var a2=_getTrCookie();
a2[a0]=a1;
var a3=a2[0];
for(var a4=1;a4<a2.length;a4++)
{
a3=a3+"^"+a2[a4];
}
_setCookie("oracle.uix",a3);
}
function _getTrCookie()
{
var a0=_getCookie("oracle.uix");
var a1;
if(a0)
a1=a0.split("^");
else
a1=new Array("0","","");
return a1;
}
function _defaultTZ()
{
var a0=_getTrCookie()[2];
if(a0&&(a0.indexOf("GMT")!=0))
{
return;
}
_setTrCookie(2,_getTimeZoneID());
}
function _getTimeZoneID()
{
var a0=-(new Date()).getTimezoneOffset();
var a1;
if(a0>0)
a1="GMT+";
else
{
a1="GMT-";
a0=-a0;
}
var a2=""+a0%60;
if(a2.length==1)
a2="0"+a2;
return(a1+(Math.floor(a0/60))+":"+a2);
}
function _isLTR()
{
return document.documentElement["dir"].toUpperCase()=="LTR";
}
function _isSubmittingElement(a0)
{
var a1=false;
var a2=a0.nodeName.toUpperCase();
if(a2=="BUTTON")
{
a1=true;
}
else if(a2=="IMG")
{
var a3=a0.parentNode;
var a4=a3.nodeName.toUpperCase();
if(('A'==a4)&&(a3.href))
{
var a5=""+a3["onclick"];
if((a5!=(void 0))&&(a5!=null))
{
a1=((a5.indexOf("submitForm")>0)
||(a5.indexOf("_uixspu")>0)
||(a5.indexOf("_adfspu")>0)
||(a5.indexOf("_addRowSubmit")>0));
}
}
}
return a1;
}
function _getKC(a0)
{
if(window.event)
return window.event.keyCode;
else if(a0)
return a0.which;
return-1;
}
function _recentSubmit(a0)
{
if(_lastDateSubmitted)
{
var a1=a0-_lastDateSubmitted;
if((a1>=0)&&(a1<200))
return true;
}
return false;
}
function _recentReset(a0)
{
if(_lastDateReset)
{
var a1=a0-_lastDateReset;
if((a1>=0)&&(a1<200))
return true;
}
return false;
}
function _radioSet_uixspu(a0,a1,a2,a3,a4,a5,a6)
{
_radioSet_adfspu(a0,a1,a2,a3,a6);
}
function _radioSet_adfspu(a0,a1,a2,a3,a4)
{
if(window._pprBlocking)
return;
if(_pendingRadioButton)
{
_pendingRadioButton=false;
_adfspu(a0,a1,a2,a3,a4);
}
else
{
_pendingRadioButton=true;
var a5="_pendingRadioButton=false;_adfspu(";
if((a0!=(void 0))&&(a0!=null))
a5+="'"+a0+"'";
a5+=",";
if(a1!=(void 0))
a5+=a1;
a5+=",";
if((a2!=(void 0))&&(a2!=null))
a5+="'"+a2+"'";
a5+=",";
if((a3!=(void 0))&&(a3!=null))
a5+="'"+a3+"'";
a5+=");";
window.setTimeout(a5,200);
}
}
function _stepSpinboxValue(a0,a1,a2,a3,a4)
{
var a5=false;
var a6=_getElementById(document,a0);
if(a6)
{
var a7=a6.value;
if(isNaN(a7)||isNaN(a2)||isNaN(a3)||isNaN(a4))
{
alert("value, stepSize, min, and max must all be numbers. value: "+
a7+", stepSize: "+a2+", min: "+a3+", max: "+a4);
return false;
}
if(a1)
{
var a8=parseFloat(a7)+parseFloat(a2);
if(a8<a4)
a6.value=a8;
else if(a5)
a6.value=a3;
else a6.value=a4;
}
else
{
var a9=parseFloat(a7)-parseFloat(a2);
if(a9>a3)
a6.value=a9;
else if(a5)
a6.value=a4;
else a6.value=a3;
}
return true;
}
return false;
}
function _clearSpinbox()
{
window.clearTimeout(_spinboxRepeat.timer);
_spinboxRepeat.functionString=null;
}
function _spinboxRepeat(a0,a1,a2,a3,a4)
{
var a5=_stepSpinboxValue(a0,a1,a2,a3,a4);
if(!a5)
{
window.clearTimeout(_spinboxRepeat.timer);
}
else
{
if(_spinboxRepeat.functionString==null)
{
_spinboxRepeat.functionString=
"_spinboxRepeat('"+a0+"',"+a1+
","+a2+","+a3+","+a4+");";
}
_spinboxRepeat.timer=
window.setTimeout(_spinboxRepeat.functionString,1000);
}
}
function _getEventObj()
{
if(typeof(event)=='undefined')
return window.event;
else
return event;
return null;
}
var TrUIUtils=new Object();
TrUIUtils.trim=function(
a0)
{
if(a0!=null&&(typeof a0)=='string')
return a0.replace(TrUIUtils._TRIM_ALL_RE,'');
return a0;
}
TrUIUtils._TRIM_ALL_RE=/^\s*|\s*$/g;
TrUIUtils.createCallback=function(a1,a2)
{
var a3=new Function(
"var f=arguments.callee; return f._func.apply(f._owner, arguments);");
a3._owner=a1;
a3._func=a2;
return a3;
}
TrUIUtils._getWindowClientSize=function()
{
var a4;
if(TrUIUtils['_getWinClientSize']==null)
{
if(_agent.isIE)
{
TrUIUtils._getWinClientSize=function()
{
var a5=((document.compatMode=="BackCompat")?document.body:document.documentElement);
return{w:a5.clientWidth,h:a5.clientHeight};
}
}
else
{
TrUIUtils._getWinClientSize=function()
{
return{w:window.innerWidth,h:window.innerHeight};
}
}
}
return TrUIUtils._getWinClientSize();
}
TrUIUtils._getElementBounds=function(a6)
{
if(typeof(a6)=="string")
{
a6=document.getElementById(a6);
}
if(!a6)
{
return null;
}
var a7=TrUIUtils._getElementLocation(a6);
return{x:a7.x,y:a7.y,w:a6.offsetWidth,h:a6.offsetHeight};
}
TrUIUtils._getElementLocation=function(a8)
{
if(typeof(a8)=="string")
{
a8=document.getElementById(a8);
}
if(!a8)
{
return null;
}
var a9;
if(TrUIUtils['_getElemLoc']==null)
{
if(_agent.isGecko)
{
TrUIUtils._getElemLoc=function(a8)
{
var a10=a8.ownerDocument;
var a11=a10.getBoxObjectFor(a8);
var a12={x:a11.screenX,y:a11.screenY};
a11=a10.getBoxObjectFor(a10.documentElement);
a12.x-=a11.screenX;
a12.y-=a11.screenY;
return a12;
}
}
else if(_agent.isIE)
{
TrUIUtils._getElemLoc=function(a8)
{
var a10=a8.ownerDocument;
var a13=a8.getBoundingClientRect();
var a12={x:a13.left,y:a13.top};
var a14=a10.documentElement;
var a15=a14.scrollLeft;
var a16=a14["dir"]=="rtl";
if(a16)
{
a15+=a14.clientWidth-a14.scrollWidth;
}
a12.x-=a14.clientLeft-a15;
a12.y-=(a14.clientTop-a14.scrollTop);
return a12;
}
}
else
{
TrUIUtils._getElemLoc=function(a8)
{
var a17=a8.ownerDocument.contentWindow;
var a18=0;
var a19=0;
for(var a20=a8;a20&&a20!=a17;a20=a20.offsetParent)
{
a18+=a20.offsetLeft;
a19+=a20.offsetTop;
}
return{x:a18,y:a19};
}
}
}
return TrUIUtils._getElemLoc(a8);
}
TrUIUtils._cssToJs=function(a21)
{
var a22='';
var a23=false;
for(var a24=0;a24<a21.length;a24++)
{
if(a21.charAt(a24)=='-')
{
a23=true;
continue;
}
if(a23)
{
a22+=a21.charAt(a24).toUpperCase();
}
else
{
a22+=a21.charAt(a24);
}
a23=false;
}
return a22;
}
TrUIUtils._getStyle=function(a25,a26)
{
if(a25.currentStyle)
{
var a27=this._cssToJs(a26);
return a25.currentStyle[a27];
}
else if(window.getComputedStyle)
{
return document.defaultView.getComputedStyle(a25,'')
.getPropertyValue(a26);
}
return'';
}

var ADFDialogReturn=new Array();
function _launchDialog(
a0,
a1,
a2,
a3,
a4,
a5)
{
var a6=self;
var a7;
if(a5)
{
a7=function()
{
a6._submitPartialChange(a3,0,{rtrn:a4});
};
}
else
{
a7=function()
{
a6.submitForm(a3,0,{rtrn:a4});
};
}
var a8=ADFDialogReturn.length;
ADFDialogReturn[a8]=a7;
a0=a0+"&_rtrnId="+a8;
openWindow(window,a0,a1,a2,1);
}
function openWindow(
a0,
a1,
a2,
a3,
a4,
a5,
a6
)
{
if(a0)
{
if(a4==(void 0))
a4=false;
if(!a5)
{
a5=(a4)?"dialog":"document";
}
if(!a2)
a2="_blank";
var a7=_featureDefaults[a5];
if(a7==(void 0))
{
a5="document";
a7=_featureDefaults[a5];
}
var a8=(a4)
?_modalFeatureOverrides
:_modelessFeatureOverrides;
var a9=(_agent.isIE)
?_ieFeatures
:_nnFeatures;
var a10=null;
if(a3)
{
a10=new Object();
for(var a11 in a3)
{
a10[a11]=a3[a11];
}
}
var a12="";
for(var a13 in a9)
{
var a14=a8[a13];
if(a14==(void 0))
{
if(a10)
{
a14=a10[a13];
delete a10[a13];
}
if(a14==(void 0))
a14=a7[a13];
}
if(a14!=(void 0))
{
var a15=_booleanFeatures[a13]!=(void 0);
if(a14||!a15)
{
a12+=a13;
if(!a15)
{
a12+="="+a14;
}
a12+=",";
}
}
}
for(var a11 in a10)
{
a12+=a11;
if(a10[a11])
a12+="="+a10[a11];
a12+=",";
}
if(a12.length!=0)
{
a12=a12.substring(0,a12.length-1);
}
if(a6)
{
_setDependent(a0,a2,a6);
}
var a16=a0.open(a1,a2,a12);
var a17=false;
if(a16!=null)
{
var a18=0;
try
{
for(p in a16)
{
a18++;
break;
}
if(a18>0)
a17=true;
}
catch(e)
{
}
}
if(!a17)
{
_setDependent(a0,a2,(void 0));
if(_AdfWindowOpenError!=null)
alert(_AdfWindowOpenError);
return;
}
var a19=_agent.atMost("ie",4.99);
var a20=false;
var a21=a0.document;
var a22=a21.body;
if(a4&&!a19)
{
if(_agent.atLeast("ie",4))
{
var a23=a21.getElementById("_trDialogDimmer");
if(a23==null)
{
a23=a21.createElement("div");
a23.id="_trDialogDimmer";
var a24=a23.style;
a24.position="absolute";
a24.zIndex="32000";
a24.backgroundColor="#FFFFFF";
a24.filter="alpha(opacity=50)";
var a25=a21.documentElement;
var a26=Math.max(a25.offsetWidth,a25.scrollWidth);
var a27=Math.max(a25.offsetHeight,a25.scrollHeight);
a24.width=a26+"px";
a24.height=a27+"px";
a24.top="0px";
a24.left="0px";
a22.appendChild(a23);
a20=true;
}
}
if(_agent.isGecko)
{
if(a22!=(void 0))
_addModalCaptureGecko(a22);
}
a0.onfocus=_onModalFocus;
}
if(a4&&(_agent.atLeast("ie",5)&&_agent.isWindows))
{
_addModalCaptureIE(a22);
a22.onlosecapture=_onModalLoseCapture;
var a28=(a1!=null&&a1.indexOf(':')!=-1);
if(!a28)
{
var a29=new Function("e","_removeModalCaptureIE(window.document.body)");
a16.attachEvent("onunload",a29);
}
}
if(a4&&!a19)
{
_setDependent(a0,"modalWindow",a16);
}
if(a4&&self._pollManager)
{
_pollManager.deactivateAll();
_pollWhenModalDependentCloses();
}
a16.focus();
if(a20)
{
a0.setTimeout("_clearBodyModalEffects('alpha')",1000);
}
return a16;
}
else
{
return null;
}
}
function _pollWhenModalDependentCloses()
{
if(!_getValidModalDependent(self))
{
_pollManager.reactivateAll();
}
else
{
self.setTimeout("_pollWhenModalDependentCloses()",1000);
}
}
function _onModalLoseCapture()
{
var a0=_getValidModalDependent(self);
if(a0)
{
window.setTimeout("_onModalFocus()",1);
}
}
function _onModalFocus()
{
var a0=self.document.body;
var a1=_getModalDependent(self);
var a2=_agent.atLeast("ie",5)&&_agent.isWindows;
if(a1&&!a1.closed)
{
a1.focus();
if(a2)
{
a0.setCapture();
}
}
else
{
if(a2)
{
a0.onlosecapture=null;
_removeModalCaptureIE(a0);
}
}
}
function _clearBodyModalEffects(a0)
{
if(_getValidModalDependent(self)!=null)
{
self.setTimeout("_clearBodyModalEffects('"+a0+"')",1000);
}
else
{
if(a0=='alpha')
{
var a1=self.document;
var a2=a1.getElementById("_trDialogDimmer");
if(a2!=null)
{
a1.body.removeChild(a2);
}
}
}
}
function _getValidModalDependent(
a0
)
{
var a1=_getModalDependent(a0);
if(a1)
{
if(a1.closed)
{
_setDependent(a0,"modalWindow",(void 0));
a1=(void 0);
}
}
return a1;
}
function _sizeWin(
a0,
a1,
a2,
a3
)
{
var a4=_agent.isGecko;
var a5=_agent.isIE;
var a6=_agent.isSafari;
var a7=(a4||a6);
if(!(a7||(a5&&_agent.isWindows)))
return;
var a8=a0.document.body;
if(a8)
{
var a9=(!a5&&(a8.scrollWidth>a8.clientWidth))
?a8.scrollWidth
:_getBodyWidth(a8,a8.offsetWidth,a8.offsetLeft);
var a10=0;
var a11=a8.style;
if(!a11.height||a11.height.length==0)
{
a11.height="auto";
}
if(a7)
{
a10=a8.offsetHeight+(window.outerHeight-window.innerHeight);
a10+=30;
if(window.outerWidth>a8.offsetWidth)
a9+=(window.outerWidth-a8.offsetWidth);
}
else
{
a10=a8.scrollHeight+(a8.offsetHeight-a8.clientHeight);
a10+=21;
a9+=a8.offsetWidth-a8.clientWidth+16;
a10+=parseInt(a8.topMargin)+parseInt(a8.bottomMargin);
a9+=parseInt(a8.leftMargin)+parseInt(a8.rightMargin);
}
if(a1)
a9+=a1;
if(a2)
a10+=a2;
if(a3!=(void 0))
{
if(a3['W'])
{
var a12=0+a3['W'];
if(a9<a12)
a9=a12;
}
if(a3['H'])
{
var a13=0+a3['H'];
if(a10<a13)
a10=a13;
}
}
var a14=_getTop(a0);
var a15=a5?0:a14.screen.availLeft;
var a16=a5?0:a14.screen.availTop;
var a17=a14.screen.availHeight*0.95;
var a18=a14.screen.availWidth*0.95;
if(a10>a17)
a10=a17;
if(a9>a18)
a9=a18;
a14.resizeTo(a9,a10);
var a19=a5?a14.screenLeft:a14.screenX;
var a20=a5?a14.screenTop:a14.screenY;
var a21=false;
if((a19+a9)>(a15+a18))
{
a19=(a14.screen.availWidth-a9)/2;
a21=true;
}
if((a20+a10)>(a16+a17))
{
a20=(a14.screen.availHeight-a10)/2;
a21=true;
}
if(a21)
{
a14.moveTo(a19,a20);
}
}
}

function _tableSort(
a0,
a1,
a2,
a3,
a4)
{
_submitPartialChange(a0,a1,
{event:'sort',
source:a2,
value:a3,
state:a4});
return false;
}
function CollectionComponent(
a0,
a1
)
{
this._formName=a0;
this._name=a1;
}
CollectionComponent.prototype.getFormName=function()
{
return this._formName;
};
CollectionComponent.prototype.getName=function()
{
return this._name;
};
CollectionComponent.prototype.getFormElement=function(a2)
{
var a3=document.forms[this.getFormName()];
var a4=this.getName()+":"+a2;
var a5=a3[a4];
return a5;
};
CollectionComponent.defineSubmit=function(a6,a7)
{
if(this._eventParam!=(void 0))
return;
CollectionComponent.prototype._eventParam=a6;
CollectionComponent.prototype._sourceParam=a7;
CollectionComponent.prototype._pTargetsParam="partialTargets";
CollectionComponent.prototype.addParam=function(paramName,paramValue){
if(this._params==(void 0))
{
this._params=new Object();
}
this._params[paramName]=paramValue;
}
CollectionComponent.prototype.submit=function(event,link){
this.addParam(this._eventParam,event);
this.addParam(this._sourceParam,this.getName());
var a8=this._params;
var a9=a8[this._pTargetsParam];
if(link!=(void 0))
{
var a10=link.id;
if(a10!=(void 0))
{
_setRequestedFocusNode(document,a10,false,window);
}
if(a9==(void 0))
{
a9=this.getName();
a8[this._pTargetsParam]=a9;
}
}
var a11=this._validate;
if(a11==(void 0))
a11=1;
var a12=submitForm;
if(a9!=(void 0))
{
a12=_submitPartialChange;
}
a12(this.getFormName(),a11,a8);
return false;
};
};
CollectionComponent.defineMultiSelect=function(a13,a14,a15)
{
if(this._selectedKey!=(void 0))
return;
CollectionComponent.prototype._selectedKey=a13;
CollectionComponent.prototype._selectedModeKey=a14;
CollectionComponent.prototype.getLength=function(){
var a16=this._getBoxes();
return a16.length;
};
CollectionComponent.prototype.multiSelect=function(selectAll){
var a16=this._getBoxes();
for(var a17=0;a17<a16.length;a17++)
{
var a18=a16[a17];
a18.checked=selectAll;
}
var a19=this.getFormElement(this._selectedModeKey);
if(selectAll)
{
a19.value="all";
}
else
{
a19.value="none";
}
if(a15)
{
_submitPartialChange(this.getFormName(),1,null);
}
};
CollectionComponent.prototype._getBoxes=function(){
var a16=this.getFormElement(this._selectedKey);
if(a16.length==(void 0))
{
var a20=new Array(1);
a20[0]=a16;
a16=a20;
}
return a16;
};
};
CollectionComponent.defineTree=
function(a21,
a22,
a23,
a24,
a25,
a26,
a27)
{
if(this._pathParam!=(void 0))
return;
CollectionComponent.defineSubmit(a21,a22);
CollectionComponent.prototype._pathParam=a23;
CollectionComponent.prototype._startParam=a24;
CollectionComponent.prototype._gotoEvent=a25;
CollectionComponent.prototype._focusEvent=a26;
CollectionComponent.prototype._validate=a27;
CollectionComponent.prototype.action=function(event,path,link)
{
this.addParam(this._pathParam,path);
return this.submit(event,link);
};
CollectionComponent.prototype.range=function(path,start)
{
this.addParam(this._startParam,start);
return this.action(this._gotoEvent,path);
};
CollectionComponent.prototype.focus=function(path,link)
{
return this.action(this._focusEvent,path,link);
};
};

function _TrPollManager()
{
this.pollIdList;
this.active=true;
}
_TrPollManager.prototype.addAndActivate=function(a0,a1,a2)
{
if(!this.pollIdList)
this.pollIdList=new Array();
this[a0]=new _TrPollCommand(a1,a2,this.active);
idIndex=-1;
for(var a3=0;a3<this.pollIdList.length;a3++)
{
if(a0==this.pollIdList[a3])
{
idIndex=a3;
break;
}
}
if(idIndex!=-1)
{
this.pollIdList[idIndex]==a0;
}
else
{
this.pollIdList.push(a0);
}
}
_TrPollManager.prototype.deactivateAll=function()
{
for(var a4=0;a4<this.pollIdList.length;a4++)
{
clearTimeout(this[this.pollIdList[a4]].commandId);
}
this.active=false;
}
_TrPollManager.prototype.reactivateAll=function()
{
for(var a5=0;a5<this.pollIdList.length;a5++)
{
this[this.pollIdList[a5]].activate();
}
this.active=true;
}
function _TrPollCommand(a0,a1,a2)
{
this.commandString=a0;
this.timeout=a1;
if(a2)
this.activate();
}
_TrPollCommand.prototype.activate=function()
{
this.commandId=setTimeout(this.commandString,this.timeout);
}

var _cfBus=new Object();
var _cfTransIconURL;
var _cfOpaqueIconURL;
var _cfBgColor;
function _cfsw(
a0)
{
var a1=_getColorFieldFormat(a0);
var a2=a0.name+"$sw";
var a3=null;
var a4=_getElementById(document,a2);
if(a4!=null)
{
var a5=false;
if(a0.value!="")
{
try
{
a3=a1.getAsObject(a0.value);
}
catch(e)
{
}
}
if(a3!=null)
{
if(a3.alpha==0)
{
a4.style.backgroundColor=null;
a4.src=_cfTransIconURL;
a4.alt=_cfTrans;
}
else
{
a4.style.backgroundColor=
new TrColorConverter("#RRGGBB").getAsString(a3);
a4.src=_cfOpaqueIconURL;
a4.alt=a1.getAsString(a3);
}
}
else
{
a4.style.backgroundColor=_cfBgColor;
a4.src=_cfOpaqueIconURL;
a4.alt=null;
}
if(_agent.isGecko)
a4.title=a4.alt;
}
}
function _returnColorPickerValue(
a0,
a1
)
{
var a2=a0.returnValue;
var a3=a0._colorField;
if(a3==null)
{
a3=_savedColorField1879034;
}
if(a0.isApplicable)
_cfUpdate(a3,a2);
}
function _cfbs(
a0)
{
_cfUpdate(_cfBus[a0.source],a0.params.value);
}
function _cfUpdate(
a0,
a1)
{
if(a0!=null)
{
var a2=_getColorFieldFormat(a0);
var a3=(a0.type!='hidden');
var a4=a0.value;
var a5=a2.getAsString(a1);
if(a5==_cfTrans&&!a2._allowsTransparent)
return;
if(a5==null)
a5="";
if(a5!=a0.value)
{
if(a0.onchange!=null)
{
if(_agent.isIE)
{
a0.onpropertychange=function()
{
var a6=window.event;
if(a6.propertyName=='value')
{
a0.onpropertychange=function(){};
_cfsw(a0);
a0.onchange(a6);
}
}
a0.value=a5;
}
else
{
a0.value=a5;
if(!_agent.isNav)
_cfsw(a0);
var a6=new Object();
a6.type='change';
a6.target=a0;
a0.onchange(a6);
}
}
else
{
a0.value=a5;
if(!_agent.isNav)
_cfsw(a0);
}
}
if(a3)
{
a0.select();
a0.focus();
}
}
}
function _lcp(
a0,
a1,
a2
)
{
var a3=document.forms[a0][a1];
if(!a2)
{
a2=_jspDir+_getQuerySeparator(_jspDir)+"_t=fred&_red=cp";
}
else
{
var a4=a2.lastIndexOf('?');
var a5="";
if(a4==-1)
{
a4=a2.length;
}
else
{
a5=a2.substr(a4+1);
}
var a6=_jspDir+_getQuerySeparator(_jspDir);
a6+=a5;
a6+=_getQuerySeparator(a6);
a6+="_t=fred";
var a7=a2.substring(0,a4);
a2=a6;
a2+="&redirect="+escape(a7);
}
var a8=_cfs[a1];
var a9="#RRGGBB"
if(a8!=null)
{
a2+="&pattern=";
if(typeof a8=="string")
{
a9=a8;
a2+=escape(a9);
}
else
{
a9=a8[0];
a2+=escape(a8.join(" "));
}
}
if(a3.value!="")
{
var a10=_getColorFieldFormat(a3);
try
{
var a11=a10.getAsObject(a3.value);
if(a11!=null)
{
a2+="&value=";
if(a11.alpha==0)
a2+=escape(_cfTrans);
else
a2+=escape(new TrColorConverter(a9).getAsString(a11));
}
}
catch(e)
{
}
}
var a12=_cfts[a1];
if(a12!=null)
{
a2+="&allowsTransparent="+a12;
}
a2+="&loc="+_locale;
if(window["_enc"])
{
a2+="&enc="+_enc;
}
var a13=openWindow(self,
a2,
'colorDialog',
{width:430,height:230},
true,
null,
_returnColorPickerValue);
a13._colorField=a3;
_savedColorField1879034=a3;
}
var _savedColorField1879034;

function _getColorFieldFormat(
a0)
{
var a1=a0.name;
if(a1&&_cfs)
{
var a2=_cfs[a1];
var a3=_cfts[a1];
if(a2||a3)
return new TrColorConverter(a2,a3);
}
return new TrColorConverter();
}
function _fixCFF(
a0)
{
var a1=_getColorFieldFormat(a0);
if(a0.value!="")
{
try
{
var a2=a1.getAsObject(a0.value);
if(a2!=null)
a0.value=a1.getAsString(a2);
}
catch(e)
{
}
}
}

function TrColorConverter(
a0,
a1,
a2,
a3)
{
this._class="TrColorConverter";
this._allowsTransparent=a1;
this._patternsString=a2;
this._messages=a3;
if(a0!=null)
{
if(typeof(a0)=="string")
a0=[a0];
}
this._pattern=a0;
}
TrColorConverter.prototype=new TrConverter();
TrColorConverter.prototype.getFormatHint=function()
{
if(this._messages&&this._messages["hint"])
{
return TrMessageFactory.createCustomMessage(
this._messages["hint"],
this._pattern);
}
else
{
return TrMessageFactory.createMessage(
"org.apache.myfaces.trinidad.convert.ColorConverter.FORMAT_HINT",
this._pattern);
}
}
TrColorConverter.prototype.getAsString=function(
a4)
{
if(a4==null)
return null;
if(a4.alpha==0)
return _cfTrans;
var a5=new Object();
a5.value="";
var a6=this._pattern;
if(typeof a6!="string")
a6=a6[0];
_cfoDoClumping(a6,
_cfoSubformat,
a4,
a5);
return a5.value;
}
TrColorConverter.prototype.getAsObject=function(
a7,
a8)
{
if(a7==null)
return null;
a7=TrUIUtils.trim(a7);
if(a7.length==0)
return null
if(this._allowsTransparent&&_cfTrans==a7)
return new TrColor(0,0,0,0);
var a9;
var a10="org.apache.myfaces.trinidad.convert.ColorConverter.CONVERT";
if(this._messages&&this._messages["detail"])
{
a9=_createCustomFacesMessage(
TrMessageFactory.getSummaryString(a10),
this._messages["detail"],
a8,
a7,
this._patternsString);
}
else
{
a9=_createFacesMessage(a10,
a8,
a7,
this._patternsString);
}
var a11=this._pattern;
if(typeof a11=="string")
{
return this._rgbColorParseImpl(a7,
a11,
a9);
}
else
{
var a12;
for(a12=0;a12<a11.length;a12++)
{
try{
var a13=this._rgbColorParseImpl(a7,
a11[a12],
a9);
return a13;
}
catch(e)
{
if(a12==a11.length-1)
throw e;
}
}
}
}
TrColorConverter.prototype._rgbColorParseImpl=function(
a14,
a15,
a16)
{
var a17=new Object();
a17.currIndex=0;
a17.parseString=a14;
a17.parseException=new TrConverterException(a16);
var a18=new TrColor(0x00,0x00,0x00);
if(_cfoDoClumping(a15,
_cfoSubParse,
a17,
a18))
{
if(a14.length!=a17.currIndex)
{
throw a17.parseException;
}
return a18;
}
else
{
throw a17.parseException;
}
}
function TrColor(
a0,
a1,
a2,
a3)
{
this._class="TrColor";
if(a3==null)
a3=0xff;
this.red=(a0&0xff);
this.green=(a1&0xff);
this.blue=(a2&0xff);
this.alpha=(a3&0xff);
}
TrColor.prototype.toString=function()
{
return"rgba("+this.red+
","+this.green+
","+this.blue+
","+this.alpha+")";
}
var _cfTrans;
function _cfoDoClumping(
a0,
a1,
a2,
a3
)
{
var a4=a0.length;
var a5=false;
var a6=0;
var a7=null;
var a8=0;
for(var a9=0;a9<a4;a9++)
{
var a10=a0.charAt(a9);
if(a5)
{
if(a10=="\'")
{
a5=false;
if(a6!=1)
{
a8++;
a6--;
}
if(!a1(a0,
"\'",
a8,
a6,
a2,
a3))
{
return false;
}
a6=0;
a7=null;
}
else
{
a6++;
}
}
else
{
if(a10!=a7)
{
if(a6!=0)
{
if(!a1(a0,
a7,
a8,
a6,
a2,
a3))
{
return false;
}
a6=0;
a7=null;
}
if(a10=='\'')
{
a5=true;
}
a8=a9;
a7=a10;
}
a6++;
}
}
if(a6!=0)
{
if(!a1(a0,
a7,
a8,
a6,
a2,
a3))
{
return false;
}
}
return true;
}
function _cfoSubformat(
a0,
a1,
a2,
a3,
a4,
a5
)
{
var a6=null;
if((a1>='A')&&(a1<='Z')||
(a1>='a')&&(a1<='z'))
{
switch(a1)
{
case'r':
a6=_cfoGetPaddedNumber(a4.red,a3,3,10);
break;
case'g':
a6=_cfoGetPaddedNumber(a4.green,a3,3,10);
break;
case'b':
a6=_cfoGetPaddedNumber(a4.blue,a3,3,10);
break;
case'a':
a6=_cfoGetPaddedNumber(a4.alpha,a3,3,10);
break;
case'R':
a6=
_cfoGetPaddedNumber(a4.red,a3,2,16).toUpperCase();
break;
case'G':
a6=
_cfoGetPaddedNumber(a4.green,a3,2,16).toUpperCase();
break;
case'B':
a6=
_cfoGetPaddedNumber(a4.blue,a3,2,16).toUpperCase();
break;
case'A':
a6=
_cfoGetPaddedNumber(a4.alpha,a3,2,16).toUpperCase();
break;
default:
a6="";
}
}
else
{
a6=a0.substring(a2,a2+a3);
}
a5.value+=a6;
return true;
}
function _cfoSubParse(
a0,
a1,
a2,
a3,
a4,
a5
)
{
var a6=a4.currIndex;
if((a1>='A')&&(a1<='Z')||
(a1>='a')&&(a1<='z'))
{
switch(a1)
{
case'r':
a5.red=_cfoAccumulateNumber(a4,a3,3,10);
if(a5.red==null)
{
return false;
}
break;
case'g':
a5.green=_cfoAccumulateNumber(a4,a3,3,10);
if(a5.green==null)
{
return false;
}
break;
case'b':
a5.blue=_cfoAccumulateNumber(a4,a3,3,10);
if(a5.blue==null)
{
return false;
}
break;
case'a':
a5.alpha=_cfoAccumulateNumber(a4,a3,3,10);
if(a5.alpha==null)
{
return false;
}
break;
case'R':
a5.red=_cfoAccumulateNumber(a4,a3,2,16);
if(a5.red==null)
{
return false;
}
break;
case'G':
a5.green=_cfoAccumulateNumber(a4,a3,2,16);
if(a5.green==null)
{
return false;
}
break;
case'B':
a5.blue=_cfoAccumulateNumber(a4,a3,2,16);
if(a5.blue==null)
{
return false;
}
break;
case'A':
a5.alpha=_cfoAccumulateNumber(a4,a3,2,16);
if(a5.alpha==null)
{
return false;
}
break;
default:
}
}
else
{
return _cfoMatchText(a4,
a0.substring(a2,a2+a3));
}
return true;
}
function _cfoMatchText(
a0,
a1
)
{
if(!a1)
return false;
var a2=a1.length;
var a3=a0.currIndex;
var a4=a0.parseString;
if(a2>a4.length-a3)
{
return false;
}
var a5=a4.substring(a3,a3+a2);
if(a5!=a1)
return false;
a0.currIndex+=a2;
return true;
}
function _cfoAccumulateNumber(
a0,
a1,
a2,
a3)
{
var a4=a0.currIndex;
var a5=a4;
var a6=a0.parseString;
var a7=a6.length;
if(a7>a5+a2)
a7=a5+a2;
var a8=0;
while(a5<a7)
{
var a9=parseInt(a6.charAt(a5),a3);
if(!isNaN(a9))
{
a8*=a3;
a8+=a9;
a5++;
}
else
{
break;
}
}
if(a4!=a5&&
(a5-a4)>=a1)
{
a0.currIndex=a5;
return a8;
}
else
{
return null;
}
}
function _cfoGetPaddedNumber(
a0,
a1,
a2,
a3)
{
var a4=a0.toString(a3);
if(a1!=null)
{
var a5=a1-a4.length;
while(a5>0)
{
a4="0"+a4;
a5--;
}
}
if(a2!=null)
{
var a6=a4.length-a2;
if(a6>0)
{
a4=a4.substring(a6,
a6+a2);
}
}
return a4;
}

var _shuttle_no_name="You must supply the shuttle's name to create a proxy";
var _shuttle_no_form_name_provided="A form name must be provided";
var _shuttle_no_form_available="This shuttle is not in a form";
function TrShuttleProxy(
a0,
a1
)
{
if(a0==(void 0))
{
alert(_shuttle_no_name);
this.shuttleName="";
this.formName="";
return;
}
this.shuttleName=a0;
this.formName="";
if(a1==(void 0))
{
var a2=document.forms.length;
var a3=a0+":leading";
for(var a4=0;a4<a2;a4++)
{
if(document.forms[a4][a3]!=(void 0))
{
this.formName=_getFormName(document.forms[a4]);
break;
}
}
if(this.formName=="")
{
alert(shuttle_no_form_available);
return;
}
}
else
{
this.formName=a1;
}
}
TrShuttleProxy.prototype.getItems=function(
a5
)
{
if(a5==(void 0))
{
a5=true;
}
var a6=TrShuttleProxy._getListName(this.shuttleName,a5);
var a7=document.forms[this.formName].elements[a6];
var a8=new Array();
for(var a9=0;a9<a7.length-1;a9++)
{
a8[a9]=a7.options[a9];
}
return a8;
};
TrShuttleProxy.prototype.getSelectedItems=function(
a10
)
{
if(a10==(void 0))
{
a10=true;
}
var a11=TrShuttleProxy._getListName(this.shuttleName,a10);
var a12=document.forms[this.formName].elements[a11];
var a13=new Array();
var a14=0;
for(var a15=0;a15<a12.length-1;a15++)
{
if(a12.options[a15].selected)
{
a13[a14]=a12.options[a15];
a14++;
}
}
return a13;
};
TrShuttleProxy.prototype.getItemCount=function(
a16
)
{
if(a16==(void 0))
{
a16=true;
}
var a17=TrShuttleProxy._getListName(this.shuttleName,a16);
return document.forms[this.formName].elements[a17].length-1;
};
TrShuttleProxy.prototype.getSelectedItemCount=function(
a18
)
{
if(a18==(void 0))
{
a18=true;
}
var a19=TrShuttleProxy._getListName(this.shuttleName,a18);
var a20=document.forms[this.formName].elements[a19];
var a21=0;
for(var a22=0;a22<a20.length-1;a22++)
{
if(a20.options[a22].selected)
{
a21++;
}
}
return a21;
};
TrShuttleProxy.prototype.addItem=function(
a23,
a24,
a25,
a26,
a27
)
{
if(a26==(void 0))
{
a26="";
}
if(a25==(void 0))
{
a25="";
}
if(a27==(void 0))
{
a27="";
}
if(a23==(void 0))
{
a23=true;
}
var a28=TrShuttleProxy._getListName(this.shuttleName,a23);
if(a24==(void 0))
{
a24=document.forms[this.formName].elements[a28].length-1;
}
if(a24<0)
{
a24=0;
}
if(a24>document.forms[this.formName].elements[a28].length-1)
{
a24=document.forms[this.formName].elements[a28].length-1;
}
var a29=document.forms[this.formName].elements[a28];
a29.options[a29.length]=
new Option(a29.options[a29.length-1].text,
a29.options[a29.length-1].value,
false,
false);
for(var a30=a29.length-1;a30>a24;a30--)
{
a29.options[a30].text=a29.options[a30-1].text;
a29.options[a30].value=a29.options[a30-1].value;
a29.options[a30].selected=a29.options[a30-1].selected;
}
a29.options[a24].text=a25;
a29.options[a24].value=a26;
a29.options[a24].selected=false;
var a31=TrShuttleProxy._getDescArray(a28);
TrShuttleProxy._addDescAtIndex(a31,a27,a24);
TrShuttleProxy._makeList(this.formName,a28);
};
TrShuttleProxy.prototype.deleteItemByValue=function(
a32,
a33
)
{
if(a33==(void 0))
{
return;
}
var a34=TrShuttleProxy._getListName(this.shuttleName,a32);
var a35=document.forms[this.formName].elements[a34];
for(var a36=0;a36<a35.length-1;a36++)
{
var a37=a35.options[a36].value;
if(a37==a33)
{
var a38=TrShuttleProxy._getDescArray(a34);
TrShuttleProxy._deleteDescAtIndex(a38,a36);
TrShuttleProxy._clearDescAreas(this.formName,a34);
a35.options[a36]=null;
TrShuttleProxy._makeList(this.formName,a34);
return;
}
}
};
TrShuttleProxy.prototype.deleteSelectedItems=function(
a39
)
{
if(a39==(void 0))
{
a39=true;
}
var a40=TrShuttleProxy._getListName(this.shuttleName,a39);
var a41=document.forms[this.formName].elements[a40];
var a42=TrShuttleProxy._getSelectedIndexes(this.formName,a40);
for(var a43=a42.length;a43>=0;a43--)
{
a41.options[a42[a43]]=null;
}
var a44=TrShuttleProxy._getDescArray(a40);
TrShuttleProxy._deleteDescAtIndexes(a44,a42);
TrShuttleProxy._clearDescAreas(this.formName,a40);
TrShuttleProxy._makeList(this.formName,a40);
};
TrShuttleProxy.prototype.move=function(
a45,
a46
)
{
if(a46==(void 0))
{
a46=false;
}
if(a45==(void 0))
{
a45=true;
}
var a47=TrShuttleProxy._getListName(this.shuttleName,a45);
var a48=TrShuttleProxy._getListName(this.shuttleName,!a45);
if(a46)
{
TrShuttleProxy._moveAllItems(a47,a48,this.formName);
}
else
{
TrShuttleProxy._moveItems(a47,a48,this.formName);
}
};
TrShuttleProxy.prototype.reorderList=function(
a49,
a50,
a51
)
{
if(a51==(void 0))
{
a51=true;
}
if(a50==(void 0))
{
a50=false;
}
if(a49==(void 0))
{
a49=false;
}
var a52=TrShuttleProxy._getListName(this.shuttleName,a51);
if(!a50)
{
TrShuttleProxy._orderList(a49,a52,this.formName);
}
else
{
TrShuttleProxy._orderTopBottomList(a49,a52,this.formName);
}
};
TrShuttleProxy.prototype.reset=function()
{
TrShuttleProxy._resetItems(this.shuttleName,this.formName);
};
TrShuttleProxy._remove=function(a53,a54,a55)
{
var a56=a53.length;
if(a55>a56)
return;
for(var a57=a54;a57<a56;a57++)
{
if(a57<a56-a55)
a53[a57]=a53[a57+a55];
else
a53[a57]=void 0;
}
a53.length=a56-a55;
}
TrShuttleProxy._displayDesc=function(
a58,
a59
)
{
if(a59==(void 0))
{
alert(_shuttle_no_form_name_provided);
return;
}
if(a59.length==0)
{
alert(shuttle_no_form_available);
return;
}
var a60=document.forms[a59].elements[a58+':desc'];
if(a60==void(0))
{
return;
}
var a61=TrShuttleProxy._getDescArray(a58);
if(a61==(void 0)||a61.length==0)
{
return;
}
var a62=TrShuttleProxy._getSelectedIndexes(a59,a58);
if(a62.length==0)
{
a60.value="";
TrShuttleProxy._setSelected(a58,a62);
return;
}
var a63=TrShuttleProxy._getSelectedDesc(a58,a61,a62);
a60.value=a63;
TrShuttleProxy._setSelected(a58,a62);
}
TrShuttleProxy._getDescArray=function
(
a64
)
{
var a65=window[a64.replace(/:/g,'_')+'_desc'];
return a65;
}
TrShuttleProxy._getSelectedDesc=function
(
a66,
a67,
a68
)
{
var a69=TrShuttleProxy._getSelectedArray(a66);
if(a68.length==1)
return a67[a68[0]];
if(a68.length-a69.length!=1)
return"";
for(var a70=0;a70<a68.length;a70++)
{
if(a70>=a69.length||a69[a70]!=a68[a70])
return a67[a68[a70]];
}
return"";
}
TrShuttleProxy._getSelectedArray=function
(
a71
)
{
var a72=window[a71.replace(/:/g,'_')+'_sel'];
return a72;
}
TrShuttleProxy._setSelected=function
(
a73,
a74
)
{
var a75=TrShuttleProxy._getSelectedArray(a73);
if(a75!=(void 0))
{
var a76=a75.length;
TrShuttleProxy._remove(a75,0,a76);
for(var a77=0;a77<a74.length;a77++)
{
a75[a77]=a74[a77];
}
}
}
TrShuttleProxy._addDescAtIndex=function
(
a78,
a79,
a80
)
{
if(a78!=(void 0))
{
var a81=a78.length;
for(var a82=a81-1;a82>=a80;a82--)
{
a78[a82+1]=a78[a82];
}
a78[a80]=a79;
a78.length=a81+1;
}
}
TrShuttleProxy._deleteDescAtIndex=function
(
a83,
a84
)
{
if(a83!=(void 0))
TrShuttleProxy._remove(a83,a84,1);
}
TrShuttleProxy._deleteDescAtIndexes=function
(
a85,
a86
)
{
if(a85!=(void 0))
{
for(var a87=a86.length-1;a87>=0;a87--)
{
TrShuttleProxy._remove(a85,a86[a87],1);
}
}
}
TrShuttleProxy._clearDescAreas=function(
a88,
a89,
a90
)
{
var a91=document.forms[a88].elements[a89+':desc'];
var a92=document.forms[a88].elements[a90+':desc'];
if(a91!=void(0))
{
a91.value="";
}
if(a92!=void(0))
{
a92.value="";
}
}
TrShuttleProxy._moveItems=function(
a93,
a94,
a95
)
{
if(a95==(void 0))
{
a95=TrShuttleProxy._findFormNameContaining(a93);
}
if(a95.length==0)
{
alert(shuttle_no_form_available);
return;
}
var a96=document.forms[a95].elements[a93];
var a97=document.forms[a95].elements[a94];
if(a96==(void 0)||a97==(void 0))
return;
var a98=TrShuttleProxy._getSelectedIndexes(a95,a93);
if(a98.length==0)
{
if(_shuttle_no_items_selected.length>0)
alert(_shuttle_no_items_selected);
return;
}
var a99=TrShuttleProxy._getDescArray(a93);
var a100=TrShuttleProxy._getDescArray(a94);
a97.selectedIndex=-1;
var a101=a97.length-1;
var a102=a97.options[a101].text;
for(var a103=0;a103<a98.length;a103++)
{
var a104=a96.options[a98[a103]].text;
var a105=a96.options[a98[a103]].value;
if(a103==0)
{
a97.options[a101].text=a104;
a97.options[a101].value=a105;
}
else
{
a97.options[a101]=new Option(a104,a105,false,false);
}
if(a100!=(void 0)&&a99!=(void 0))
a100[a101]=a99[a98[a103]];
a97.options[a101].selected=true;
a101++;
}
a97.options[a101]=new Option(a102,"",false,false);
a97.options[a101].selected=false;
for(var a103=a98.length-1;a103>=0;a103--)
{
if(a99!=(void 0))
TrShuttleProxy._remove(a99,a98[a103],1);
a96.options[a98[a103]]=null;
}
a96.selectedIndex=-1;
TrShuttleProxy._clearDescAreas(a95,a93);
TrShuttleProxy._displayDesc(a94,a95);
TrShuttleProxy._makeList(a95,a93);
TrShuttleProxy._makeList(a95,a94);
}
TrShuttleProxy._moveAllItems=function(
a106,
a107,
a108
)
{
if(a108==(void 0))
{
a108=TrShuttleProxy._findFormNameContaining(a106);
}
var a109=document.forms[a108].elements[a106];
var a110=document.forms[a108].elements[a107];
var a111=
a110.options[document.forms[a108].elements[a107].length-1].text
var a112=a110.length-1;
var a113=TrShuttleProxy._getDescArray(a106);
var a114=TrShuttleProxy._getDescArray(a107);
if(a109.length>1)
{
var a115=a109.length
for(var a116=0;a116<a115-1;a116++)
{
var a117=a109.options[0].text;
var a118=a109.options[0].value;
a109.options[0]=null;
if(a116==0)
{
a110.options[a112].text=a117;
a110.options[a112].value=a118;
}
else
{
a110.options[a112]=new Option(a117,a118,false,false);
}
if(a114!=(void 0)&&a113!=(void 0))
a114[a112]=a113[a116];
a112++;
}
a110.options[a112]=new Option(a111,"",false,false);
a110.options[a112].selected=false;
if(a113!=(void 0))
{
var a119=a113.length;
TrShuttleProxy._remove(a113,0,a119);
}
a109.selectedIndex=-1;
a110.selectedIndex=-1;
TrShuttleProxy._clearDescAreas(a108,a106,a107);
TrShuttleProxy._makeList(a108,a106);
TrShuttleProxy._makeList(a108,a107);
}
else if(_shuttle_no_items.length>0)
{
alert(_shuttle_no_items);
}
}
TrShuttleProxy._orderList=function(
a120,
a121,
a122
)
{
if(a122==(void 0))
{
a122=TrShuttleProxy._findFormNameContaining(a121);
}
var a123=document.forms[a122].elements[a121];
var a124=TrShuttleProxy._getSelectedIndexes(a122,a121);
if(a124.length==0)
{
if(_shuttle_no_items_selected.length>0)
alert(_shuttle_no_items_selected);
return;
}
var a125=TrShuttleProxy._getDescArray(a121);
var a126=a124.length-1;
while(a126>=0)
{
var a127=a124[a126];
var a128=a127;
var a129=a126;
while((a129>0)&&((a124[a129]-
a124[a129-1])==1))
{
a129--;
a128--;
}
if(a120==0)
{
if(a128!=0)
{
var a130=a123.options[a128-1].text;
var a131=a123.options[a128-1].value;
if(a125!=(void 0))
var a132=a125[a128-1];
for(var a133=a128;a133<=a127;a133++)
{
a123.options[a133-1].text=a123.options[a133].text;
a123.options[a133-1].value=a123.options[a133].value;
a123.options[a133-1].selected=true;
if(a125!=(void 0))
a125[a133-1]=a125[a133];
}
a123.options[a127].text=a130;
a123.options[a127].value=a131;
a123.options[a127].selected=false;
if(a125!=(void 0))
a125[a127]=a132;
}
}
else
{
if(a127!=a123.length-2)
{
var a130=a123.options[a127+1].text;
var a131=a123.options[a127+1].value;
if(a125!=(void 0))
var a132=a125[a127+1];
for(var a133=a127;a133>=a128;a133--)
{
a123.options[a133+1].text=a123.options[a133].text;
a123.options[a133+1].value=a123.options[a133].value;
a123.options[a133+1].selected=true;
if(a125!=(void 0))
a125[a133+1]=a125[a133];
}
a123.options[a128].text=a130;
a123.options[a128].value=a131;
a123.options[a128].selected=false;
if(a125!=(void 0))
a125[a128]=a132;
}
}
a126=a129-1;
}
TrShuttleProxy._displayDesc(a121,a122);
TrShuttleProxy._makeList(a122,a121);
}
TrShuttleProxy._orderTopBottomList=function(
a134,
a135,
a136
)
{
if(a136==(void 0))
{
a136=TrShuttleProxy._findFormNameContaining(a135);
}
var a137=document.forms[a136].elements[a135];
var a138=TrShuttleProxy._getSelectedIndexes(a136,a135);
if(a138.length==0)
{
if(_shuttle_no_items_selected.length>0)
alert(_shuttle_no_items_selected);
return;
}
var a139=TrShuttleProxy._getDescArray(a135);
var a140=new Array();
var a141=new Array();
var a142=new Array();
var a143=new Array();
var a144=0;
if(a134==0)
{
var a145=0;
var a144=0;
for(var a146=0;
a146<a138[a138.length-1];
a146++)
{
if(a146!=a138[a145])
{
a142[a144]=a137.options[a146].text;
a143[a144]=a137.options[a146].value;
if(a139!=(void 0))
a140[a144]=a139[a146];
a144++
}
else
{
if(a139!=(void 0))
a141[a145]=a139[a146];
a145++;
}
}
if(a139!=(void 0))
a141[a145]=a139[a146];
for(var a147=0;a147<a138.length;a147++)
{
a137.options[a147].text=a137.options[a138[a147]].text;
a137.options[a147].value=a137.options[a138[a147]].value;
a137.options[a147].selected=true;
if(a139!=(void 0))
a139[a147]=a141[a147];
}
for(var a148=0;a148<a142.length;a148++)
{
a137.options[a147].text=a142[a148];
a137.options[a147].value=a143[a148];
a137.options[a147].selected=false;
if(a139!=(void 0))
a139[a147]=a140[a148];
a147++
}
}
else
{
var a145=1;
var a144=0;
if(a139!=(void 0))
a141[0]=a139[a138[0]];
for(var a149=a138[0]+1;
a149<=a137.length-2;
a149++)
{
if((a145==a138.length)||
(a149!=a138[a145]))
{
a142[a144]=a137.options[a149].text;
a143[a144]=a137.options[a149].value;
if(a139!=(void 0))
a140[a144]=a139[a149];
a144++;
}
else
{
if(a139!=(void 0))
a141[a145]=a139[a149];
a145++;
}
}
var a148=a137.length-2;
for(var a147=a138.length-1;a147>=0;a147--)
{
a137.options[a148].text=a137.options[a138[a147]].text;
a137.options[a148].value=a137.options[a138[a147]].value;
a137.options[a148].selected=true;
if(a139!=(void 0))
a139[a148]=a141[a147];
a148--;
}
for(var a147=a142.length-1;a147>=0;a147--)
{
a137.options[a148].text=a142[a147];
a137.options[a148].value=a143[a147];
a137.options[a148].selected=false;
if(a139!=(void 0))
a139[a148]=a140[a147];
a148--
}
}
TrShuttleProxy._displayDesc(a135,a136);
TrShuttleProxy._makeList(a136,a135);
}
TrShuttleProxy._getSelectedIndexes=function(
a150,
a151
)
{
var a152=document.forms[a150].elements[a151];
var a153=new Array();
var a154=0;
for(var a155=0;a155<a152.length-1;a155++)
{
if(a152.options[a155].selected)
{
a153[a154]=a155;
a154++;
}
}
return a153;
}
TrShuttleProxy._findFormNameContaining=function(
a156
)
{
var a157=document.forms.length;
for(var a158=0;a158<a157;a158++)
{
if(document.forms[a158][a156]!=(void 0))
{
return _getFormName(document.forms[a158]);
}
}
return"";
}
TrShuttleProxy._makeList=function(
a159,
a160
)
{
var a161=document.forms[a159].elements[a160];
if(a161==null)
return;
var a162="";
for(var a163=0;a163<a161.length-1;a163++)
{
if(a161.options[a163].value.length>0)
{
a162=a162+
TrShuttleProxy._trimString(a161.options[a163].value)
+';';
}
else
{
a162=a162+
TrShuttleProxy._trimString(a161.options[a163].text)
+';';
}
}
document.forms[a159].elements[a160+':items'].value=a162;
}
TrShuttleProxy._trimString=function(
a164
)
{
var a165=a164.length-1;
if(a164.charAt(a165)!=' ')
{
return a164;
}
while((a164.charAt(a165)==' ')&&(a165>0))
{
a165=a165-1;
}
a164=a164.substring(0,a165+1);
return a164;
}
TrShuttleProxy._getListName=function(
a166,
a167
)
{
var a168=(a167)?a166+":leading":
a166+":trailing";
return a168;
}
TrShuttleProxy._resetItems=function(
a169,
a170)
{
leadingListName=TrShuttleProxy._getListName(a169,true);
trailingListName=TrShuttleProxy._getListName(a169,false);
var a171=document.forms[a170].elements[leadingListName];
if(!a171)
return;
var a172=document.forms[a170].elements[trailingListName];
var a173=TrShuttleProxy._getOriginalLists(a169,a170);
var a174=a173.leading;
var a175=a173.trailing;
var a176=TrShuttleProxy._getDescArray(leadingListName);
var a177=TrShuttleProxy._getDescArray(trailingListName);
TrShuttleProxy._resetToOriginalList(a174,a176,a171);
TrShuttleProxy._resetToOriginalList(a175,a177,a172);
TrShuttleProxy._makeList(a170,leadingListName);
TrShuttleProxy._makeList(a170,trailingListName);
return false;
}
TrShuttleProxy._getOriginalLists=function
(
a178,
a179
)
{
var a180=window['_'+a179+'_'+a178+'_orig'];
return a180;
}
TrShuttleProxy._resetToOriginalList=function
(
a181,
a182,
a183
)
{
if(a181==(void 0)||a183==(void 0))
return;
a183.selectedIndex=a181.selectedIndex;
var a184=0;
for(;a184<a181.options.length;a184++)
{
var a185=a181.options[a184].text;
var a186=a181.options[a184].value;
var a187=a181.options[a184].defaultSelected;
var a188=a181.options[a184].selected;
{
a183.options[a184]=new Option(a185,a186,
a187,a188);
a183.options[a184].defaultSelected=a187;
a183.options[a184].selected=a188;
}
if(a182!=(void 0))
a182[a184]=a181.descriptions[a184];
}
var a189=a183.options.length-1;
while(a189>=a184)
{
if(a182!=(void 0))
a182[a189]=null;
a183.options[a189]=null;
a189--;
}
}
TrShuttleProxy._copyLists=function(a190,a191)
{
var a192=new Object();
a192.leading=TrShuttleProxy._copyList(TrShuttleProxy._getListName(a190,true),a191);
a192.trailing=TrShuttleProxy._copyList(TrShuttleProxy._getListName(a190,false),a191);
return a192;
}
TrShuttleProxy._copyList=function(a193,a194)
{
if(a194==(void 0)||a193==(void 0))
return;
var a195=document.forms[a194].elements[a193];
if(a195==null)
return;
var a196=TrShuttleProxy._getDescArray(a193);
var a197=new Object();
a197.selectedIndex=a195.selectedIndex;
a197.options=new Array();
a197.descriptions=new Array();
for(var a198=0;a198<a195.options.length;a198++)
{
a197.options[a198]=new Option(a195.options[a198].text,
a195.options[a198].value,
a195.options[a198].defaultSelected,
a195.options[a198].selected);
a197.options[a198].defaultSelected=a195.options[a198].defaultSelected;
a197.options[a198].selected=a195.options[a198].selected;
if(a196!=null)
a197.descriptions[a198]=a196[a198];
}
return a197;
}

TrPanelPopup.showPopup=function(
a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9)
{
if(a0==null)
return;
var a10=TrPanelPopup._VISIBLE_POPUPS;
if(!a10)
a10=TrPanelPopup._VISIBLE_POPUPS=new Object();
if(a10[a0])
return;
if(a3=="hover")
a10[a0]=new TrHoverPopup();
else
a10[a0]=new TrClickPopup();
var a11=a10[a0];
var a12=document.getElementById(a0);
if(!a12)
return;
a11.setContent(a12);
a11.setTrigger(document.getElementById(a1));
a11.setModal(a5);
a11.setCentered(a4=='centered');
a11.setSize(a6,a7);
a11.setRelativeOffsetX(a8);
a11.setRelativeOffsetY(a9);
a11.showPopup(a2);
}
TrPanelPopup.hidePopup=function(a13)
{
a13=window.event||a13;
var a14=TrPanelPopup._VISIBLE_POPUPS;
if(!a14)
return;
var a15=a13.target||a13.srcElement;
while(a15)
{
var a16=a15.id;
if(a16)
{
var a17=a14[a16];
if(a17)
{
a17.hide(a13);
break;
}
}
a15=a15.parentNode;
}
}
function TrPanelPopup()
{
this._content=false;
this._trigger=false;
this._centered=false;
this._modal=false;
this._visible=false;
}
TrPanelPopup.prototype.getContent=function()
{
return this._content;
}
TrPanelPopup.prototype.setContent=function(a0)
{
this._content=a0;
if(this._content)
{
this._content.style.cssText="position: absolute; z-index: 5001; top: 0px; left: 0px; visibility:hidden; padding: 0px;";
}
}
TrPanelPopup.prototype.getTrigger=function()
{
return this._trigger;
}
TrPanelPopup.prototype.setTrigger=function(a1)
{
this._trigger=a1;
}
TrPanelPopup.prototype.setCentered=function(a2)
{
this._centered=a2;
}
TrPanelPopup.prototype.isModal=function()
{
return this._modal;
}
TrPanelPopup.prototype.setModal=function(a3)
{
this._modal=a3;
}
TrPanelPopup.prototype.setRelativeOffsetX=function(a4)
{
this._relativeOffsetX=parseInt(a4);
}
TrPanelPopup.prototype.getRelativeOffsetX=function()
{
return(this._relativeOffsetX)?this._relativeOffsetX:0;
}
TrPanelPopup.prototype.setRelativeOffsetY=function(a5)
{
this._relativeOffsetY=parseInt(a5);
}
TrPanelPopup.prototype.getRelativeOffsetY=function()
{
return(this._relativeOffsetY)?this._relativeOffsetY:0;
}
TrPanelPopup.prototype.isVisible=function()
{
return this._visible;
}
TrPanelPopup.prototype.returnValue=undefined;
TrPanelPopup.prototype.callback=undefined;
TrPanelPopup.prototype.callbackProps=undefined;
TrPanelPopup.prototype.show=function(a6)
{
if(!this.getContent())
return;
if(_pprBlocking)
return;
if(this.isVisible())
return;
this._calcPosition(a6);
if(this.isModal())
TrPanelPopup._showMask();
TrPanelPopup._showIeIframe();
this.getContent().style.visibility="visible";
this._visible=true;
}
TrPanelPopup.prototype.hide=function(a7)
{
if(!this.getContent())
return;
if(this.isModal())
TrPanelPopup._hideMask();
TrPanelPopup._hideIeIframe();
this.getContent().style.visibility="hidden";
this.getContent().style.left="0px";
this.getContent().style.top="0px";
if(this.callback)
{
try
{
this.callback(this.callbackProps,this.returnValue);
}
catch(ex)
{
alert("Error calling TrPanelPopup callback function:\n"+ex);
}
}
this._visible=false;
var a8=TrPanelPopup._VISIBLE_POPUPS;
if(a8)
delete a8[this.getContent().id];
}
TrPanelPopup.prototype.setSize=function(a9,a10)
{
if(a9)
{
var a11=parseInt(a9);
if(a11>0)
this.getContent().style.width=a11+"px";
}
if(a10)
{
var a11=parseInt(a10);
if(a11>0)
this.getContent().style.height=a11+"px";
}
}
TrPanelPopup._mask=undefined;
TrPanelPopup._showMask=function()
{
if(!TrPanelPopup._mask)
{
TrPanelPopup._mask=document.createElement('div');
TrPanelPopup._mask.name="TrPanelPopup._BlockingModalDiv";
TrPanelPopup._mask.id="af_dialog_blocked-area";
var a12=TrPage.getInstance();
TrPanelPopup._mask.className=a12.getStyleClass("af|dialog::blocked-area");
var a13="display:none;position: absolute; z-index: 5000;top: 0px;left: 0px;cursor: not-allowed;";
if(_agent.isIE&&_agent.version==7)
a13=a13+"background-color: white; filter: alpha(opacity=0);";
else
a13=a13+"background-color: transparent";
TrPanelPopup._mask.style.cssText=a13;
TrPanelPopup._mask.innerHTML="&nbsp;";
document.body.appendChild(TrPanelPopup._mask);
}
TrPanelPopup._registerMaskEvents();
TrPanelPopup._setMaskSize();
TrPanelPopup._mask.style.display="block";
}
TrPanelPopup._registerMaskEvents=function()
{
_addEvent(TrPanelPopup._mask,"click",TrPanelPopup._consumeMaskEvent);
_addEvent(window,"resize",TrPanelPopup._setMaskSize);
_addEvent(window,"scroll",TrPanelPopup._setMaskSize);
}
TrPanelPopup._hideMask=function()
{
_removeEvent(TrPanelPopup._mask,"click",TrPanelPopup._consumeMaskEvent);
_removeEvent(window,"resize",TrPanelPopup._setMaskSize);
_removeEvent(window,"scroll",TrPanelPopup._setMaskSize);
TrPanelPopup._mask.style.display="none";
}
TrPanelPopup.prototype._hitTest=function(a14,a15)
{
var a16=TrUIUtils._getElementBounds(a14);
return a16.x<=a15.pageX&&(a16.x+a16.w)>=a15.pageX&&
a16.y<=a15.pageY&&(a16.y+a16.h)>=a15.pageY;
}
TrPanelPopup.prototype._fitOnScreen=function(a17,a18)
{
var a19=TrUIUtils._getStyle(a17,'visibility');
a17.style.visibility='hidden';
var a20=TrUIUtils._getElementBounds(a17);
var a21=TrUIUtils._getElementLocation(a17.offsetParent);
var a22=TrUIUtils._getStyle(a17.offsetParent,'position');
var a23;
if(a22=='relative'||a22=='absolute')
{
a23={left:a21.x,top:a21.y};
}
else
{
a23={left:0,top:0};
}
var a24={
x:a20.x-(document.body.scrollLeft||document.documentElement.scrollLeft),
y:a20.y-(document.body.scrollTop||document.documentElement.scrollTop)
};
if(a20.x<0)
{
a17.style.left=(0-a23.left)+'px';
}
else if(a24.x+a20.w>a18.w)
{
a17.style.left=(a17.offsetLeft-(a24.x+a20.w-a18.w))+'px';
}
if(a20.y<0)
{
a17.style.top=(0-a23.top)+'px';
}
else if(a24.y+a20.h>a18.h)
{
a17.style.top=(a17.offsetTop-(a24.y+a20.h-a18.h))+'px';
}
a17.style.visibility=a19;
}
TrPanelPopup.prototype._getEventPosition=function(a25)
{
var a26={
clientX:a25.clientX,
clientY:a25.clientY,
pageX:a25.pageX,
pageY:a25.pageY
};
if(a26.pageX==null)
{
a26.pageX=a25.clientX
+(document.body.scrollLeft||document.documentElement.scrollLeft);
a26.pageY=a25.clientY
+(document.body.scrollTop||document.documentElement.scrollTop);
}
return a26;
}
TrPanelPopup.prototype._centerOnScreen=function(a27,a28)
{
a27.style.position='absolute';
var a29=TrUIUtils._getStyle(a27,'visibility');
a27.style.visibility='hidden';
var a30=TrUIUtils._getElementLocation(a27.offsetParent);
var a31=TrUIUtils._getElementBounds(a27);
var a32=TrUIUtils._getStyle(a27.offsetParent,'position');
var a33;
if(a32=='relative'||a32=='absolute')
{
a33={left:a30.x,top:a30.y};
}
else
{
a33={left:0,top:0};
}
var a34={
x:a31.x-(document.body.scrollLeft||document.documentElement.scrollLeft),
y:a31.y-(document.body.scrollTop||document.documentElement.scrollTop)
};
a27.style.left=Math.max(0,
(a28.w/2-a27.clientWidth/2)
-a33.left
+(a31.x-a34.x))+'px';
a27.style.top=Math.max(0,
(a28.h/2-a27.clientHeight/2)
-a33.top
+(a31.y-a34.y))+'px';
a27.style.visibility=a29;
}
TrPanelPopup.prototype._getOffsetParent=function()
{
for(var a35=this.getContent();a35!=null;
a35=a35.parentNode)
{
if(a35.tagName&&'form'==a35.tagName.toLowerCase())
{
return a35;
}
}
return document.body;
}
TrPanelPopup.prototype._calcPosition=function(a36)
{
var a37=this.getContent();
a36=window.event||a36;
var a38=this._getOffsetParent();
var a39=TrUIUtils._getWindowClientSize();
if(!a37.origParent)
{
a37.origParent=a37.parentNode;
}
a38.appendChild(a37);
if(!this._centered)
{
var a40=this._getEventPosition(a36);
var a41=TrUIUtils._getElementLocation(a37.offsetParent);
var a42=TrUIUtils._getStyle(a37.offsetParent,'position');
var a43;
if(a42=='relative'||a42=='absolute')
{
a43={left:a41.x,top:a41.y};
}
else
{
a43={left:0,top:0};
}
a37.style.left=(a40.pageX-a43.left+this.getRelativeOffsetX()-
this._getSideOffset(a37,"Left"))+'px';
a37.style.top=(a40.pageY-a43.top+this.getRelativeOffsetY()-
this._getSideOffset(a37,"Top"))+'px';
}
if(this._centered)
{
this._centerOnScreen(a37,a39);
}
else
{
this._fitOnScreen(a37,a39);
}
if(!this.isModal())
{
var a44=TrUIUtils._getElementBounds(a37);
TrPanelPopup._resizeIeIframe(a44.x,a44.y,a44.w,a44.h);
}
}
TrPanelPopup.prototype._getSideOffset=function(a45,a46)
{
var a47=["border","padding","margin"];
var a48=0;
for(var a49=0;a49<a47.length;++a49)
{
var a50=TrUIUtils._getStyle(a45,a47[a49]+a46);
a50=parseInt(a50);
if(!isNaN(a50))
{
a48+=a50;
}
}
return a48;
}
TrPanelPopup._consumeMaskEvent=function(a51)
{
return false;
}
TrPanelPopup._setMaskSize=function()
{
if(!TrPanelPopup._mask)
return;
var a52=TrUIUtils._getWindowClientSize();
var a53=document.documentElement.scrollWidth||document.body.scrollWidth;
var a54=document.documentElement.scrollHeight||document.body.scrollHeight;
var a55=Math.max(a52.w,a53);
var a56=Math.max(a52.h,a54);
TrPanelPopup._mask.style.width=a55+"px";
TrPanelPopup._mask.style.height=a56+"px";
TrPanelPopup._resizeIeIframe(0,0,a55,a56);
}
TrPanelPopup._showIeIframe=function()
{
if(_agent.isIE&&_agent.version<7)
{
TrPanelPopup._initIeIframe();
TrPanelPopup._maskIframe.style.display="block";
}
}
TrPanelPopup._hideIeIframe=function()
{
if(_agent.isIE&&_agent.version<7)
{
TrPanelPopup._initIeIframe();
TrPanelPopup._maskIframe.style.display="none";
}
}
TrPanelPopup._resizeIeIframe=function(a57,a58,a59,a60)
{
if(_agent.isIE&&_agent.version<7)
{
TrPanelPopup._initIeIframe();
TrPanelPopup._maskIframe.style.left=a57;
TrPanelPopup._maskIframe.style.top=a58;
TrPanelPopup._maskIframe.style.width=a59;
TrPanelPopup._maskIframe.style.height=a60;
}
}
TrPanelPopup._initIeIframe=function()
{
if(!TrPanelPopup._maskIframe)
{
TrPanelPopup._maskIframe=document.createElement('iframe');
TrPanelPopup._maskIframe.name="TrPanelPopup._ieOnlyZIndexIframe";
TrPanelPopup._maskIframe.style.cssText="display: none; left: 0px; position: absolute; top: 0px; z-index: 4999;";
TrPanelPopup._maskIframe.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
if(_agent.isIE)
{
TrPanelPopup._maskIframe.src="javascript:false;";
}
document.body.appendChild(TrPanelPopup._maskIframe);
}
}
function TrHoverPopup()
{
TrPanelPopup.call(this);
this._hoverCallbackFunction=TrUIUtils.createCallback(this,this.hidePopup);
}
TrHoverPopup.prototype=new TrPanelPopup();
TrHoverPopup.prototype.showPopup=function(a0)
{
_addEvent(document.body,"mousemove",this._hoverCallbackFunction);
this.show(a0);
}
TrHoverPopup.prototype.hidePopup=function(a1)
{
a1=window.event||a1;
var a2=this.getContent();
var a3=this.getTrigger();
var a4=this._getEventPosition(a1);
if((this._hitTest(a2,a4)||
this._hitTest(a3,a4)))
{
return;
}
_removeEvent(document.body,"mousemove",this._hoverCallbackFunction);
this.hide(a1);
if(a2.origParent)
{
a2.origParent.appendChild(a2);
}
}
TrHoverPopup.prototype.isModal=function()
{
return false;
}
function TrClickPopup()
{
TrPanelPopup.call(this);
this._clickCallbackFunction=TrUIUtils.createCallback(this,this.hidePopup);
}
TrClickPopup.prototype=new TrPanelPopup();
TrClickPopup.prototype.showPopup=function(a0)
{
if(!this.isModal())
_addEvent(document,"click",this._clickCallbackFunction);
this.show(a0);
}
TrClickPopup.prototype.hidePopup=function(a1)
{
a1=window.event||a1;
var a2=a1.target||a1.srcElement;
while(a2)
{
if(a2==this.getContent()||
a2==this.getTrigger())
{
break;
}
a2=a2.parentNode;
}
if(!a2)
{
_removeEvent(document,"click",this._clickCallbackFunction);
this.hide(a1);
if(this.getContent().origParent)
{
this.getContent().origParent.appendChild(this.getContent());
}
}
}

function TrPopupDialog()
{
var a0=TrPage.getInstance();
var a1=document.createElement("div");
a1.style.cssText="visibility:hidden; position: absolute;";
a1.className=a0.getStyleClass("af|dialog::container");
var a2=document.createElement("div");
a2.className=a0.getStyleClass("af|dialog::title-bar");
a1.appendChild(a2);
var a3=document.createElement("div");
a3.style.cssText="float:left;";
a3.className=a0.getStyleClass("af|dialog::title-text");
a2.appendChild(a3);
var a4=document.createElement("div");
a4.style.cssText="float:right;";
a4.className=a0.getStyleClass("af|dialog::close-icon");
_addEvent(a4,"click",TrPopupDialog._returnFromDialog);
a2.appendChild(a4);
var a5=document.createElement("div");
a5.style.cssText="clear:both;";
a2.appendChild(a5);
var a6=document.createElement("iframe");
a6.name="_blank";
a6.frameBorder="0";
a6.className=a0.getStyleClass("af|dialog::content");
a1.appendChild(a6);
this._iframe=a6;
this._outerDiv=a1;
this._titleTextDiv=a3;
document.body.appendChild(a1);
TrPanelPopup.call(this);
this.setModal(true);
this.setCentered(true);
this.setContent(a1);
this._fixedSize=false;
}
TrPopupDialog.prototype=new TrPanelPopup();
TrPopupDialog.prototype.setTitle=function(a7)
{
if(a7)
{
this._titleTextDiv.innerHTML=a7;
}
else
{
this._titleTextDiv.innerHTML="";
}
}
TrPopupDialog.prototype.setDestination=function(a8)
{
this._iframe.src=a8;
}
TrPopupDialog.prototype.setSize=function(a9,a10)
{
this._resizeIFrame(a9,a10);
if(a9==null)
{
this._variableWidth=true;
}
else
{
this._variableWidth=false;
this._fixedSize=true;
}
if(a10==null)
{
this._variableHeight=true;
}
else
{
this._variableHeight=false;
this._fixedSize=true;
}
}
TrPopupDialog.getInstance=function()
{
return TrPopupDialog.DIALOG;
}
TrPopupDialog.prototype._destroy=function()
{
var a11=this._outerDiv;
if(a11)
{
delete this._outerDiv;
a11.parentNode.removeChild(a11);
}
if(this._iframe)
delete this._iframe;
if(this._titleTextDiv)
delete this._titleTextDiv;
}
TrPopupDialog.prototype._resizeIFrame=function(a12,a13)
{
if(a13!=null)
{
this._iframe.height=a13+"px";
}
if(a12!=null)
{
this._iframe.width="100%";
this._outerDiv.style.width=a12+"px";
}
this._calcPosition(false);
}
TrPopupDialog._initDialogPage=function()
{
var a14;
try
{
a14=parent.TrPopupDialog.DIALOG;
}
catch(err)
{
}
if(!a14)
return;
a14.setTitle(document.title);
if(a14.isVisible())
return;
if(!a14._fixedSize)
{
if(_agent.isIE)
{
a14._resizeIFrame(
a14._iframe.Document.body.scrollWidth+40,
a14._iframe.Document.body.scrollHeight+40);
}
else
{
a14._resizeIFrame(
a14._iframe.contentDocument.body.offsetWidth+40,
a14._iframe.contentDocument.body.offsetHeight+40);
}
}
else if(a14._variableWidth||a14._variableHeight)
{
if(a14._variableWidth)
{
if(_agent.isIE)
{
a14._resizeIFrame(a14._iframe.Document.body.scrollWidth+40,null);
}
else
{
a14._resizeIFrame(a14._iframe.contentDocument.body.offsetWidth+40,null);
}
}
if(a14._variableHeight)
{
if(_agent.isIE)
{
a14._resizeIFrame(null,a14._iframe.Document.body.scrollHeight+40);
}
else
{
a14._resizeIFrame(null,a14._iframe.contentDocument.body.offsetHeight+40);
}
}
}
a14.show();
}
TrPopupDialog._returnFromDialog=function()
{
var a15=TrPopupDialog.DIALOG;
if(a15)
{
a15.hide();
window.setTimeout(TrUIUtils.createCallback(
a15,TrPopupDialog.prototype._destroy),100);
TrPopupDialog.DIALOG=undefined;
}
else
{
alert("returnFromDialog(): Error - Current popup is not a dialog");
}
}
TrPopupDialog._returnFromDialogAndSubmit=function(a16,a17)
{
if(a16)
{
var a18=a16['formName'];
var a19=a16['postback'];
_submitPartialChange(a18,0,{rtrn:a19});
}
}
TrPopupDialog._launchDialog=function(
a20,
a21,
a22,
a23)
{
var a24=TrPopupDialog.DIALOG;
if(!a24)
{
a24=TrPopupDialog.DIALOG=new TrPopupDialog();
}
a24.callback=a22;
a24.callbackProps=a23;
if(a21&&a21['width']&&a21['height'])
{
a24.setSize(a21['width'],a21['height']);
}
else if(a21&&a21['width'])
{
a24.setSize(a21['width'],null);
}
else if(a21&&a21['height'])
{
a24.setSize(null,a21['height']);
}
a24.setDestination(a20);
}

function ApacheChartObj()
{
this.Init();
}
ApacheChartObj.prototype=new Object();
ApacheChartObj.prototype.constructor=ApacheChartObj;
ApacheChartObj._tempConstructor=function(){}
ApacheChartObj.Inherit=function(a0,a1)
{
var a2=ApacheChartObj._tempConstructor;
a2.prototype=a0.prototype;
a1.prototype=new a2();
a1.prototype.constructor=a1;
a1.superclass=a0.prototype;
}
ApacheChartObj.Assert=function(a3,a4)
{
if(!a3)
{
throw new Error(a4);
}
}
function ApacheChartBuffer(a0)
{
this.maxStreamLength=document.all?5000:100000;
this.data=new Array(a0?a0:100);
this.iStr=0;
}
ApacheChartBuffer.prototype.append=function(a1)
{
this.data[this.iStr++]=a1;
if(this.data.length>this.maxStreamLength)
{
this.data=[this.data.join("")];
this.data.length=100;
this.iStr=1;
}
return this;
}
ApacheChartBuffer.prototype.toString=function()
{
return this.data.join("");
}
function ApacheChartModel(a0,a1,a2,a3,a4)
{
this._seriesLabels=a0;
this._groupLabels=a1;
this._yValues=a2;
this._xValues=a3;
this._seriesColors=a4;
var a5=a0.length;
var a6=a4.length;
if(a6<a5)
{
var a7=ApacheChart._to_hex;
for(i=a6;i<a5;i++)
{
var a8=Math.floor(Math.random()*1000)%255;
var a9=Math.floor(Math.random()*1000)%255;
var a10=Math.floor(Math.random()*1000)%255;
a4[i]="#"+a7(a8)+a7(a9)+a7(a10);
}
}
}
ApacheChartModel.prototype.getSeriesLabels=function()
{
return this._seriesLabels;
}
ApacheChartModel.prototype.getGroupLabels=function()
{
return this._groupLabels;
}
ApacheChartModel.prototype.getSeriesColors=function()
{
return this._seriesColors;
}
ApacheChartModel.prototype.getXValues=function()
{
return this._xValues;
}
ApacheChartModel.prototype.getYValues=function()
{
return this._yValues;
}
ApacheChartModel.prototype.setMaxYValue=function(a11)
{
this._maxYValue=a11;
}
ApacheChartModel.prototype.getMaxYValue=function()
{
return this._maxYValue;
}
ApacheChartModel.prototype.setMinYValue=function(a12)
{
this._minYValue=a12;
}
ApacheChartModel.prototype.getMinYValue=function()
{
return this._minYValue;
}
ApacheChartModel.prototype.setMaxXValue=function(a13)
{
this._maxXValue=a13;
}
ApacheChartModel.prototype.getMaxXValue=function()
{
return this._maxXValue;
}
ApacheChartModel.prototype.setMinXValue=function(a14)
{
this._minXValue=a14;
}
ApacheChartModel.prototype.getMinXValue=function()
{
return this._minXValue;
}
ApacheChartModel.prototype.setTitle=function(a15)
{
this._title=a15;
}
ApacheChartModel.prototype.getTitle=function()
{
return this._title;
}
ApacheChartModel.prototype.setSubTitle=function(a16)
{
this._subTitle=a16;
}
ApacheChartModel.prototype.getSubTitle=function()
{
return this._subTitle;
}
ApacheChartModel.prototype.setFootNote=function(a17)
{
this._footNote=a17;
}
ApacheChartModel.prototype.getFootNote=function()
{
return this._footNote;
}
function ApacheChartEvent(a0,a1,a2,a3)
{
this._seriesIndices=a0;
this._yValueIndices=a1;
this._yValues=a2;
this._xValues=a3;
}
ApacheChartEvent.prototype.getSeriesIndices=function()
{
return this._seriesIndices;
}
ApacheChartEvent.prototype.getYValueIndices=function()
{
return this._yValueIndices;
}
ApacheChartEvent.prototype.getYValues=function()
{
return this._yValues;
}
ApacheChartEvent.prototype.getXValues=function()
{
return this._xValues;
}
ApacheChartEvent.prototype.toString=function()
{
var a4=new ApacheChartBuffer();
if(this._seriesIndices)
a4.append("seriesIndices = "+this._seriesIndices.join(","));
if(this._yValueIndices)
a4.append("\yValueIndices = "+this._yValueIndices.join(","));
a4.append("\nyValues = "+this._yValues.join(","));
if(this._xValues)
a4.append("\nxValues = "+this._xValues.join(","));
return a4.toString();
}
ApacheChartEvent.prototype.marshall=function()
{
var a5=new Array();
if(this._seriesIndices)
a5.push("seriesIndices\t"+this._seriesIndices.join("\t"));
if(this._yValueIndices)
a5.push("yValueIndices\t"+this._yValueIndices.join("\t"));
a5.push("yValues\t"+this._yValues.join("\t"));
if(this._xValues)
a5.push("xValues\t"+this._xValues.join("\t"));
return a5.join("$adf$");
}
function ApacheChart(a0,a1,a2,a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChart.createSVG=function(a5,
a6,a7,a8,a9)
{
var a10=document.getElementById(a5);
var a11=document.createElement("embed");
var a12=window._agent;
if(a12&&a12.isIE)
{
var a13=a7.indexOf(";");
if(a13!=-1)
a7=a7.substr(0,a13);
}
a11.setAttribute("src",a7);
a11.setAttribute("id",a6);
a11.setAttribute("wmode","transparent");
a11.setAttribute("type","image/svg+xml");
if(a12&&a12.isOpera)
{
var a14=document.defaultView.getComputedStyle(a10,null);
var a15=a11.style;
a15.width=a14.width;
a15.height=a14.height;
}
else
{
a11.style.cssText=a8;
}
if(a9)
{
a11.className=a9;
}
a10.appendChild(a11);
}
ApacheChart.isASVInstalled=function()
{
try{
var a16=new ActiveXObject("Adobe.SVGCtl");
return true;
}
catch(e){
}
return false;
}
ApacheChartObj.Inherit(ApacheChartObj,ApacheChart);
ApacheChart.prototype.Init=function(a17,a18,a19,
a20,a21)
{
this._type=a17;
this._model=a18;
this._svgEmbedId=a19;
this._margins={left:2,right:2,top:2,bottom:2};
this._isPerspective=a20;
this._legendPosition=a21;
this._toolTip=null;
this._toolTipVisible=false;
this._animDuration=1500;
this._dataElems=[];
this._labelElems=[];
this._gridElems=[];
this._groupLabelElems=[];
this._yMajorGridCount=8;
this._yMinorGridCount=-1;
this._xMajorGridCount=-1;
this._tooltipsVisible=true;
this._gradientsUsed=true;
this._maxPrecision=0;
this._decimalSep=null;
this._formName=null;
this._partialSubmit=true;
this._svgCheckTotal=0;
this._errorTextNode=null;
this._isIE=false;
if(window._agent)
this._isIE=_agent.isIE;
if(this._isIE)
this._errorHtml="<H4>Unable to load SVG plugin. Please install the plugin from <a href='#' onclick=\"window.open('http://www.adobe.com/svg/viewer/install/main.html')\">Adobe</a><H4>";
else
this._errorHtml="<H4>This component needs an SVG enabled browser like Internet Explorer, Firefox 1.5+ or Opera 9.0+<H4>";
this._statusHtml="<H4>Please Wait. Attempting to load SVG document...</H4>";
this.ComputeMinMaxValues();
}
ApacheChart.prototype.setErrorHtml=function(a22)
{
this._errorHtml=a22;
}
ApacheChart.prototype.setStatusHtml=function(a23)
{
this._statusHtml=a23;
}
ApacheChart.prototype.setYMajorGridLineCount=function(a24)
{
this._yMajorGridCount=a24>0?a24+1:a24;
}
ApacheChart.prototype.setYMinorGridLineCount=function(a25)
{
this._yMinorGridCount=a25>0?a25+1:a25;
}
ApacheChart.prototype.setXMajorGridLineCount=function(a26)
{
this._xMajorGridCount=a26>0?a26+1:a26;
}
ApacheChart.prototype.setAnimationDuration=function(a27)
{
this._animDuration=a27;
}
ApacheChart.prototype.setGradientsUsed=function(a28)
{
this._gradientsUsed=a28;
}
ApacheChart.prototype.setMaxPrecision=function(a29)
{
this._maxPrecision=a29;
}
ApacheChart.prototype.setFormName=function(a30)
{
this._formName=a30;
}
ApacheChart.prototype.setPartialSubmit=function(a31)
{
this._partialSubmit=a31;
}
ApacheChart.prototype.setTooltipsVisible=function(a32)
{
this._tooltipsVisible=a32;
}
ApacheChart.prototype.getToolTip=function()
{
return this._toolTip;
}
ApacheChart.prototype.setToolTip=function(a33)
{
this._toolTip=a33;
}
ApacheChart.prototype.ComputeMinMaxValues=function()
{
var a34=this._model,yValues=a34.getYValues(),xValues=a34.getXValues(),
maxYValue=a34.getMaxYValue(),maxXValue=a34.getMaxXValue(),
minYValue=a34.getMinYValue(),minXValue=a34.getMinXValue(),
seriesLabels=a34.getSeriesLabels();
if(yValues!=null&&(maxYValue==null||minYValue==null))
{
var a35=this._computeAxisMinMaxValues(yValues,seriesLabels.length);
if(maxYValue==null)
a34.setMaxYValue(a35.max);
if(minYValue==null)
a34.setMinYValue(a35.min);
}
if(xValues!=null&&(maxXValue==null||minXValue==null))
{
var a35=this._computeAxisMinMaxValues(xValues,seriesLabels.length);
if(maxXValue==null)
a34.setMaxXValue(a35.max);
if(minXValue==null)
a34.setMinXValue(a35.min);
}
}
ApacheChart.prototype._computeAxisMinMaxValues=function(a36,a37)
{
var a38,value,maxValue=Number.NEGATIVE_INFINITY,minValue=Number.POSITIVE_INFINITY,
type=this._type,isStacked=false,groupsCount=a36.length;
if(type==ApacheChart.TYPE_VBAR_STACKED||type==ApacheChart.TYPE_HBAR_STACKED||
type==ApacheChart.TYPE_AREA_STACKED)
{
isStacked=true;
}
for(var a39=0;a39<groupsCount;++a39)
{
a38=0;
for(var a40=0;a40<a37;++a40)
{
value=a36[a39][a40];
if(isStacked)
a38+=value;
else
{
maxValue=Math.max(maxValue,value);
minValue=Math.min(minValue,value);
}
}
if(isStacked)
{
maxValue=Math.max(maxValue,a38);
minValue=Math.min(minValue,a38);
}
}
var a41=maxValue>0?ApacheChart._MAX_MULTIPLIER:ApacheChart._MIN_MULTIPLIER,
minMult=minValue>0?ApacheChart._MIN_MULTIPLIER:ApacheChart._MAX_MULTIPLIER;
return{max:maxValue*a41,min:minValue*minMult};
}
ApacheChart.TYPE_VBAR=1;
ApacheChart.TYPE_HBAR=2;
ApacheChart.TYPE_VBAR_STACKED=3;
ApacheChart.TYPE_HBAR_STACKED=4;
ApacheChart.TYPE_PIE=5;
ApacheChart.TYPE_AREA=6;
ApacheChart.TYPE_AREA_STACKED=7;
ApacheChart.TYPE_LINE=8;
ApacheChart.TYPE_BAR_LINE_COMBO=9;
ApacheChart.TYPE_XYLINE=10;
ApacheChart.TYPE_SCATTER_PLOT=11;
ApacheChart.TYPE_RADAR=12;
ApacheChart.TYPE_RADAR_AREA=13;
ApacheChart.TYPE_FUNNEL=14;
ApacheChart.CIRCULAR_GAUGE=15;
ApacheChart.SEMI_CIRCULAR_GAUGE=16;
ApacheChart.LEGEND_LOCATION_NONE="none";
ApacheChart.LEGEND_LOCATION_TOP="top";
ApacheChart.LEGEND_LOCATION_END="end";
ApacheChart.LEGEND_LOCATION_BOTTOM="bottom";
ApacheChart.LEGEND_LOCATION_START="start";
ApacheChart._MAX_MULTIPLIER=1.2;
ApacheChart._MIN_MULTIPLIER=.8;
ApacheChart._XOFFSET_PERSPECTIVE=10;
ApacheChart._YOFFSET_PERSPECTIVE=5;
ApacheChart._TEXT_MARGIN=4;
ApacheChart._DEFAULT_STOP_OPACITY=.9;
ApacheChart._BORDER_SIZE=6;
ApacheChart._ANIMATE_INTERVAL=66;
ApacheChart._SVGCHECK_INTERVAL=100;
ApacheChart._SVGCHECK_STATUS_LIMIT=5000;
ApacheChart._SVGCHECK_MAX_LIMIT=20000;
ApacheChart.createChart=function(
a42,
a43,
a44,
a45,
a46)
{
var a47=null;
if(a42==this.TYPE_VBAR||a42==this.TYPE_VBAR_STACKED||a42==this.TYPE_BAR_LINE_COMBO)
{
a47=new ApacheBarChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_HBAR||a42==this.TYPE_HBAR_STACKED)
{
a47=new ApacheHBarChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_PIE)
{
a47=new ApachePieChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_AREA||a42==this.TYPE_AREA_STACKED)
{
a47=new ApacheAreaChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_LINE)
{
a47=new ApacheLineChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_SCATTER_PLOT)
{
a47=new ApacheScatterPlotChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_XYLINE)
{
a47=new ApacheXYLineChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_RADAR||a42==this.TYPE_RADAR_AREA)
{
a47=new ApacheRadarChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.TYPE_FUNNEL)
{
a47=new ApacheFunnelChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.SEMI_CIRCULAR_GAUGE)
{
a47=new ApacheSemiGaugeChart(a42,a43,a44,
a45,a46);
}
else if(a42==this.CIRCULAR_GAUGE)
{
a47=new ApacheGaugeChart(a42,a43,a44,
a45,a46);
}
return a47;
}
ApacheChart.prototype.setPerspective=function(a48)
{
this._isPerspective=a48;
}
ApacheChart.prototype.clear=function()
{
var a49=this._rootElement;
var a50=a49.firstChild;
while(a50)
{
a49.removeChild(a50);
a50=a49.firstChild;
}
}
ApacheChart.prototype.draw=function()
{
if(!this._initDocument())
return;
if(this._gradientsUsed&&!this._gradientsInitialized)
{
this.InitializeGradients();
this._gradientsInitialized=true;
}
if(this._tooltipsVisible)
{
this.ShowToolTipCallback=TrUIUtils.createCallback(this,this.ShowToolTip);
this.HideToolTipCallback=TrUIUtils.createCallback(this,this.HideToolTip);
}
this.ClickCallback=TrUIUtils.createCallback(this,this.Click);
this.DrawBorder();
this.DrawTitles();
this.DrawGroupLabels();
this.DrawYValueLabels();
this.AdjustMarginsForGroupLabels();
this.AdjustMarginsForYLabels();
this.DrawLegend();
this.LayoutGroupLabels();
this.LayoutYValueLabels();
this.DrawGrid();
this.DrawChartData();
this.Animate();
}
ApacheChart.prototype._initDocument=function()
{
var a51=document.getElementById(this._svgEmbedId);
var a52=this._isIE;
if(a52&&!ApacheChart.isASVInstalled())
{
this._displayErrorHtml(a51);
return false;
}
try
{
var a53=a51.getSVGDocument();
this._rootElement=a53.getElementById("chartRoot");
if(!this._rootElement)
throw"not yet loaded";
this._svgDoc=a53;
this._width=a51.clientWidth;
this._height=a51.clientHeight;
if(this._errorTextNode!=null)
{
a51.parentNode.removeChild(this._errorTextNode);
a51.style.display="";
}
}
catch(e)
{
this._svgCheckTotal+=ApacheChart._SVGCHECK_INTERVAL;
if(this._svgCheckTotal>ApacheChart._SVGCHECK_MAX_LIMIT)
{
this._displayErrorHtml(a51);
return false;
}
else if(null==this._errorTextNode&&
this._svgCheckTotal>ApacheChart._SVGCHECK_STATUS_LIMIT)
{
this._displayStatusHtml(a51);
}
if(!this._drawCallback)
this._drawCallback=TrUIUtils.createCallback(this,this.draw);
window.setTimeout(this._drawCallback,ApacheChart._SVGCHECK_INTERVAL);
return false;
}
return true;
}
ApacheChart.prototype._displayStatusHtml=function(a54)
{
var a55=this._errorTextNode=document.createElement("span");
a55.innerHTML=this._statusHtml;
a54.parentNode.insertBefore(a55,a54);
a54.style.display="none";
}
ApacheChart.prototype._displayErrorHtml=function(a56)
{
if(this._errorTextNode)
{
this._errorTextNode.innerHTML=this._errorHtml;
return;
}
else
{
var a57=this._errorTextNode=document.createElement("span");
a57.innerHTML=this._errorHtml;
a56.parentNode.insertBefore(a57,a56);
}
a56.style.display="none";
}
ApacheChart.prototype.DrawChartData=function()
{
}
ApacheChart.prototype.Animate=function()
{
var a58=this._animDuration;
if(a58>0)
{
if(this._animCallback==null)
this._animCallback=TrUIUtils.createCallback(this,this.DoAnimation);
this._startTime=(new Date()).getTime();
this._intervalId=window.setInterval(this._animCallback,ApacheChart._ANIMATE_INTERVAL);
}
}
ApacheChart.prototype.DoAnimation=function()
{
var a59=this._animDuration;
var a60=(new Date()).getTime()-this._startTime;
if(a60>=a59)
{
window.clearInterval(this._intervalId);
this.SetDataAnimStep(1);
this.SetLabelsAnimStep(1);
this.SetGridAnimStep(1);
delete this._dataElems;
delete this._labelElems;
delete this._gridElems;
}
else
{
var a61=(a60)/a59;
this.SetDataAnimStep(a61);
this.SetLabelsAnimStep(a61);
this.SetGridAnimStep(a61);
}
}
ApacheChart.prototype.SetDataAnimStep=function(a62)
{
var a63=this._dataElems,animCount=a63.length;
var a64=this._margins,animHorizontal=this.AnimAlongXAxis();
if(animHorizontal)
{
var a65=a64.left;
for(var a66=0;a66<animCount;++a66)
{
var a67=(1-a62)*a65;
a63[a66].setAttribute("transform","translate("+a67+",0) scale("+a62+",1)");
}
}
else
{
var a68=a64.bottom,cy=(this._height-a68);
for(var a66=0;a66<animCount;++a66)
{
var a69=(1-a62)*cy;
a63[a66].setAttribute("transform","translate(0,"+a69+") scale(1,"+a62+")");
}
}
}
ApacheChart.prototype.AnimAlongXAxis=function(a70)
{
return false;
}
ApacheChart.prototype.SetLabelsAnimStep=function(a71)
{
var a72=this._labelElems,animCount=a72.length;
for(var a73=0;a73<animCount;++a73)
{
a72[a73].setAttribute("fill-opacity",a71);
}
}
ApacheChart.prototype.SetGridAnimStep=function(a74)
{
var a75=this._gridElems,animCount=a75.length;
var a76=this._margins,animHorizontal=this.AnimAlongXAxis();
if(animHorizontal)
{
var a77=a76.bottom,cy=(this._height-a77);
for(var a78=0;a78<animCount;++a78)
{
var a79=(1-a74)*cy;
a75[a78].setAttribute("transform","translate(0,"+a79+") scale(1,"+a74+")");
}
}
else
{
var a80=a76.left;
for(var a78=0;a78<animCount;++a78)
{
var a81=(1-a74)*a80;
a75[a78].setAttribute("transform","translate("+a81+",0) scale("+a74+",1)");
}
}
}
ApacheChart.prototype.InitializeGradients=function()
{
var a82=this._svgDoc,model=this._model,seriesColors=model.getSeriesColors(),
seriesCount=model.getSeriesLabels().length;
var a83=a82.getElementById("gradients");
ApacheChartObj.Assert(a83,"No Gradients element in the SVG document");
var a84=a83.childNodes;
ApacheChartObj.Assert(a83.childNodes.length>1,"No Gradient Template in the SVG document");
var a85,gradientTemplate=null;
for(var a86=0;a86<seriesCount;++a86)
{
a85=a82.getElementById("gradient"+a86);
if(a85==null)
{
if(gradientTemplate==null)
{
gradientTemplate=a83.firstChild;
while(gradientTemplate.nodeType==3&&gradientTemplate!=null)
gradientTemplate=gradientTemplate.nextSibling;
}
a85=gradientTemplate.cloneNode(true);
a85.id="gradient"+a86;
a83.appendChild(a85);
}
var a87=a85.firstChild;
var a88=0;
while(a87)
{
if(a87.nodeName=="stop")
{
var a89=seriesColors[a86];
a89=(a88==0)?a89:this._getLighterColor(a89);
a87.setAttribute("stop-color",a89);
this.SetStopOpacity(a87);
if(a88>=1)
break;
a88++;
}
a87=a87.nextSibling;
}
}
}
ApacheChart.prototype.SetStopOpacity=function(a90)
{
a90.setAttribute("stop-opacity",ApacheChart._DEFAULT_STOP_OPACITY);
}
ApacheChart.prototype._getLighterColor=function(a91)
{
if(a91.indexOf("#")>=0)
{
a91=a91.substr(1);
var a92=a91.substr(0,2),gVal=a91.substr(2,2),bVal=a91.substr(4);
a91="#"+this._getLighterNumberStr(a92)+this._getLighterNumberStr(gVal)+
this._getLighterNumberStr(bVal);
}
else
{
a91=a91.toLowerCase().replace(" ","");
a91=a91.substring(4,a91.length-1);
var a93=a91.split(",");
a91="#"+this._getLighterNumberStr(a93[0])+this._getLighterNumberStr(a93[1])+
this._getLighterNumberStr(a93[2]);
}
return a91;
}
ApacheChart.prototype._getLighterNumberStr=function(a94)
{
var a95=Math.round(parseInt(a94,16)*1.7);
if(a95>255)
a95=255;
return ApacheChart._to_hex(a95);
}
ApacheChart._to_hex=function(a96)
{
var a97=ApacheChart._digit_array;
if(a97==null)
{
a97=ApacheChart._digit_array=
['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
}
var a98=''
var a99=true;
for(var a100=32;a100>0;)
{
a100-=4;
var a101=(a96>>a100)&0xf;
if(!a99||a101!=0)
{
a99=false;
a98+=a97[a101];
}
}
return''+(a98==''?'0':a98);
}
ApacheChart.prototype.DrawBorder=function()
{
var a102=this._svgDoc,rootElem=this._rootElement;
var a103=a102.getElementById("borderPrototype").cloneNode(false);
var a104=ApacheChart._BORDER_SIZE,stroke=a104/2;
a103.setAttribute("x",0);
a103.setAttribute("y",0);
a103.setAttribute("rx",stroke);
a103.setAttribute("ry",stroke);
a103.setAttribute("width",this._width-stroke);
a103.setAttribute("height",this._height-stroke);
a103.setAttribute("stroke-width",stroke);
rootElem.appendChild(a103);
var a105=this._margins;
a105.left+=a104;
a105.right+=a104;
a105.top+=a104;
a105.bottom+=a104;
}
ApacheChart.prototype.DrawTitles=function()
{
var a106=this._model,title=a106.getTitle(),
subTitle=a106.getSubTitle(),footNote=a106.getFootNote();
if(title)
this._drawTitleElem("titleTextPrototype",title,false);
if(subTitle)
this._drawTitleElem("subTitleTextPrototype",subTitle,false);
if(footNote)
this._drawTitleElem("footNoteTextPrototype",footNote,true);
}
ApacheChart.prototype._drawTitleElem=function(a107,a108,a109)
{
var a110=this._svgDoc,rootElem=this._rootElement;
var a111=this._margins,gridWidth=(this._width-a111.left-a111.right);
var a112=this._labelElems,animate=(this._animDuration>0);
var a113=a110.getElementById(a107).cloneNode(true);
if(animate)
{
a112.push(a113);
a113.setAttribute("fill-opacity","0");
}
a113.firstChild.data=a108;
rootElem.appendChild(a113);
var a114=a113.getBBox(),textWidth=a114.width,dx=a111.left;
if(a109&&this._width>textWidth+a111.right)
dx=(this._width-textWidth)-a111.right;
if(!a109&&gridWidth>textWidth)
dx=(gridWidth-textWidth)/2+a111.left;
a113.setAttribute("x",dx);
if(a109)
{
a113.setAttribute("y",this._height-a111.bottom);
a111.bottom+=a114.height+ApacheChart._TEXT_MARGIN;
}
else
{
a111.top+=a114.height;
a113.setAttribute("y",a111.top);
a111.top+=ApacheChart._TEXT_MARGIN;
}
}
ApacheChart.prototype.DrawGroupLabels=function()
{
var a115=this._svgDoc,rootElem=this._rootElement,model=this._model;
var a116=a115.createElementNS("http://www.w3.org/2000/svg","g");
this._hLabelContainer=a116;
var a117=model.getGroupLabels(),vLineCount=a117.length;
var a118,labelElems=this._labelElems,animate=(this._animDuration>0);
var a119,gLabelElems=this._groupLabelElems;
for(var a120=0;a120<vLineCount;++a120)
{
if(a120==0)
{
a118=a115.getElementById("groupLabelPrototype");
}
a119=a117[a120];
if(!a119)
continue;
a118=a118.cloneNode(true);
if(animate)
{
labelElems.push(a118);
a118.setAttribute("fill-opacity","0");
}
a118.firstChild.data=a119;
a116.appendChild(a118);
gLabelElems[a120]=a118;
}
rootElem.appendChild(a116);
}
ApacheChart.prototype.LayoutGroupLabels=function()
{
var a121=this._model,margins=this._margins,marginLeft=margins.left;
var a122=this._hLabelContainer,childNodes=a122.childNodes;
if(childNodes.length==0)
return;
if(this._isPerspective)
marginLeft+=ApacheChart._XOFFSET_PERSPECTIVE;
var a123=(this._width-marginLeft-margins.right);
var a124=this.IsGroupLabelCentered();
var a125=a121.getGroupLabels(),vLineCount=a125.length;
var a126,groupWidth=a123/(a124?vLineCount:vLineCount-1);
var a127=0,dy=this._height-margins.bottom+a122.getBBox().height+ApacheChart._TEXT_MARGIN;
var a128=this._groupLabelElems;
for(var a129=0;a129<vLineCount;++a129)
{
a126=a128[a129];
if(!a126)
continue;
a126.setAttribute("y",dy);
var a130=a126.getBBox().width;
if(a124)
{
if(groupWidth>a130)
a127=(groupWidth-a130)/2;
else
a127=2;
}
else
{
a127=(-a130)/2;
if(this._isPerspective)
a127-=ApacheChart._XOFFSET_PERSPECTIVE;
}
a126.setAttribute("x",marginLeft+a127+a129*groupWidth);
}
}
ApacheChart.prototype.IsGroupLabelCentered=function()
{
return true;
}
ApacheChart.prototype.AdjustMarginsForGroupLabels=function()
{
var a131=this._hLabelContainer;
if(a131&&a131.childNodes.length>0)
{
this._margins.bottom+=a131.getBBox().height+ApacheChart._TEXT_MARGIN;
var a132=this.IsGroupLabelCentered();
if(!a132)
{
var a133=a131.lastChild.getBBox().width;
if(a133/2>this._margins.right)
this._margins.right=a133/2;
}
}
}
ApacheChart.prototype.DrawLegend=function()
{
var a134=this._legendPosition;
if(a134==ApacheChart.LEGEND_LOCATION_NONE)
{
return;
}
var a135=this._svgDoc,rootElem=this._rootElement,model=this._model;
var a136=this._gradientsUsed;
var a137=model.getSeriesLabels(),seriesCount=a137.length,
seriesColors=model.getSeriesColors();
var a138,rectElem,legendRectHeight,
legendGroup=a135.createElementNS("http://www.w3.org/2000/svg","g");
var a139=this._margins,marginLeft=a139.left,marginTop=a139.top;
var a140=this._labelElems,animate=(this._animDuration>0);
rootElem.appendChild(legendGroup);
if(this._isPerspective)
{
marginLeft+=ApacheChart._XOFFSET_PERSPECTIVE;
}
var a141=(this._width-marginLeft-a139.right),
gridHeight=(this._height-marginTop-a139.bottom);
if(animate)
{
a140.push(legendGroup);
legendGroup.setAttribute("fill-opacity","0");
}
var a142=0,dy=0,tx=marginLeft,ty=this._height-a139.bottom;
var a143=(a134==ApacheChart.LEGEND_LOCATION_START||
a134==ApacheChart.LEGEND_LOCATION_END)
for(var a144=0;a144<seriesCount;++a144)
{
if(a144==0)
{
a138=a135.getElementById("legendTextPrototype");
rectElem=a135.getElementById("legendRectPrototype");
legendRectHeight=parseInt(rectElem.getAttribute("height"));
}
if(a143)
a142=0;
rectElem=rectElem.cloneNode(false);
rectElem.setAttribute("x",a142);
rectElem.setAttribute("y",dy-legendRectHeight);
if(a136)
rectElem.setAttribute("fill","url(#gradient"+a144+")");
else
rectElem.setAttribute("fill",seriesColors[a144]);
rectElem.setAttribute("stroke","#000000");
legendGroup.appendChild(rectElem);
a142+=1.5*legendRectHeight;
a138=a138.cloneNode(true);
a138.setAttribute("x",a142);
a138.setAttribute("y",dy);
a138.firstChild.data=a137[a144];
legendGroup.appendChild(a138);
if(!a143)
a142+=a138.getBBox().width+legendRectHeight;
else
dy+=1.5*legendRectHeight;
if(a144==0&&!a143)
{
var a145=a138.getBBox();
if(a134==ApacheChart.LEGEND_LOCATION_TOP)
{
ty=this.SetLegendTopAdjustment(a139.top+a145.height);
a139.top+=a145.height+ApacheChart._TEXT_MARGIN;
}
else
{
ty=this.SetLegendBottomAdjustment(ty);
a139.bottom+=a145.height+ApacheChart._TEXT_MARGIN;
}
}
}
if(!a143&&a141>a142)
tx=(a141-a142)/2+marginLeft;
if(a143)
{
var a146=legendGroup.getBBox();
if(a134==ApacheChart.LEGEND_LOCATION_START)
{
tx=this.SetLegendLeftAdjustment(a139.left);
a139.left+=a146.width+ApacheChart._TEXT_MARGIN;
}
else
{
a139.right+=a146.width+ApacheChart._TEXT_MARGIN;
tx=this._width-a139.right+ApacheChart._TEXT_MARGIN;
tx=this.SetLegendRightAdjustment(tx);
}
if(gridHeight>dy)
ty=(gridHeight-a146.height)/2+marginTop;
else
ty=gridHeight+marginTop-a146.height;
}
legendGroup.setAttribute("transform","translate("+tx+","+ty+")");
}
ApacheChart.prototype.SetLegendTopAdjustment=function(a147)
{
return a147;
}
ApacheChart.prototype.SetLegendBottomAdjustment=function(a148)
{
var a149=this._hLabelContainer;
if(a149&&a149.childNodes.length>0)
{
a148+=a149.getBBox().height+ApacheChart._TEXT_MARGIN;
}
return a148;
}
ApacheChart.prototype.SetLegendLeftAdjustment=function(a150)
{
var a151=this._vLabelContainer;
if(a151)
{
a150-=a151.getBBox().width+ApacheChart._TEXT_MARGIN;
}
return a150;
}
ApacheChart.prototype.SetLegendRightAdjustment=function(a152)
{
return a152;
}
ApacheChart.prototype.DrawGrid=function()
{
if(this._isPerspective)
this.DrawPerspectiveGrid();
else
this.Draw2DGrid();
}
ApacheChart.prototype.Draw2DGrid=function()
{
var a153=this._svgDoc,model=this._model,margins=this._margins;
var a154=this._gridElems,animate=(this._animDuration>0);
var a155=margins.left,marginTop=margins.top;
var a156=(this._width-a155-margins.right);
var a157=(this._height-marginTop-margins.bottom);
var a158=this._gradientsUsed;
var a159=a153.getElementById("gridRectPrototype").cloneNode(false);
a159.setAttribute("x",margins.left);
a159.setAttribute("y",(marginTop));
a159.setAttribute("width",a156);
a159.setAttribute("height",a157);
if(a158)
a159.setAttribute("fill","url(#gridGradient)");
this._rootElement.appendChild(a159);
var a160=a153.getElementById("gridPathPrototype").cloneNode(false);
if(animate)
{
a154.push(a160);
a160.setAttribute("transform","scale(0.00001,1)");
}
var a161=new ApacheChartBuffer(),vLineCount=this.GetVLineCount(),hLineCount=this.GetHLineCount();
for(var a162=0;a162<hLineCount-1;++a162)
{
a161.append("M").append(a155).append(",").append((a162+1)*a157/hLineCount+marginTop);
a161.append("h").append(a156);
}
for(var a162=0;a162<vLineCount-1;++a162)
{
a161.append("M").append(a155+((a162+1)*a156/vLineCount)).append(",").append(marginTop);
a161.append("v").append(a157);
}
a160.setAttribute("d",a161.toString());
a160.removeAttribute("id");
this._rootElement.appendChild(a160);
}
ApacheChart.prototype.GetVLineCount=function()
{
var a163=this._xMajorGridCount;
if(a163>=0)
return a163;
else
return this._model.getGroupLabels().length;
}
ApacheChart.prototype.GetHLineCount=function()
{
return this._yMajorGridCount;
}
ApacheChart.prototype.DrawPerspectiveGrid=function()
{
var a164=this._svgDoc,model=this._model,margins=this._margins;
var a165=this._gridElems,animate=(this._animDuration>0);
var a166=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a167=margins.left,marginTop=margins.top;
var a168=(this._width-a167-margins.right-a166);
var a169=(this._height-marginTop-margins.bottom-yOffset);
var a170=a164.getElementById("gridRectPrototype").cloneNode(false);
var a171=this._gradientsUsed;
a170.setAttribute("x",a167+ApacheChart._XOFFSET_PERSPECTIVE);
a170.setAttribute("y",marginTop);
a170.setAttribute("width",(a168));
a170.setAttribute("height",(a169));
if(a171)
a170.setAttribute("fill","url(#gridGradient)");
a170.removeAttribute("id");
this._rootElement.appendChild(a170);
var a172=new ApacheChartBuffer();
var a173=a164.getElementById("gridPath3dRectPrototype").cloneNode(false);
a172.append("M").append(a167+a166).append(",").append(marginTop);
a172.append("l").append(-a166).append(",").append(yOffset);
a172.append("v").append(a169);
a172.append("l").append(a166).append(",").append(-yOffset);
a172.append("m").append(a168).append(",").append(0);
a172.append("l").append(-a166).append(",").append(yOffset);
a172.append("h").append(-a168);
if(a171)
a173.setAttribute("fill","url(#gridGradient)");
a173.setAttribute("d",a172.toString());
a173.removeAttribute("id");
this._rootElement.appendChild(a173);
a173=a164.getElementById("gridPathPrototype").cloneNode(false);
if(animate)
{
a173.setAttribute("transform","scale(0.00001,1)");
a165.push(a173);
}
var a174=this.GetVLineCount(),hLineCount=this.GetHLineCount();
a172=new ApacheChartBuffer();
for(var a175=0;a175<hLineCount-1;++a175)
{
a172.append("M").append(a167).append(",").append((a175+1)*a169/hLineCount+marginTop+yOffset);
a172.append("l").append(a166).append(",").append(-yOffset);
a172.append("h").append(a168);
}
for(var a175=0;a175<a174-1;++a175)
{
a172.append("M").append(a167+a166+((a175+1)*a168/a174)).append(",").append(marginTop);
a172.append("v").append(a169);
a172.append("l").append(-a166).append(",").append(yOffset);
}
a173.setAttribute("d",a172.toString());
this._rootElement.appendChild(a173);
}
ApacheChart.prototype.DrawYValueLabels=function()
{
var a176=this._svgDoc,rootElem=this._rootElement,model=this._model;
var a177=a176.createElementNS("http://www.w3.org/2000/svg","g");
this._vLabelContainer=a177;
var a178=model.getMinYValue(),maxValue=model.getMaxYValue();
var a179=this._labelElems,animate=(this._animDuration>0);
var a180=a176.getElementById("yLabelPrototype").cloneNode(true);
if(animate)
{
a179.push(a180);
a180.setAttribute("fill-opacity","0");
}
a180.firstChild.data=this._formatValue(a178);
a177.appendChild(a180);
a180=a180.cloneNode(true);
if(animate)
{
a179.push(a180);
a180.setAttribute("fill-opacity","0");
}
a180.firstChild.data=this._formatValue(maxValue);
a177.appendChild(a180);
var a181=this._yMajorGridCount;
for(var a182=0;a182<a181-1;++a182)
{
var a183=((maxValue-a178)*(a182+1)/a181)+a178;
a180=a180.cloneNode(true);
if(animate)
{
a179.push(a180);
a180.setAttribute("fill-opacity","0");
}
a180.firstChild.data=this._formatValue(a183);
a177.appendChild(a180);
}
rootElem.appendChild(a177);
}
ApacheChart.prototype._formatValue=function(a184)
{
var a185=this._decimalSep;
if(a185==null)
{
var a186=window.getLocaleSymbols?getLocaleSymbols():null;
if(a186)
{
this._decimalSep=a186.getDecimalSeparator();
}
else
this._decimalSep=".";
a185=this._decimalSep;
}
a184=a184.toFixed(this._maxPrecision);
a184=a184.toString();
if(a184.indexOf(a185)==-1)
{
a184=a184.replace(".",a185);
}
return a184;
}
ApacheChart.prototype.AdjustMarginsForYLabels=function()
{
var a187=this._vLabelContainer;
if(a187&&a187.childNodes.length>0)
this._margins.left+=a187.getBBox().width+ApacheChart._TEXT_MARGIN;
}
ApacheChart.prototype.LayoutYValueLabels=function()
{
var a188=this._model,margins=this._margins;
var a189=margins.left,marginTop=margins.top;
var a190=this._vLabelContainer,childNodes=a190.childNodes;
var a191=(this._height-marginTop-margins.bottom);
if(this._isPerspective)
a191-=ApacheChart._YOFFSET_PERSPECTIVE;
var a192=a190.getBBox(),textHeight=a192.height;
this.SetVerticalLabelAt(childNodes.item(0),a191+marginTop,
a189,textHeight);
this.SetVerticalLabelAt(childNodes.item(1),marginTop,
a189,textHeight);
var a193=this._yMajorGridCount;
for(var a194=0;a194<a193-1;++a194)
{
this.SetVerticalLabelAt(childNodes.item(a194+2),
(a193-a194-1)*a191/a193+marginTop,
a189,textHeight);
}
}
ApacheChart.prototype.SetVerticalLabelAt=function(
a195,a196,a197,a198)
{
if(this._isPerspective)
a196+=ApacheChart._YOFFSET_PERSPECTIVE;
var a199=ApacheChart._TEXT_MARGIN,
textLength=a195.getBBox().width,dx=a199;
if(a197>textLength+a199)
dx=a197-textLength-a199;
a195.setAttribute("x",dx);
a195.setAttribute("y",a196+a198/2);
}
ApacheChart.prototype.DrawGroupLabelTitle=function(
a200,a201,a202,a203,a204,
a205,a206)
{
if(!a200)
return a206;
var a207=this._labelElems,animate=(this._animDuration>0);
a202.setAttribute("y",a204+a206);
a202.firstChild.data=a200;
a201.appendChild(a202);
var a208=a202.getBBox();
var a209=a208.width;
if(a205>a209)
a203+=(a205-a209)/2;
else
a203+=2;
a202.setAttribute("x",a203);
if(animate)
a207.push(a202);
a206-=a208.height+ApacheChart._TEXT_MARGIN;
return a206;
}
ApacheChart.prototype.ShowToolTip=function(a210)
{
if(this._toolTipVisible)
return;
var a211=this._model,seriesColors=a211.getSeriesColors();
var a212=this.getToolTip();
if(a212==null)
{
a212=this._svgDoc.getElementById("toolTip").cloneNode(true);
this.setToolTip(a212);
this._rootElement.appendChild(a212);
}
a212.style.setProperty("visibility","visible","");
var a213=a212.firstChild.nextSibling;
var a214=a213.nextSibling.nextSibling;
this.FillToolTipData(a214,a213,a210);
var a215=a212.getBBox();
var a216=this.GetToolTipLocation(a210,a215);
var a217=a216.x,dy=a216.y;
if(a217+a215.width>this._width)
{
a217-=a215.width;
a213.setAttribute("cx",a214.getBBox().width);
}
else
{
a213.setAttribute("cx",0);
}
if(dy-a215.height<0)
{
dy+=a215.height;
a213.setAttribute("cy",0);
}
else
{
a213.setAttribute("cy",a214.getBBox().height);
}
if(this._isPerspective&&this._type!=ApacheChart.TYPE_PIE)
dy+=ApacheChart._YOFFSET_PERSPECTIVE/2
a212.setAttribute("transform","translate("+a217+","+dy+")");
this._toolTipVisible=true;
}
ApacheChart.prototype.GetToolTipLocation=function(a218,a219)
{
var a220=a218.target.getBBox();
return{x:(a220.x+a220.width/2),y:(a220.y-a219.height)};
}
ApacheChart.prototype.GetChartEvent=function(a221)
{
var a222=a221.target;
var a223=parseInt(a222.getAttribute("yValueIndex")),
j=parseInt(a222.getAttribute("seriesIndex"));
var a224=this._model,yValues=a224.getYValues();
return new ApacheChartEvent([j],[a223],[yValues[a223][j]],null);
}
ApacheChart.prototype.FillToolTipData=function(a225,a226,a227)
{
var a228=this.GetChartEvent(a227);
var a229=a228.getSeriesIndices()[0];
var a230=this._model,groupLabels=a230.getGroupLabels(),
seriesLabels=a230.getSeriesLabels(),
yValues=a228.getYValues();
var a231=a225.nextSibling.nextSibling;
a231.firstChild.data=seriesLabels[a229];
var a232=a231.getBBox().width;
a231=a231.nextSibling.nextSibling;
a231.firstChild.data=this._formatValue(yValues[0]);
var a233=a231.getBBox().width;
var a234=ApacheChart._TEXT_MARGIN,dx=a234;
if(a232>a233)
dx=(a232-a233)/2+a234;
a231.setAttribute("x",dx);
var a235=Math.max(a232,a233)+2*a234;
a225.setAttribute("width",a235);
a225.setAttribute("stroke",seriesColors[a229]);
a226.setAttribute("stroke",seriesColors[a229]);
}
ApacheChart.prototype.HideToolTip=function(a236)
{
var a237=this.getToolTip();
if(a237)
a237.style.setProperty("visibility","hidden","");
this._toolTipVisible=false;
}
ApacheChart.prototype.Click=function(a238)
{
var a239=this.GetChartEvent(a238);
var a240=this._formName;
if(a240!=null)
{
var a241=document.getElementById(this._svgEmbedId);
var a242=a241.parentNode.id;
var a243={'event':'chartDrillDown',
'source':a242,
'value':a239.marshall()};
if(this._partialSubmit)
{
_submitPartialChange(a240,'0',a243);
}
else
{
submitForm(a240,'0',a243);
}
}
else
alert(a239);
}
function ApacheBarChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheBarChart);
ApacheBarChart.prototype.DrawChartData=function()
{
var a5=this._type==ApacheChart.TYPE_BAR_LINE_COMBO;
var a6=this._isPerspective;
if(a6)
this._drawPerspectiveBars(a5);
else
this._drawBars(a5);
if(a5)
{
if(a6)
this.__drawPerspectiveLines=ApacheLineChart.prototype.__drawPerspectiveLines;
else
this.__drawLines=ApacheLineChart.prototype.__drawLines;
ApacheLineChart.prototype.DrawChartData.call(this,a5);
}
}
ApacheBarChart.prototype._drawBars=function(a7)
{
var a8=this._svgDoc,model=this._model,margins=this._margins;
var a9=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a10=margins.left,marginTop=margins.top;
var a11=(this._width-a10-margins.right);
var a12=(this._height-marginTop-margins.bottom);
var a13=a8.getElementById("barRectPrototype");
var a14=ApacheBarChart._BARITEM_PADDING;
var a15=(this._type==ApacheChart.TYPE_VBAR_STACKED);
var a16=model.getGroupLabels(),groupCount=a16.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a17=model.getSeriesColors(),yValues=model.getYValues();
var a18=model.getMinYValue(),maxValue=model.getMaxYValue();
var a19=a15?1:(a7?Math.ceil(seriesCount/2):seriesCount);
var a20=yValues.length;
var a21=(a11/Math.max(a20,groupCount)-2*a14)/a19;
var a22=a10,dy,barHeight,stackBase=a18;
var a23=this._gradientsUsed;
var a24="scale(1,0.00001)";
for(var a25=0;a25<a20;++a25)
{
a22+=a14;
dy=a12+marginTop;
for(var a26=0;a26<seriesCount;++a26)
{
if(a7&&a26%2>0)
continue;
if(a15)
stackBase=(a26==0?a18:0);
a13=a13.cloneNode(false);
if(animate)
{
dataElems.push(a13);
a13.setAttribute("transform",a24);
}
a13.setAttribute("x",a22);
barHeight=a12*(yValues[a25][a26]-stackBase)/(maxValue-a18);
if(a15)
dy-=barHeight;
else
dy=a12+marginTop-barHeight;
a13.setAttribute("y",dy);
a13.setAttribute("width",a21);
a13.setAttribute("height",barHeight);
if(a23)
a13.setAttribute("fill","url(#gradient"+a26+")");
else
a13.setAttribute("fill",a17[a26]);
a13.setAttribute("stroke",a17[a26]);
a13.setAttribute("stroke-width",1);
a13.setAttribute("yValueIndex",a25);
a13.setAttribute("seriesIndex",a26);
if(this._tooltipsVisible)
{
a13.addEventListener("mouseover",this.ShowToolTipCallback,false);
a13.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a13.addEventListener("click",this.ClickCallback,false);
a9.appendChild(a13);
if(!a15)
a22+=a21;
}
if(a15)
a22+=a21;
a22+=a14;
}
}
ApacheBarChart.prototype._drawPerspectiveBars=function(a27)
{
var a28=this._svgDoc,model=this._model,margins=this._margins;
var a29=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a30=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a31=margins.left,marginTop=margins.top;
var a32=(this._width-a31-margins.right-a30);
var a33=(this._height-marginTop-margins.bottom-yOffset);
var a34=a28.getElementById("barPathPrototype");
var a35=ApacheBarChart._BARITEM_PADDING;
var a36=(this._type==ApacheChart.TYPE_VBAR_STACKED);
var a37=model.getGroupLabels(),groupCount=a37.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a38=model.getSeriesColors(),yValues=model.getYValues();
var a39=model.getMinYValue(),maxValue=model.getMaxYValue();
var a40=a27?Math.ceil(seriesCount/2):seriesCount,barWidth;
var a41=yValues.length;
if(a36)
barWidth=a32/Math.max(a41,groupCount)-2*a35;
else
barWidth=(a32/Math.max(a41,groupCount)-2*a35-(a40)*a35)/a40;
var a42=a31,dy,barHeight,stackBase=a39;
var a43=this._gradientsUsed;
var a44="scale(1, 0.00001)";
for(var a45=0;a45<a41;++a45)
{
a42+=a35;
dy=a33+marginTop+yOffset;
for(var a46=0;a46<seriesCount;++a46)
{
if(a27&&a46%2>0)
continue;
if(a36)
stackBase=(a46==0?a39:0);
barHeight=a33*(yValues[a45][a46]-stackBase)/(maxValue-a39);
if(a36)
dy-=barHeight;
else
dy=a33+yOffset+marginTop-barHeight;
a34=a34.cloneNode(false);
if(animate)
{
dataElems.push(a34);
a34.setAttribute("transform",a44);
}
var a47=new ApacheChartBuffer();
a47.append("M").append(a42).append(",").append(dy);
a47.append("l").append(a30).append(",").append(-yOffset);
a47.append("h").append(barWidth);
a47.append("v").append(barHeight);
a47.append("l").append(-a30).append(",").append(yOffset);
a47.append("v").append(-barHeight);
a47.append("l").append(a30).append(",").append(-yOffset);
a47.append("l").append(-a30).append(",").append(yOffset);
a47.append("h").append(-barWidth);
a47.append("v").append(barHeight);
a47.append("h").append(barWidth);
a47.append("v").append(-barHeight);
a34.setAttribute("stroke",a38[a46]);
a34.setAttribute("stroke-width",1);
if(a43)
a34.setAttribute("fill","url(#gradient"+a46+")");
else
a34.setAttribute("fill",a38[a46]);
a34.setAttribute("d",a47.toString());
a34.setAttribute("yValueIndex",a45);
a34.setAttribute("seriesIndex",a46);
if(this._tooltipsVisible)
{
a34.addEventListener("mouseover",this.ShowToolTipCallback,false);
a34.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a34.addEventListener("click",this.ClickCallback,false);
a29.appendChild(a34);
if(!a36)
{
a42+=barWidth;
a42+=a35;
}
}
if(a36)
a42+=barWidth;
a42+=a35;
}
}
ApacheBarChart.prototype.ShowToolTip=function(a48)
{
if(this._type==ApacheChart.TYPE_BAR_LINE_COMBO)
{
var a49=parseInt(a48.target.getAttribute("seriesIndex"));
if(a49%2>0)
{
try
{
this.GetToolTipLocation=ApacheLineChart.prototype.GetToolTipLocation;
this.FillToolTipData=ApacheLineChart.prototype.FillToolTipData;
this.GetChartEvent=ApacheLineChart.prototype.GetChartEvent;
ApacheLineChart.prototype.ShowToolTip.call(this,a48);
}
finally
{
this.GetToolTipLocation=ApacheBarChart.prototype.GetToolTipLocation;
this.FillToolTipData=ApacheBarChart.prototype.FillToolTipData;
this.GetChartEvent=ApacheBarChart.prototype.GetChartEvent;
}
return;
}
}
ApacheBarChart.superclass.ShowToolTip.call(this,a48);
}
ApacheBarChart._BARITEM_PADDING=2;
function ApacheHBarChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheHBarChart);
ApacheHBarChart.prototype.DrawChartData=function()
{
if(this._isPerspective)
this._drawPerspectiveBars();
else
this._drawBars();
}
ApacheHBarChart.prototype.AnimAlongXAxis=function()
{
return true;
}
ApacheHBarChart.prototype.DrawYValueLabels=function()
{
var a5=this._svgDoc,rootElem=this._rootElement,model=this._model;
var a6=a5.createElementNS("http://www.w3.org/2000/svg","g");
this._vLabelContainer=a6;
var a7=a5.getElementById("groupLabelPrototype");
var a8=this._labelElems,animate=(this._animDuration>0);
var a9=model.getGroupLabels(),hLineCount=a9.length;
var a10,gLabelElems=this._groupLabelElems;
for(var a11=0;a11<hLineCount;++a11)
{
a10=a9[a11];
if(!a10)
continue;
a7=a7.cloneNode(true);
a7.firstChild.data=a10;
a6.appendChild(a7);
gLabelElems[a11]=a7;
if(animate)
{
a8.push(a7);
a7.setAttribute("fill-opacity","0");
}
}
rootElem.appendChild(a6);
}
ApacheHBarChart.prototype.LayoutYValueLabels=function()
{
var a12=this._model,margins=this._margins,
marginLeft=margins.left,marginTop=margins.top;
var a13=(this._height-marginTop-margins.bottom);
if(this._isPerspective)
a13-=ApacheChart._YOFFSET_PERSPECTIVE;
var a14=this._vLabelContainer,childNodes=a14.childNodes;
if(childNodes.length==0)
return;
var a15,bBox=a14.getBBox(),textHeight=bBox.height;
var a16=a12.getGroupLabels(),hLineCount=a16.length;
var a17=this._groupLabelElems;
for(var a18=0;a18<hLineCount;++a18)
{
a15=a17[a18];
if(!a15)
continue;
this.SetVerticalLabelAt(a15,
(hLineCount-a18)*a13/hLineCount+marginTop-(a13/(2*hLineCount)),
marginLeft,textHeight);
}
}
ApacheHBarChart.prototype.IsGroupLabelCentered=function()
{
return false;
}
ApacheHBarChart.prototype.DrawGroupLabels=function()
{
var a19=this._svgDoc,rootElem=this._rootElement,model=this._model;
var a20=this._yMajorGridCount;
var a21=a19.createElementNS("http://www.w3.org/2000/svg","g");
this._hLabelContainer=a21;
var a22=model.getMinYValue(),maxValue=model.getMaxYValue();
var a23=a19.getElementById("yLabelPrototype");
var a24,labelElems=this._labelElems,animate=(this._animDuration>0);
for(var a25=0;a25<a20+1;++a25)
{
a23=a23.cloneNode(true);
if(animate)
{
labelElems.push(a23);
a23.setAttribute("fill-opacity","0");
}
if(a25==0)
a24=a22;
else if(a25==a20)
a24=maxValue;
else
a24=(((maxValue-a22)*(a25)/a20)+a22);
a23.firstChild.data=this._formatValue(a24);
a21.appendChild(a23);
}
rootElem.appendChild(a21);
}
ApacheHBarChart.prototype.LayoutGroupLabels=function()
{
var a26=this._model,margins=this._margins,marginLeft=margins.left;
var a27=(this._width-marginLeft-margins.right);
var a28=this._hLabelContainer,childNodes=a28.childNodes;
if(this._isPerspective)
a27-=ApacheChart._XOFFSET_PERSPECTIVE;
var a29=this._yMajorGridCount;
var a30,yValWidth=a27/a29;
var a31=a28.getBBox();
var a32=0,dy=this._height-margins.bottom+a31.height+ApacheChart._TEXT_MARGIN;
var a33=this._labelElems,animate=(this._animDuration>0);
for(var a34=0;a34<a29+1;++a34)
{
a30=childNodes.item(a34);
a30.setAttribute("y",dy);
var a35=a30.getBBox().width;
a30.setAttribute("x",marginLeft-a35/2+a34*yValWidth);
}
}
ApacheHBarChart.prototype.GetVLineCount=function()
{
return this._yMajorGridCount;
}
ApacheHBarChart.prototype.GetHLineCount=function()
{
var a36=this._xMajorGridCount;
if(a36>=0)
return a36;
else
return this._model.getGroupLabels().length;
}
ApacheHBarChart.prototype._drawBars=function()
{
var a37=this._svgDoc,model=this._model,margins=this._margins;
var a38=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a39=margins.left,marginTop=margins.top;
var a40=(this._width-a39-margins.right);
var a41=(this._height-marginTop-margins.bottom);
var a42=a37.getElementById("barRectPrototype");
var a43=ApacheBarChart._BARITEM_PADDING;
var a44=(this._type==ApacheChart.TYPE_HBAR_STACKED);
var a45=model.getGroupLabels(),groupCount=a45.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a46=model.getSeriesColors(),yValues=model.getYValues();
var a47=model.getMinYValue(),maxValue=model.getMaxYValue();
var a48=a44?1:seriesCount,stackBase=a47;
var a49=yValues.length;
var a50=(a41/Math.max(a49,groupCount)-2*a43)/a48;
var a51=a39,dy=a41+marginTop,barWidth;
var a52=this._gradientsUsed;
var a53="scale(0.00001,1)";
for(var a54=0;a54<a49;++a54)
{
dy-=a43;
a51=a39;
for(var a55=0;a55<seriesCount;++a55)
{
if(a44)
stackBase=(a55==0?a47:0);
a42=a42.cloneNode(false);
if(animate)
{
dataElems.push(a42);
a42.setAttribute("transform",a53);
}
a42.setAttribute("x",a51);
barWidth=a40*(yValues[a54][a55]-stackBase)/(maxValue-a47);
if(a44)
a51+=barWidth;
a42.setAttribute("y",dy-a50);
a42.setAttribute("width",barWidth);
a42.setAttribute("height",a50);
if(a52)
a42.setAttribute("fill","url(#gradient"+a55+")");
else
a42.setAttribute("fill",a46[a55]);
a42.setAttribute("stroke",a46[a55]);
a42.setAttribute("stroke-width",1);
a42.setAttribute("yValueIndex",a54);
a42.setAttribute("seriesIndex",a55);
if(this._tooltipsVisible)
{
a42.addEventListener("mouseover",this.ShowToolTipCallback,false);
a42.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a42.addEventListener("click",this.ClickCallback,false);
a38.appendChild(a42);
if(!a44)
dy-=a50;
}
if(a44)
dy-=a50;
dy-=a43;
}
}
ApacheHBarChart.prototype._drawPerspectiveBars=function()
{
var a56=this._svgDoc,model=this._model,margins=this._margins;
var a57=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a58=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a59=margins.left,marginTop=margins.top;
var a60=(this._width-a59-margins.right-a58);
var a61=(this._height-marginTop-margins.bottom-yOffset);
var a62=a56.getElementById("barPathPrototype");
var a63=ApacheBarChart._BARITEM_PADDING;
var a64=(this._type==ApacheChart.TYPE_HBAR_STACKED);
var a65=model.getGroupLabels(),groupCount=a65.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a66=model.getSeriesColors(),yValues=model.getYValues();
var a67=model.getMinYValue(),maxValue=model.getMaxYValue();
var a68=yValues.length;
var a69,stackBase=a67;
if(a64)
a69=a61/Math.max(a68,groupCount)-2*a63;
else
a69=(a61/Math.max(a68,groupCount)-2*a63-(seriesCount)*a63)/seriesCount;
var a70=a59,dy=a61+marginTop+yOffset,barWidth;
var a71=this._gradientsUsed;
var a72="scale(0.00001,1)";
for(var a73=0;a73<a68;++a73)
{
dy-=a63;
a70=a59;
for(var a74=0;a74<seriesCount;++a74)
{
if(a64)
stackBase=(a74==0?a67:0);
barWidth=a60*(yValues[a73][a74]-stackBase)/(maxValue-a67);
a62=a62.cloneNode(false);
if(animate)
{
dataElems.push(a62);
a62.setAttribute("transform",a72);
}
var a75=new ApacheChartBuffer();
a75.append("M").append(a70).append(",").append(dy);
a75.append("h").append(barWidth);
a75.append("v").append(-a69);
a75.append("h").append(-barWidth);
a75.append("v").append(a69);
a75.append("M").append(a70).append(",").append(dy-a69);
a75.append("l").append(a58).append(",").append(-yOffset);
a75.append("h").append(barWidth);
a75.append("l").append(-a58).append(",").append(yOffset);
a75.append("z");
a75.append("M").append(a70+barWidth).append(",").append(dy);
a75.append("v").append(-a69);
a75.append("l").append(a58).append(",").append(-yOffset);
a75.append("v").append(a69);
a75.append("z");
a62.setAttribute("stroke",a66[a74]);
a62.setAttribute("stroke-width",1);
if(a71)
a62.setAttribute("fill","url(#gradient"+a74+")");
else
a62.setAttribute("fill",a66[a74]);
a62.setAttribute("d",a75.toString());
a62.setAttribute("yValueIndex",a73);
a62.setAttribute("seriesIndex",a74);
if(this._tooltipsVisible)
{
a62.addEventListener("mouseover",this.ShowToolTipCallback,false);
a62.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a62.addEventListener("click",this.ClickCallback,false);
a57.appendChild(a62);
if(a64)
a70+=barWidth;
else
{
dy-=a69;
dy-=a63;
}
}
if(a64)
dy-=a69;
dy-=a63;
}
}
function ApachePieChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApachePieChart);
ApachePieChart.prototype.Init=function(
a5,a6,a7,
a8,a9)
{
ApachePieChart.superclass.Init.call(this,a5,a6,a7,
a8,a9);
}
ApachePieChart.prototype.DrawChartData=function()
{
var a10=this._rootElement;
var a11=this._model,yValues=a11.getYValues(),yValueCount=yValues.length;
var a12=a11.getGroupLabels(),groupCount=a12?a12.length:1;
var a13=Math.ceil(Math.sqrt(yValueCount)),nRows=Math.round(Math.sqrt(yValueCount));
var a14=this._svgDoc.getElementById("groupLabelPrototype");
var a15=this._margins,dx=a15.left,dy=a15.top;
var a16=(this._width-a15.left-a15.right)/a13;
var a17=(this._animDuration>0),isPerspective=this._isPerspective;
var a18,vGap=2*ApacheChart._TEXT_MARGIN;
var a19=(this._height-a15.top-a15.bottom-(nRows-1)*vGap)/nRows;
if(a17)
{
this._pieAnimAngles=[];
a18=this._pieAnimRadii=[];
}
for(var a20=0;a20<nRows;++a20)
{
for(var a21=0;a21<a13;++a21)
{
var a22=a12?(a20*a13+a21):(-1);
if(a22>=yValueCount)
break;
var a23=(a22==-1)?null:a12[a22];
var a24=a10.cloneNode(false);
a10.appendChild(a24);
var a25=this.DrawGroupLabelTitle(a23,a10,
a14.cloneNode(true),dx,dy,
a16,a19);
var a26=a16-2*ApacheChart._TEXT_MARGIN;
var a27=dx+a16/2+ApacheChart._TEXT_MARGIN,cy=dy+a25/2;
if(a17)
{
a18.push(Math.max(a27,cy));
}
if(isPerspective)
{
this._draw3DPies(a24,a26,a25,a22);
a24.setAttribute("transform",
"translate("+a27+","+cy+") scale(1.0,0.707)");
}
else
{
this._drawPies(a24,a26,a25,a22);
a24.setAttribute("transform",
"translate("+a27+","+cy+")");
}
dx+=a16;
}
dx=a15.left;
dy+=a19+vGap;
}
}
ApachePieChart.prototype.ComputeMinMaxValues=function()
{
}
ApachePieChart.prototype.DrawGroupLabels=function()
{
}
ApachePieChart.prototype.LayoutGroupLabels=function()
{
}
ApachePieChart.prototype.DrawGrid=function()
{
}
ApachePieChart.prototype.DrawYValueLabels=function()
{
}
ApachePieChart.prototype.LayoutYValueLabels=function()
{
}
ApachePieChart.prototype.SetDataAnimStep=function(a28)
{
var a29=this._pieAnimRadii,pieAnimAngles=this._pieAnimAngles,
isPerspective=this._isPerspective,agleIndex=0,elemIndex=0;
var a30=this._dataElems,chartCount=a29.length;
var a31=this._model,yValues=a31.getYValues();
for(var a32=0;a32<chartCount;++a32)
{
var a33=yValues[a32].length;
var a34=a29[a32]*(1-a28);
for(var a35=0;a35<a33;++a35)
{
var a36=pieAnimAngles[agleIndex++]*2*Math.PI;
var a37=a34*Math.sin(a36),ty=a34*Math.cos(a36);
if(a36<=Math.PI/2)
{
ty=-ty;
a37=a37;
}
else if(a36<=Math.PI)
{
;
}
else if(a36<=3*Math.PI/2)
{
a37=-a37;
}
else
{
ty=-ty;
a37=-a37;
}
a30[elemIndex++].setAttribute("transform","translate("+a37+","+ty+")");
if(isPerspective)
{
a30[elemIndex++].setAttribute("transform","translate("+a37+","+ty+")");
a30[elemIndex++].setAttribute("transform","translate("+a37+","+ty+")");
}
}
}
}
ApachePieChart.prototype._drawPies=function(
a38,a39,
a40,a41)
{
var a42=this._svgDoc,model=this._model,yValues=model.getYValues();
var a43=model.getGroupLabels(),seriesColors=model.getSeriesColors();
var a44=Math.min(a39/2,a40/2);
if(a41==-1)
a41=0;
var a45=yValues[a41].length;
var a46=0;
for(var a47=0;a47<a45;++a47)
{
a46+=yValues[a41][a47];
}
var a48=a42.getElementById("piePathPrototype"),pieStart=0,animAngleStart=0;
var a49=new Array(a45),dataElems=this._dataElems,animate=(this._animDuration>0);
var a50=this._gradientsUsed;
var a51="translate(-10000, -10000)",pieAnimAngles=this._pieAnimAngles;
for(var a47=0;a47<a45;++a47)
{
a48=a48.cloneNode(false);
var a52=1-(yValues[a41][a47])/(a46);
if(animate)
{
dataElems.push(a48);
a48.setAttribute("transform",a51);
var a53=(yValues[a41][a47])/(a46);
pieAnimAngles.push(animAngleStart+a53/2);
animAngleStart+=a53;
}
var a54=a44*Math.cos(pieStart*Math.PI*2),y1=a44*Math.sin(pieStart*Math.PI*2);
var a55=new ApacheChartBuffer();
a55.append("M0,0L");
a55.append(a54);
a55.append(",").append(y1);
var a56=a44*Math.cos((pieStart+a52)*Math.PI*2),
y2=a44*Math.sin((pieStart+a52)*Math.PI*2);
if(a52>=.5)
{
a55.append("A").append(a44).append(" ").append(a44).append(" 1 0 0 ");
}
else
{
a55.append("A").append(a44).append(" ").append(a44).append(" 1 1 0 ");
}
a55.append(a56);
a55.append(",").append(y2);
a55.append("z");
if(this._tooltipsVisible)
{
a48.setAttribute("_apcGx",Math.round((a54+a56)/3));
a48.setAttribute("_apcGy",Math.round((y1+y2)/3));
}
a48.setAttribute("d",a55.toString());
if(a50)
a48.setAttribute("fill","url(#gradient"+a47+")");
else
a48.setAttribute("fill",seriesColors[a47]);
a48.setAttribute("stroke",seriesColors[a47]);
a48.setAttribute("stroke-width",1);
a48.setAttribute("yValueIndex",a41);
a48.setAttribute("seriesIndex",a47);
if(this._tooltipsVisible)
{
a48.addEventListener("mouseover",this.ShowToolTipCallback,false);
a48.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a48.addEventListener("click",this.ClickCallback,false);
pieStart+=a52;
a49[a47]=a48;
}
for(var a47=0;a47<a45;++a47)
{
a38.appendChild(a49[a47]);
}
}
ApachePieChart.prototype._draw3DPies=function(
a57,a58,
a59,a60)
{
var a61=this._svgDoc,model=this._model,yValues=model.getYValues();
var a62=model.getGroupLabels(),seriesColors=model.getSeriesColors();
var a63=Math.min(a58/2,a59/2);
var a64=0;
if(a60==-1)
a60=0;
var a65=yValues[a60].length;
for(var a66=0;a66<a65;++a66)
{
a64+=yValues[a60][a66];
}
var a67=a63/4,pieElems=new Array(a65),
ringElems=new Array(a65),edgeElems=new Array(a65);
var a68=this._dataElems,animate=(this._animDuration>0);
if(a67>ApachePieChart._MAX_PERSPECTIVE_HEIGHT)
a67=ApachePieChart._MAX_PERSPECTIVE_HEIGHT;
var a69=a61.getElementById("piePathPrototype"),pieStart=0;
var a70=this._gradientsUsed;
var a71="translate(-10000, -10000)",pieAnimAngles=this._pieAnimAngles;
for(var a66=0;a66<a65;++a66)
{
a69=a69.cloneNode(false);
var a72=1-(yValues[a60][a66])/(a64);
if(animate)
{
a68.push(a69);
a69.setAttribute("transform",a71);
pieAnimAngles.push(pieStart+a72/2);
}
var a73,arcBeginY,arcEndX,arcEndY;
a73=a63*Math.cos(pieStart*Math.PI*2);
arcBeginY=a63*Math.sin(pieStart*Math.PI*2);
var a74=new ApacheChartBuffer();
a74.append("M0,0L").append(a73).append(",").append(arcBeginY);
arcEndX=a63*Math.cos((pieStart+a72)*Math.PI*2);
arcEndY=a63*Math.sin((pieStart+a72)*Math.PI*2);
if(a72>=.5)
{
a74.append("A").append(a63).append(" ").append(a63).append(" 1 0 0 ");
}
else
{
a74.append("A").append(a63).append(" ").append(a63).append(" 1 1 0 ");
}
a74.append(arcEndX).append(",").append(arcEndY);
a74.append("z");
if(this._tooltipsVisible)
{
a69.setAttribute("_apcGx",Math.round((a73+arcEndX)/3));
a69.setAttribute("_apcGy",Math.round((arcBeginY+arcEndY)/3));
}
if(a70)
a69.setAttribute("fill","url(#gradient"+a66+")");
else
a69.setAttribute("fill",seriesColors[a66]);
a69.setAttribute("stroke",seriesColors[a66]);
a69.setAttribute("stroke-width",1);
a69.setAttribute("yValueIndex",a60);
a69.setAttribute("seriesIndex",a66);
if(this._tooltipsVisible)
{
a69.addEventListener("mouseover",this.ShowToolTipCallback,false);
a69.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a69.addEventListener("click",this.ClickCallback,false);
var a75=a69.cloneNode(false);
var a76=a69.cloneNode(false);
if(animate)
{
a68.push(a75);
a75.setAttribute("transform",a71);
a68.push(a76);
a76.setAttribute("transform",a71);
}
a69.setAttribute("d",a74.toString());
a74=new ApacheChartBuffer();
a74.append("M").append(a73).append(",").append(arcBeginY);
if(a72>=.5)
{
a74.append("A").append(a63).append(" ").append(a63).append(" 1 0 0 ");
}
else
{
a74.append("A").append(a63).append(" ").append(a63).append(" 1 1 0 ");
}
a74.append(arcEndX).append(",").append(arcEndY);
a74.append("v").append(a67);
if(a72>=.5)
{
a74.append("A").append(a63).append(" ").append(a63).append(" 1 0 1 ");
}
else
{
a74.append("A").append(a63).append(" ").append(a63).append(" 1 1 1 ");
}
a74.append(a73).append(",").append(arcBeginY+a67);
a74.append("z");
a75.setAttribute("d",a74.toString());
a74=new ApacheChartBuffer();
a74.append("M0,0L");
a74.append(a73).append(",").append(arcBeginY);
a74.append("v").append(a67);
a74.append("L").append(0).append(",").append(a67);
a74.append("z");
a74.append("M0,0L");
a74.append(arcEndX).append(",").append(arcEndY);
a74.append("v").append(a67);
a74.append("L").append(0).append(",").append(a67);
a74.append("z");
a76.setAttribute("d",a74.toString());
pieStart+=a72;
pieElems[a66]=a69;
ringElems[a66]=a75;
edgeElems[a66]=a76;
}
var a77=0;
for(var a66=0;a66<a65;++a66)
{
if(a77<=.5)
a57.appendChild(ringElems[a66]);
a77+=(yValues[a60][a66])/(a64);
}
a77=0;
for(var a66=0;a66<a65;++a66)
{
if(a77<=.5)
a57.appendChild(edgeElems[a66]);
a77+=(yValues[a60][a66])/(a64);
}
a77=0;
for(var a66=0;a66<a65;++a66)
{
if(a77>.5)
a57.appendChild(edgeElems[a66]);
a77+=(yValues[a60][a66])/(a64);
}
a77=0;
for(var a66=0;a66<a65;++a66)
{
if(a77>.5)
a57.appendChild(ringElems[a66]);
a77+=(yValues[a60][a66])/(a64);
}
for(var a66=0;a66<a65;++a66)
{
a57.appendChild(pieElems[a66]);
}
}
ApachePieChart.prototype.GetToolTipLocation=function(a78,a79)
{
var a80=a78.target;
var a81=a80.parentNode.getCTM();
return{x:(a81.e+parseInt(a80.getAttribute("_apcGx"))),
y:(a81.f+a81.d*parseInt(a80.getAttribute("_apcGy"))-a79.height)};
}
ApachePieChart._MAX_PERSPECTIVE_HEIGHT=30;
function ApacheAreaChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheAreaChart);
ApacheAreaChart.prototype.Init=function(
a5,a6,a7,
a8,a9)
{
ApacheAreaChart.superclass.Init.call(this,a5,a6,a7,
a8,a9);
this._toolTips=[];
}
ApacheAreaChart.prototype.SetStopOpacity=function(a10)
{
a10.setAttribute("stop-opacity",ApacheChart._DEFAULT_STOP_OPACITY/2);
}
ApacheAreaChart.prototype.DrawChartData=function()
{
var a11=this._rootElement;
if(this._tooltipsVisible)
{
a11.addEventListener("mousemove",this.ShowToolTipCallback,false);
a11.addEventListener("mouseout",this.HideToolTipCallback,false);
}
if(this._isPerspective)
this._drawPerspectiveAreas();
else
this._drawAreas();
}
ApacheAreaChart.prototype.SetDataAnimStep=function(a12)
{
var a13=this._model,
seriesLabels=a13.getSeriesLabels(),seriesCount=seriesLabels.length;
var a14=a13.getYValues(),yValueCount=a14.length;
var a15=this._dataElems,animPathCount=(this._isPerspective)?(yValueCount-1):1;
var a16=this._margins,marginBottom=a16.bottom;
var a17=(this._height-marginBottom);
var a18=a12*seriesCount,animSeriesIndex=0;
if(a18>1)
{
animSeriesIndex=Math.floor(a18);
if(animSeriesIndex>=seriesCount)
animSeriesIndex=seriesCount-1;
a18=a18-Math.floor(a18);
}
var a19=animSeriesIndex;
for(var a20=0;a20<animPathCount;++a20)
{
var a21=(1-a18)*a17;
a15[a19*animPathCount+a20].setAttribute("transform","translate(0,"+a21+") scale(1,"+a18+")");
if(a19>0)
{
a15[(a19-1)*animPathCount+a20].setAttribute("transform","scale(1,1)");
}
}
if(a12==1)
{
for(var a19=0;a19<seriesCount;++a19)
{
for(var a20=0;a20<animPathCount;++a20)
{
a15[a19*animPathCount+a20].setAttribute("transform","scale(1,1)");
}
}
}
}
ApacheAreaChart.prototype.IsGroupLabelCentered=function()
{
return false;
}
ApacheAreaChart.prototype.GetVLineCount=function()
{
var a22=this._xMajorGridCount;
if(a22>=0)
return a22;
else
{
return this._model.getGroupLabels().length-1;
}
}
ApacheAreaChart.prototype._drawAreas=function()
{
var a23=this._svgDoc,model=this._model,margins=this._margins;
var a24=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a25=margins.left,marginTop=margins.top;
var a26=(this._width-a25-margins.right);
var a27=(this._height-marginTop-margins.bottom);
var a28=a23.getElementById("areaPathPrototype");
var a29=model.getGroupLabels(),groupCount=a29.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a30=model.getSeriesColors(),yValues=model.getYValues();
var a31=model.getMinYValue(),maxValue=model.getMaxYValue();
var a32=(this._type==ApacheChart.TYPE_AREA_STACKED);
var a33=yValues.length;
var a34=(a26/(Math.max(a33,groupCount)-1));
var a35=this._gradientsUsed;
var a36="scale(1,0.00001)";
var a37,dy,cumYs=[],stackBase;
for(var a38=0;a38<seriesCount;++a38)
{
a37=a25;
dy=marginTop+a27;
var a39=new ApacheChartBuffer();
a28=a28.cloneNode(false);
if(a38==0||!a32)
a39.append("M").append(a37).append(",").append(dy);
else if(a32)
a39.append("M").append(a37).append(",").append(cumYs[0]);
stackBase=(a38==0?a31:0);
for(var a40=0;a40<a33;++a40)
{
if(a32)
{
if(null==cumYs[a40])
cumYs[a40]=a27+marginTop;
dy=(cumYs[a40]-=a27*(yValues[a40][a38]-stackBase)/(maxValue-a31));
}
else
dy=a27+marginTop-a27*(yValues[a40][a38]-a31)/(maxValue-a31);
a39.append("L").append(a37).append(",").append(dy);
if(a40!=a33-1)
a37+=a34;
}
if(animate)
{
dataElems.push(a28);
a28.setAttribute("transform",a36);
}
if(a35)
a28.setAttribute("fill","url(#gradient"+a38+")");
else
a28.setAttribute("fill",a30[a38]);
a28.setAttribute("stroke",a30[a38]);
a28.setAttribute("stroke-width",1);
a28.setAttribute("seriesIndex",a38);
a28.addEventListener("click",this.ClickCallback,false);
if(a38==0||!a32)
{
a39.append("L").append(a37).append(",").append(a27+marginTop);
a39.append("Z");
}
else
{
for(var a40=a33-1;a40>=0;--a40)
{
var a41=cumYs[a40]+a27*(yValues[a40][a38]-stackBase)/(maxValue-a31);
a39.append("L").append(a37).append(",").append(a41);
a37-=a34;
}
}
a28.setAttribute("d",a39.toString());
a24.appendChild(a28);
}
}
ApacheAreaChart.prototype._drawPerspectiveAreas=function()
{
var a42=this._svgDoc,model=this._model,margins=this._margins;
var a43=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a44=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a45=margins.left,marginTop=margins.top;
var a46=(this._width-a45-margins.right-a44);
var a47=(this._height-marginTop-margins.bottom-yOffset);
var a48=a42.getElementById("areaPathPrototype");
var a49=model.getGroupLabels(),groupCount=a49.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a50=model.getSeriesColors(),yValues=model.getYValues();
var a51=(this._type==ApacheChart.TYPE_AREA_STACKED);
var a52=model.getMinYValue(),maxValue=model.getMaxYValue();
var a53=yValues.length;
var a54=(a46/(Math.max(a53,groupCount)-1)),stackBase;
var a55=a47+marginTop+yOffset,dx,dy,cumYs=[];
var a56=this._gradientsUsed;
var a57="scale(1,0.00001)";
for(var a58=0;a58<seriesCount;++a58)
{
dx=a45;
var a59=new ApacheChartBuffer();
a48=a48.cloneNode(false);
stackBase=(a58==0?a52:0);
for(var a60=0;a60<a53;++a60)
{
if(a51)
{
if(null==cumYs[a60])
cumYs[a60]=a55;
dy=(cumYs[a60]-=a47*(yValues[a60][a58]-stackBase)/(maxValue-a52));
}
else
dy=a55-a47*(yValues[a60][a58]-a52)/(maxValue-a52);
if(a60!=a53-1)
{
a48=a48.cloneNode(false);
a59.append("M").append(dx).append(",").append(dy);
a59.append("l").append(a44).append(",").append(-yOffset);
var a61,nextdx=dx+a54;
if(a51)
{
if(null==cumYs[a60+1])
cumYs[a60+1]=a55;
a61=(cumYs[a60+1]-a47*(yValues[a60+1][a58]-stackBase)/(maxValue-a52));
}
else
a61=a55-a47*(yValues[a60+1][a58]-a52)/(maxValue-a52)
a59.append("L").append(nextdx+a44).append(",").append(a61-yOffset);
a59.append("l").append(-a44).append(",").append(yOffset);
a59.append("L").append(dx).append(",").append(dy);
a59.append("M").append(nextdx).append(",").append(a61);
a59.append("l").append(a44).append(",").append(-yOffset);
var a62,prevSeriesY2;
if(a58==0||!a51)
{
a59.append("L").append(nextdx+a44).append(",").append(a47+marginTop);
}
else
{
a59.append("L").append(nextdx+a44).append(",").append(cumYs[a60+1]-yOffset);
}
a59.append("l").append(-a44).append(",").append(yOffset);
a59.append("L").append(nextdx).append(",").append(a61);
a59.append("M").append(dx).append(",").append(dy);
a59.append("L").append(nextdx).append(",").append(a61);
if(a58==0||!a51)
{
a59.append("L").append(nextdx).append(",").append(a55);
a59.append("L").append(dx).append(",").append(a55);
}
else
{
a59.append("L").append(nextdx).append(",").append(cumYs[a60+1]);
a59.append("L").append(dx).append(",").append(
cumYs[a60]+a47*(yValues[a60][a58]-stackBase)/(maxValue-a52));
}
a59.append("L").append(dx).append(",").append(dy);
if(a56)
a48.setAttribute("fill","url(#gradient"+a58+")");
else
a48.setAttribute("fill",a50[a58]);
a48.setAttribute("stroke",a50[a58]);
a48.setAttribute("stroke-width",1);
a48.setAttribute("yValueIndex",a60);
a48.setAttribute("seriesIndex",a58);
a48.addEventListener("click",this.ClickCallback,false);
dx+=a54;
a48.setAttribute("d",a59.toString());
a43.appendChild(a48);
if(animate)
{
dataElems.push(a48);
a48.setAttribute("transform",a57);
}
}
}
}
}
ApacheAreaChart.prototype.GetChartEvent=function(a63,a64)
{
var a65=a63.clientX,clientY=a63.clientY,evtTarget=a63.target;
var a66=(this._type==ApacheChart.TYPE_AREA_STACKED);
var a67=this._isPerspective;
var a68=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a69=this._model,yValues=a69.getYValues();
var a70=a69.getGroupLabels(),groupCount=a70.length;
var a71=a69.getMinYValue(),maxValue=a69.getMaxYValue();
var a72=this._margins,marginLeft=a72.left,marginTop=a72.top;
var a73=(this._width-marginLeft-a72.right);
var a74=(this._height-marginTop-a72.bottom);
var a75=yValues.length;
var a76=(a73/(Math.max(a75,groupCount)-1));
if(a67)
{
a73-=a68;
a74-=yOffset;
}
if(a65<marginLeft||
a65>(marginLeft+a73+(a67?a68:0))||
clientY<marginTop||
clientY>(marginTop+a74+(a67?yOffset:0)))
{
return null;
}
var a77,dy,dy1,cumYs=[],seriesIndices=[],seriesValues=[];
var a78=a74+marginTop+(a67?yOffset:0);
var a79=a69.getSeriesLabels().length,stackBase,insideStacked=false;
if(!a64)
a64=[];
for(var a80=0;a80<a79&&!insideStacked;++a80)
{
a77=marginLeft;
stackBase=(a80==0?a71:0);
for(var a81=0;a81<a75;++a81)
{
if(a66)
{
if(null==cumYs[a81])
cumYs[a81]=a78;
if(null==cumYs[a81+1]&&(a81!=a75-1))
cumYs[a81+1]=a78;
cumYs[a81]-=a74*(yValues[a81][a80]-stackBase)/(maxValue-a71);
}
if(a81==a75-1)
continue;
if(a65>a77&&a65<(a77+a76))
{
if(a66)
{
dy1=cumYs[a81];
dy2=(cumYs[a81+1]-a74*(yValues[a81+1][a80]-stackBase)/(maxValue-a71));
dy=dy1-(dy1-dy2)*(a65-a77)/a76;
if(clientY>=dy)
{
value=yValues[a81][a80]+(yValues[a81+1][a80]-yValues[a81][a80])*(a65-a77)/a76;
seriesValues.push(value);
seriesIndices.push(a80);
a64.push(dy);
insideStacked=true;
break;
}
}
else
{
dy1=a78-
a74*(yValues[a81][a80]-a71)/(maxValue-a71);
dy=dy1-(a74*(yValues[a81+1][a80]-yValues[a81][a80])/(maxValue-a71))*(a65-a77)/a76;
if(dy<=clientY)
{
value=yValues[a81][a80]+(yValues[a81+1][a80]-yValues[a81][a80])*(a65-a77)/a76;
seriesValues.push(value);
seriesIndices.push(a80);
a64.push(dy);
}
break;
}
}
a77+=a76;
}
}
return new ApacheChartEvent(seriesIndices,null,seriesValues,null);
}
ApacheAreaChart.prototype.ShowToolTip=function(a82)
{
this.HideToolTip();
var a83=[];
var a84=this.GetChartEvent(a82,a83);
if(a84==null||a84.getYValues().length==0)
{
return;
}
this._displayToolTips(a84.getYValues(),a84.getSeriesIndices(),a83,a82);
}
ApacheAreaChart.prototype._displayToolTips=function(
a85,a86,
a87,a88)
{
var a89=this._svgDoc,rootElem=this._rootElement;
var a90=this._model,seriesLabels=a90.getSeriesLabels(),seriesCount=seriesLabels.length,
seriesColors=a90.getSeriesColors();
var a91=a86.length,toolTips=this._toolTips;
var a92=a88.clientX;
var a93,dy;
for(var a94=0;a94<a91;++a94)
{
var a95=a86[a94];
var a96=toolTips[a95];
var a97=false;
if(a96==null)
{
a96=a89.getElementById("toolTip").cloneNode(true);
rootElem.appendChild(a96);
toolTips[a95]=a96;
a97=true;
}
a96.style.setProperty("visibility","visible","");
var a98=a96.firstChild.nextSibling;
var a99=a98.nextSibling.nextSibling;
var a100=a99.nextSibling.nextSibling;
var a101=a85.length;
var a102=a100.getBBox().width;
a100.firstChild.data=
seriesLabels[a95]+":  "+this._formatValue(a85[a94]);
if(a97)
{
var a103=parseInt(a99.getAttribute("height"));
var a104=parseInt(a100.getAttribute("y"));
a103-=a104;
a99.setAttribute("height",a103);
a100=a100.nextSibling.nextSibling;
a100.firstChild.data="";
}
a102+=2*ApacheChart._TEXT_MARGIN;
a99.setAttribute("width",a102);
var a105=a88.target.getBBox();
var a106=a96.getBBox();
a93=a92;
a104=a87[a94]-a106.height;
if(a93+a106.width>this._width)
{
a93-=a106.width;
a98.setAttribute("cx",a99.getBBox().width);
}
else
{
a98.setAttribute("cx",0);
}
if(a104-a106.height<0)
{
a104+=a106.height;
a98.setAttribute("cy",0);
}
else
{
a98.setAttribute("cy",a99.getBBox().height);
}
a99.setAttribute("stroke",seriesColors[a95]);
a98.setAttribute("stroke",seriesColors[a95]);
a96.setAttribute("transform","translate("+a93+","+a104+")");
}
}
ApacheAreaChart.prototype.HideToolTip=function(a107)
{
var a108=this._toolTips,tooltipCount=a108.length;
for(var a109=0;a109<tooltipCount;++a109)
{
var a110=a108[a109];
if(a110)
a110.style.setProperty("visibility","hidden","");
}
}
function ApacheLineChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheLineChart);
ApacheLineChart.prototype.DrawChartData=function(a5)
{
if(this._isPerspective)
this.__drawPerspectiveLines(a5);
else
this.__drawLines(a5);
}
ApacheLineChart.prototype.AnimAlongXAxis=function()
{
return true;
}
ApacheLineChart.prototype.__drawLines=function(a6)
{
var a7=this._svgDoc,model=this._model,margins=this._margins;
var a8=this._rootElement,dataElems=this._dataElems,
dotElems,animate=(this._animDuration>0);
var a9=margins.left,marginTop=margins.top;
var a10=(this._width-a9-margins.right);
var a11=(this._height-marginTop-margins.bottom);
var a12=a7.getElementById("lineDotPrototype"),
pathElem=a7.getElementById("linePathPrototype");
var a13=model.getGroupLabels(),groupCount=a13.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a14=model.getSeriesColors(),yValues=model.getYValues();
var a15=model.getMinYValue(),maxValue=model.getMaxYValue();
var a16=yValues.length;
var a17=a10/Math.max(a16,groupCount);
var a18,dy;
var a19=this._gradientsUsed;
var a20=this._isIE?"scale(0.00001,1)":"scale(0,1)";
for(var a21=0;a21<seriesCount;++a21)
{
if(a6&&a21%2==0)
continue;
a18=a9+a17/2;
var a22=new ApacheChartBuffer();
pathElem=pathElem.cloneNode(false);
for(var a23=0;a23<a16;++a23)
{
dy=a11+marginTop-a11*(yValues[a23][a21]-a15)/(maxValue-a15);
if(a23==0)
a22.append("M").append(a18).append(",").append(dy);
else
a22.append("L").append(a18).append(",").append(dy);
a12=a12.cloneNode(false);
a12.setAttribute("cx",a18);
a12.setAttribute("cy",dy);
if(a19)
a12.setAttribute("fill","url(#gradient"+a21+")");
else
a12.setAttribute("fill",a14[a21]);
a12.setAttribute("stroke",a14[a21]);
if(animate)
{
a12.setAttribute("transform",a20);
dataElems.push(a12);
}
a8.appendChild(a12);
pathElem.setAttribute("stroke",a14[a21]);
pathElem.setAttribute("seriesIndex",a21);
if(this._tooltipsVisible)
{
pathElem.addEventListener("mouseover",this.ShowToolTipCallback,false);
pathElem.addEventListener("mouseout",this.HideToolTipCallback,false);
}
pathElem.addEventListener("click",this.ClickCallback,false);
a18+=a17;
}
pathElem.setAttribute("d",a22.toString());
a8.appendChild(pathElem);
if(animate)
{
dataElems.push(pathElem);
pathElem.setAttribute("transform",a20);
}
}
}
ApacheLineChart.prototype.__drawPerspectiveLines=function(a24)
{
var a25=this._svgDoc,model=this._model,margins=this._margins;
var a26=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a27=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a28=margins.left,marginTop=margins.top;
var a29=(this._width-a28-margins.right-a27);
var a30=(this._height-marginTop-margins.bottom-yOffset);
var a31=a25.getElementById("linePath3dPrototype");
var a32=model.getGroupLabels(),groupCount=a32.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a33=model.getSeriesColors(),yValues=model.getYValues();
var a34=model.getMinYValue(),maxValue=model.getMaxYValue();
var a35=yValues.length;
var a36=(a29/Math.max(a35,groupCount));
var a37=a30+marginTop+yOffset,dx,dy;
var a38=this._gradientsUsed;
var a39="scale(0.00001,1)";
for(var a40=0;a40<seriesCount;++a40)
{
if(a24&&a40%2==0)
continue;
dx=a28+a36/2;
var a41=new ApacheChartBuffer();
a31=a31.cloneNode(false);
for(var a42=0;a42<a35;++a42)
{
dy=a37-a30*(yValues[a42][a40]-a34)/(maxValue-a34);
if(a42!=a35-1)
{
var a41=new ApacheChartBuffer();
a31=a31.cloneNode(false);
a41.append("M").append(dx).append(",").append(dy);
a41.append("l").append(a27).append(",").append(-yOffset);
var a43=a37-a30*(yValues[a42+1][a40]-a34)/(maxValue-a34);
var a44=dx+a36;
a41.append("L").append(a44+a27).append(",").append(a43-yOffset);
a41.append("l").append(-a27).append(",").append(yOffset);
a41.append("L").append(dx).append(",").append(dy);
if(a38)
a31.setAttribute("fill","url(#gradient"+a40+")");
else
a31.setAttribute("fill",a33[a40]);
a31.setAttribute("stroke",a33[a40]);
a31.setAttribute("seriesIndex",a40);
if(this._tooltipsVisible)
{
a31.addEventListener("mousemove",this.ShowToolTipCallback,false);
a31.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a31.addEventListener("click",this.ClickCallback,false);
dx+=a36;
a31.setAttribute("d",a41.toString());
a26.appendChild(a31);
if(animate)
{
dataElems.push(a31);
a31.setAttribute("transform",a39);
}
}
}
}
}
ApacheLineChart.prototype.ShowToolTip=function(a45)
{
this.HideToolTip();
ApacheLineChart.superclass.ShowToolTip.call(this,a45);
}
ApacheLineChart.prototype.GetToolTipLocation=function(a46,a47)
{
return{x:(a46.clientX+20),y:(a46.clientY+20)};
}
ApacheLineChart.prototype.GetChartEvent=function(a48)
{
var a49=a48.target;
var a50=parseInt(a49.getAttribute("seriesIndex"));
var a51=a48.clientX;
var a52=this._isPerspective;
var a53=ApacheChart._YOFFSET_PERSPECTIVE;
var a54=this._model,yValues=a54.getYValues();
var a55=a54.getGroupLabels(),groupCount=a55.length;
var a56=this._margins,marginLeft=a56.left,marginTop=a56.top;
var a57=(this._width-marginLeft-a56.right);
var a58=(this._height-marginTop-a56.bottom);
var a59=yValues.length;
var a60=(a57/Math.max(a59,groupCount));
var a61=a58+marginTop+(a52?a53:0);
var a62=marginLeft+a60/2,value=0.0;
for(var a63=0;a63<a59;++a63)
{
if(a63==a59-1)
continue;
if(a51>a62&&a51<(a62+a60))
{
value=yValues[a63][a50]+(yValues[a63+1][a50]-yValues[a63][a50])*(a51-a62)/a60;
break;
}
a62+=a60;
}
return new ApacheChartEvent([a50],null,[value],null);
}
ApacheLineChart.prototype.FillToolTipData=function(a64,a65,a66)
{
var a67=this.GetChartEvent(a66);
var a68=a67.getSeriesIndices()[0],value=a67.getYValues()[0];
var a69=this._model.getSeriesLabels();
var a70=a64.nextSibling.nextSibling;
a70.firstChild.data=a69[a68]+
": "+this._formatValue(value);
var a71=a70.getBBox().width;
a70=a70.nextSibling.nextSibling;
a70.firstChild.data="";
var a72=a71+2*ApacheChart._TEXT_MARGIN;
a64.setAttribute("width",a72);
a64.setAttribute("stroke",seriesColors[a68]);
a65.setAttribute("r",0);
}
function ApacheScatterPlotChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheScatterPlotChart);
ApacheScatterPlotChart.prototype.Init=function(
a5,a6,a7,
a8,a9)
{
ApacheScatterPlotChart.superclass.Init.call(this,a5,a6,a7,
a8,a9);
}
ApacheScatterPlotChart.prototype.DrawChartData=function()
{
if(this._isPerspective)
this._drawPerspectivePoints();
else
this._drawPoints();
}
ApacheScatterPlotChart.prototype.SetDataAnimStep=function(a10)
{
var a11=this._isPerspective;
var a12=this._cxs,cys=this._cys,gridCx,gridCy;
var a13=this._margins,marginLeft=a13.left,marginTop=a13.top;
var a14=(this._width-marginLeft-a13.right);
var a15=(this._height-marginTop-a13.bottom);
var a16=this._dataElems,animCount=a12.length,elemIndex=0;
if(a11)
marginLeft+=ApacheChart._XOFFSET_PERSPECTIVE;
gridCx=a14/2+marginLeft;
gridCy=a15/2+marginTop;
for(var a17=0;a17<animCount;++a17)
{
var a18=gridCx-(gridCx-a12[a17])*a10;
var a19=gridCy-(gridCy-cys[a17])*a10;
var a20=a16[elemIndex++];
a20.setAttribute("cx",a18);
a20.setAttribute("cy",a19);
if(a11)
{
a20=a16[elemIndex++];
a20.setAttribute("cx",a18);
a20.setAttribute("cy",a19);
}
}
}
ApacheScatterPlotChart.prototype.SetGridAnimStep=function(a21)
{
var a22=this._gridElems,animCount=a22.length;
for(var a23=0;a23<animCount;++a23)
{
a22[a23].setAttribute("fill-opacity",a21);
a22[a23].setAttribute("transform","scale(1,1)");
}
}
ApacheScatterPlotChart.prototype.IsGroupLabelCentered=function()
{
return false;
}
ApacheScatterPlotChart.prototype.GetVLineCount=function()
{
var a24=this._xMajorGridCount;
if(a24>=0)
return a24;
else
{
return this._model.getGroupLabels().length-1;
}
}
ApacheScatterPlotChart.prototype._drawPoints=function()
{
var a25=this._svgDoc,model=this._model,margins=this._margins;
var a26=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a27=margins.left,marginTop=margins.top;
var a28=(this._width-a27-margins.right);
var a29=(this._height-marginTop-margins.bottom);
var a30=a25.getElementById("scatterDotPrototype");
var a31=model.getGroupLabels(),groupCount=a31.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a32=model.getSeriesColors(),xValues=model.getXValues(),
yValues=model.getYValues(),nValues=yValues.length;
var a33="translate(0,100000)";
var a34=model.getMinYValue(),maxYValue=model.getMaxYValue();
var a35=model.getMinXValue(),maxXValue=model.getMaxXValue();
var a36=(a28/(groupCount-1));
var a37,cys,dx,dy,gridCx,gridCY;
var a38=this._gradientsUsed;
if(animate)
{
a37=this._cxs=[];
cys=this._cys=[];
gridCx=a28/2+a27;
gridCy=a29/2+marginTop;
}
for(var a39=0;a39<seriesCount;++a39)
{
for(var a40=0;a40<nValues;++a40)
{
dy=a29+marginTop-a29*(yValues[a40][a39]-a34)/(maxYValue-a34);
dx=a27+a28*(xValues[a40][a39]-a35)/(maxXValue-a35);
a30=a30.cloneNode(false);
if(a38)
a30.setAttribute("fill","url(#gradient"+a39+")");
else
a30.setAttribute("fill",a32[a39]);
a30.setAttribute("stroke",a32[a39]);
a30.setAttribute("yValueIndex",a40);
a30.setAttribute("seriesIndex",a39);
if(this._tooltipsVisible)
{
a30.addEventListener("mouseover",this.ShowToolTipCallback,false);
a30.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a30.addEventListener("click",this.ClickCallback,false);
if(animate)
{
dataElems.push(a30);
a30.setAttribute("cx",gridCx);
a30.setAttribute("cy",gridCy);
a37.push(dx);
cys.push(dy);
}
else
{
a30.setAttribute("cx",dx);
a30.setAttribute("cy",dy);
}
a26.appendChild(a30);
}
}
}
ApacheScatterPlotChart.prototype._drawPerspectivePoints=function()
{
var a41=this._svgDoc,model=this._model,margins=this._margins;
var a42=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a43=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a44=margins.left,marginTop=margins.top;
var a45=(this._width-a44-margins.right-a43);
var a46=(this._height-marginTop-margins.bottom-yOffset);
var a47=a41.getElementById("scatter3dDotPrototype");
var a48=model.getGroupLabels(),groupCount=a48.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a49=model.getSeriesColors(),xValues=model.getXValues(),
yValues=model.getYValues(),nValues=yValues.length;
var a50=model.getMinYValue(),maxYValue=model.getMaxYValue();
var a51=model.getMinXValue(),maxXValue=model.getMaxXValue();
var a52=(a45/(groupCount-1));
var a53=a46+marginTop+yOffset,cxs,cys,dx,dy,gridCx,gridCY;
var a54=this._gradientsUsed;
if(animate)
{
cxs=this._cxs=[];
cys=this._cys=[];
gridCx=a45/2+a44+a43;
gridCy=a46/2+marginTop;
}
for(var a55=0;a55<seriesCount;++a55)
{
for(var a56=0;a56<nValues;++a56)
{
dy=a53-a46*(yValues[a56][a55]-a50)/(maxYValue-a50);
dx=a44+a45*(xValues[a56][a55]-a51)/(maxXValue-a51);
a47=a47.cloneNode(false);
if(animate)
{
dataElems.push(a47);
a47.setAttribute("cx",gridCx);
a47.setAttribute("cy",gridCy);
cxs.push(dx);
cys.push(dy);
}
else
{
a47.setAttribute("cx",dx);
a47.setAttribute("cy",dy);
}
if(a54)
a47.setAttribute("fill","url(#gradient"+a55+")");
else
a47.setAttribute("fill",a49[a55]);
a47.setAttribute("stroke",a49[a55]);
a47.setAttribute("yValueIndex",a56);
a47.setAttribute("seriesIndex",a55);
if(this._tooltipsVisible)
{
a47.addEventListener("mouseover",this.ShowToolTipCallback,false);
a47.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a47.addEventListener("click",this.ClickCallback,false);
var a57=a47.cloneNode(false);
if(animate)
{
dataElems.push(a57);
}
a57.setAttribute("fill","#333333");
a57.setAttribute("opacity","0.5");
a57.setAttribute("stroke","none");
a57.setAttribute("transform","translate(3,3)");
a42.appendChild(a57);
a42.appendChild(a47);
}
}
}
ApacheScatterPlotChart.prototype.GetChartEvent=function(a58)
{
var a59=a58.target;
var a60=parseInt(a59.getAttribute("seriesIndex")),
j=parseInt(a59.getAttribute("yValueIndex"));
var a61=this._model,xValues=a61.getXValues(),
yValues=a61.getYValues();
return new ApacheChartEvent([a60],[j],[yValues[j][a60]],[xValues[j][a60]]);
}
ApacheScatterPlotChart.prototype.FillToolTipData=function(a62,a63,a64)
{
var a65=this.GetChartEvent(a64);
var a66=a65.getSeriesIndices()[0],
yValue=a65.getYValues()[0]
xValue=a65.getXValues()[0];
var a67=this._model,seriesLabels=a67.getSeriesLabels();
var a68=a62.nextSibling.nextSibling;
a68.firstChild.data=seriesLabels[a66]+
": ("+this._formatValue(xValue)+
")    ("+this._formatValue(yValue)+")";
var a69=a68.getBBox().width;
a68=a68.nextSibling.nextSibling;
a68.firstChild.data="";
var a70=a69+2*ApacheChart._TEXT_MARGIN;
a62.setAttribute("width",a70);
a62.setAttribute("stroke",seriesColors[a66]);
a63.setAttribute("r",0);
}
function ApacheXYLineChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheScatterPlotChart,ApacheXYLineChart);
ApacheXYLineChart.prototype.SetDataAnimStep=function(a5)
{
ApacheChart.prototype.SetDataAnimStep.call(this,a5);
}
ApacheXYLineChart.prototype.DrawChartData=function()
{
if(this._isPerspective)
this._drawPerspectiveXYValues();
else
this._drawXYValues();
}
ApacheXYLineChart.prototype.AnimAlongXAxis=function()
{
return true;
}
ApacheXYLineChart.prototype._drawXYValues=function()
{
var a6=this._svgDoc,model=this._model,margins=this._margins;
var a7=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a8=margins.left,marginTop=margins.top;
var a9=(this._width-a8-margins.right);
var a10=(this._height-marginTop-margins.bottom);
var a11,pathElem;
var a12=model.getGroupLabels(),groupCount=a12.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a13=model.getSeriesColors(),xValues=model.getXValues(),
yValues=model.getYValues(),nValues=yValues.length;
var a14="scale(0.00001,1)";
var a15=model.getMinYValue(),maxYValue=model.getMaxYValue();
var a16=model.getMinXValue(),maxXValue=model.getMaxXValue();
var a17=(a9/(groupCount-1));
var a18,dy;
pathElem=a6.getElementById("linePathPrototype");
for(var a19=0;a19<seriesCount;++a19)
{
var a20=new ApacheChartBuffer();
a18=a8;
dy=a10+marginTop;
pathElem=pathElem.cloneNode(false);
if(animate)
{
dataElems.push(pathElem);
pathElem.setAttribute("transform",a14);
}
for(var a21=0;a21<nValues;++a21)
{
dy=a10+marginTop-a10*(yValues[a21][a19]-a15)/(maxYValue-a15);
a18=a8+a9*(xValues[a21][a19]-a16)/(maxXValue-a16);
if(a21==0)
a20.append("M").append(a18).append(",").append(dy);
else
a20.append("L").append(a18).append(",").append(dy);
}
pathElem.setAttribute("seriesIndex",a19);
pathElem.setAttribute("stroke",a13[a19]);
if(this._tooltipsVisible)
{
pathElem.addEventListener("mousemove",this.ShowToolTipCallback,false);
pathElem.addEventListener("mouseout",this.HideToolTipCallback,false);
}
pathElem.addEventListener("click",this.ClickCallback,false);
pathElem.setAttribute("d",a20.toString());
a7.appendChild(pathElem);
}
}
ApacheXYLineChart.prototype._drawPerspectiveXYValues=function()
{
var a22=this._svgDoc,model=this._model,margins=this._margins;
var a23=this._rootElement,dataElems=this._dataElems,animate=(this._animDuration>0);
var a24=ApacheChart._XOFFSET_PERSPECTIVE,yOffset=ApacheChart._YOFFSET_PERSPECTIVE;
var a25=margins.left,marginTop=margins.top;
var a26=(this._width-a25-margins.right-a24);
var a27=(this._height-marginTop-margins.bottom-yOffset);
var a28,pathElem;
var a29=model.getGroupLabels(),groupCount=a29.length,
seriesLabels=model.getSeriesLabels(),seriesCount=seriesLabels.length;
var a30=model.getSeriesColors(),xValues=model.getXValues(),
yValues=model.getYValues(),nValues=yValues.length;
var a31="scale(0.00001,1)";
var a32=model.getMinYValue(),maxYValue=model.getMaxYValue();
var a33=model.getMinXValue(),maxXValue=model.getMaxXValue();
var a34=a27+marginTop+yOffset,dx,dy;
var a35=this._gradientsUsed;
pathElem=a22.getElementById("linePath3dPrototype");
for(var a36=0;a36<seriesCount;++a36)
{
var a37=new ApacheChartBuffer();
pathElem=pathElem.cloneNode(false);
if(animate)
{
dataElems.push(pathElem);
pathElem.setAttribute("transform",a31);
}
for(var a38=0;a38<nValues;++a38)
{
dy=a34-a27*(yValues[a38][a36]-a32)/(maxYValue-a32);
dx=a25+a26*(xValues[a38][a36]-a33)/(maxXValue-a33);
if(a38!=nValues-1)
{
a37.append("M").append(dx).append(",").append(dy);
a37.append("l").append(a24).append(",").append(-yOffset);
var a39,nextdx;
nextdx=a25+a26*(xValues[a38+1][a36]-a33)/(maxXValue-a33);
a39=a34-
a27*(yValues[a38+1][a36]-a32)/(maxYValue-a32);
a37.append("L").append(nextdx+a24).append(",").append(a39-yOffset);
a37.append("l").append(-a24).append(",").append(yOffset);
a37.append("L").append(dx).append(",").append(dy);
}
}
if(a35)
pathElem.setAttribute("fill","url(#gradient"+a36+")");
else
pathElem.setAttribute("fill",a30[a36]);
pathElem.setAttribute("stroke",a30[a36]);
pathElem.setAttribute("seriesIndex",a36);
if(this._tooltipsVisible)
{
pathElem.addEventListener("mousemove",this.ShowToolTipCallback,false);
pathElem.addEventListener("mouseout",this.HideToolTipCallback,false);
}
pathElem.addEventListener("click",this.ClickCallback,false);
pathElem.setAttribute("d",a37.toString());
a23.appendChild(pathElem);
}
}
ApacheXYLineChart.prototype.ShowToolTip=function(a40)
{
this.HideToolTip();
ApacheXYLineChart.superclass.ShowToolTip.call(this,a40);
}
ApacheXYLineChart.prototype.GetToolTipLocation=function(a41,a42)
{
return{x:(a41.clientX+20),y:(a41.clientY+20)};
}
ApacheXYLineChart.prototype.GetChartEvent=function(a43)
{
var a44=a43.target;
var a45=parseInt(a44.getAttribute("seriesIndex"));
var a46=a43.clientX,clientY=a43.clientY,a44=a43.target;
var a47=this._isPerspective;
var a48=ApacheChart._YOFFSET_PERSPECTIVE;
var a49=this._model,xValues=a49.getXValues(),
yValues=a49.getYValues(),nValues=yValues.length;
var a50=a49.getMinYValue(),maxYValue=a49.getMaxYValue();
var a51=a49.getMinXValue(),maxXValue=a49.getMaxXValue();
var a52=this._margins,marginLeft=a52.left,marginTop=a52.top;
var a53=(this._width-marginLeft-a52.right);
var a54=(this._height-marginTop-a52.bottom);
var a55=a54+marginTop+(a47?a48:0);
var a56,dy,xValue=0.0,yValue=0.0;
var a57,nextdx;
for(var a58=0;a58<nValues;++a58)
{
if(a58!=nValues-1)
{
a56=marginLeft+a53*(xValues[a58][a45]-a51)/(maxXValue-a51);
nextdx=marginLeft+a53*(xValues[a58+1][a45]-a51)/(maxXValue-a51);
if(a46>a56&&a46<(a56+nextdx))
{
dy=a55-a54*(yValues[a58][a45]-a50)/(maxYValue-a50);
a57=a55-
a54*(yValues[a58+1][a45]-a50)/(maxYValue-a50);
yValue=yValues[a58][a45]+(yValues[a58+1][a45]-yValues[a58][a45])*(clientY-dy)/(a57-dy);
xValue=xValues[a58][a45]+(xValues[a58+1][a45]-xValues[a58][a45])*(a46-a56)/(nextdx-a56);
break;
}
}
}
return new ApacheChartEvent([a45],null,[yValue],[xValue]);
}
ApacheXYLineChart.prototype.FillToolTipData=function(a59,a60,a61)
{
var a62=this.GetChartEvent(a61);
var a63=a62.getSeriesIndices()[0],
yValue=a62.getYValues()[0]
xValue=a62.getXValues()[0];
var a64=this._model,seriesLabels=a64.getSeriesLabels();
var a65=a59.nextSibling.nextSibling;
a65.firstChild.data=seriesLabels[a63]+
": ("+this._formatValue(xValue)+
")    ("+this._formatValue(yValue)+")";
var a66=a65.getBBox().width;
a65=a65.nextSibling.nextSibling;
a65.firstChild.data="";
var a67=a66+2*ApacheChart._TEXT_MARGIN;
a59.setAttribute("width",a67);
a59.setAttribute("stroke",seriesColors[a63]);
a60.setAttribute("r",0);
}
function ApacheRadarChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheRadarChart);
ApacheRadarChart.prototype.Init=function(
a5,a6,a7,
a8,a9)
{
ApacheRadarChart.superclass.Init.call(this,a5,a6,a7,
a8,a9);
this._toolTips=[];
}
ApacheRadarChart.prototype.draw=function()
{
this._yLabels=[];
ApacheRadarChart.superclass.draw.call(this);
delete this._yLabels;
}
ApacheRadarChart.prototype.SetGridAnimStep=function(a10)
{
var a11=this._gridElems,animCount=a11.length;
for(var a12=0;a12<animCount;++a12)
{
a11[a12].setAttribute("fill-opacity",a10);
}
}
ApacheRadarChart.prototype.SetDataAnimStep=function(a13)
{
var a14=this._dataElems,animCount=a14.length;
var a15=this._margins,marginLeft=a15.left,marginTop=a15.top;
var a16=(this._type==ApacheChart.TYPE_RADAR_AREA);
var a17=this._model,groupLabels=a17.getGroupLabels(),groupCount=groupLabels.length,
seriesLabels=a17.getSeriesLabels(),seriesCount=seriesLabels.length;
var a18=(this._width-marginLeft-a15.right);
var a19=(this._height-marginTop-a15.bottom);
var a20=marginLeft+a18/2,cy=marginTop+a19/2;
var a21=a13*seriesCount,animSeriesIndex=0;
if(a21>1)
{
animSeriesIndex=Math.floor(a21);
if(animSeriesIndex>=seriesCount)
animSeriesIndex=seriesCount-1;
a21=a21-Math.floor(a21);
}
var a22=(1-a21)*a20,ty=(1-a21)*cy;
var a23="translate("+a22+","+ty+") scale("+a21+","+a21+")";
var a24=animSeriesIndex;
this._setRadarSeriesAnimStep(a24,a14,a16,a23);
if(a24>0)
{
this._setRadarSeriesAnimStep(a24-1,a14,a16,"scale(1,1)");
}
if(a13==1)
{
for(var a24=0;a24<seriesCount;++a24)
{
this._setRadarSeriesAnimStep(a24,a14,a16,"scale(1,1)");
}
}
}
ApacheRadarChart.prototype._setRadarSeriesAnimStep=function(a25,a26,a27,a28)
{
a26[a25].setAttribute("transform",a28);
if(!a27)
{
var a29=a26["dots"+a25];
for(var a30=a29.length-1;a30>=0;--a30)
{
a29[a30].setAttribute("transform",a28);
}
}
}
ApacheRadarChart.prototype.DrawChartData=function()
{
this._drawRadar();
var a31=this._yLabels,rootElem=this._rootElement;
for(var a32=a31.length-1;a32>=0;a32--)
{
var a33=a31[a32];
if(a33)
{
rootElem.removeChild(a33);
rootElem.appendChild(a33);
}
}
}
ApacheRadarChart.prototype.SetStopOpacity=function(a34)
{
a34.setAttribute("stop-opacity",ApacheChart._DEFAULT_STOP_OPACITY/2);
}
ApacheRadarChart.prototype.SetLegendTopAdjustment=function(a35)
{
var a36=this._hLabelContainer;
a35-=a36.getBBox().height+ApacheChart._TEXT_MARGIN;
return a35;
}
ApacheRadarChart.prototype.SetLegendBottomAdjustment=function(a37)
{
var a38=this._hLabelContainer;
if(a38.childNodes.length>0)
{
a37+=a38.getBBox().height+ApacheChart._TEXT_MARGIN;
}
return a37;
}
ApacheRadarChart.prototype.SetLegendLeftAdjustment=function(a39)
{
var a40=this._hLabelContainer;
if(a40.childNodes.length>0)
{
a39-=a40.getBBox().width+ApacheChart._TEXT_MARGIN;
}
return a39;
}
ApacheRadarChart.prototype.SetLegendRightAdjustment=function(a41)
{
var a42=this._hLabelContainer;
if(a42.childNodes.length>0)
a41+=a42.getBBox().width+ApacheChart._TEXT_MARGIN;
return a41;
}
ApacheRadarChart.prototype.DrawGroupLabels=function()
{
var a43=this._svgDoc,rootElem=this._rootElement,model=this._model;
var a44=a43.createElementNS("http://www.w3.org/2000/svg","g");
this._hLabelContainer=a44;
var a45=this._labelElems,animate=(this._animDuration>0);
var a46=model.getGroupLabels(),vLineCount=a46.length;
var a47=a43.getElementById("groupLabelPrototype");
var a48,gLabelElems=this._groupLabelElems;
for(var a49=0;a49<vLineCount;++a49)
{
a48=a46[a49];
if(!a48)
continue;
a47=a47.cloneNode(true);
if(animate)
{
a45.push(a47);
a47.setAttribute("fill-opacity","0");
}
a47.firstChild.data=a48;
a44.appendChild(a47);
gLabelElems[a49]=a47;
}
rootElem.appendChild(a44);
}
ApacheRadarChart.prototype.AdjustMarginsForGroupLabels=function()
{
var a50=this._hLabelContainer;
if(a50.childNodes.length>0)
{
var a51=a50.getBBox();
var a52=a51.width+ApacheChart._TEXT_MARGIN,
dyVertical=a51.height+ApacheChart._TEXT_MARGIN;
this._margins.top+=dyVertical;
this._margins.bottom+=dyVertical;
this._margins.left+=a52;
this._margins.right+=a52;
}
}
ApacheRadarChart.prototype.LayoutGroupLabels=function()
{
var a53=this._model,margins=this._margins;
var a54=margins.left,marginTop=margins.top;
var a55=(this._width-a54-margins.right);
var a56,cy;
var a57=a54+a55/2,radius;
var a58=a53.getGroupLabels(),vLineCount=a58.length;
var a59,groupWidth=a55/vLineCount;
var a60=this._hLabelContainer,childNodes=a60.childNodes;
var a61=false,gLabelElems=this._groupLabelElems;
if(childNodes.length==0)
return;
for(var a62=0;a62<vLineCount;++a62)
{
a59=gLabelElems[a62];
if(!a59)
continue;
if(!a61)
{
var a63=a59.getBBox();
marginTop=margins.top;
a56=(this._height-marginTop-margins.bottom);
cy=marginTop+a56/2;
radius=Math.min(a55,a56)/2+a63.height-ApacheChart._TEXT_MARGIN/2;
a61=true;
}
var a64=(a62)*2*Math.PI/vLineCount;
var a65=a57+radius*Math.sin(a64),
dy=cy-radius*Math.cos(a64);
a59.setAttribute("y",dy);
var a66=a59.getBBox().width;
if(a64>Math.PI)
a65-=a66;
a59.setAttribute("x",a65);
}
}
ApacheRadarChart.prototype.DrawGrid=function()
{
this.Draw2DGrid();
}
ApacheRadarChart.prototype.Draw2DGrid=function()
{
var a67=this._svgDoc,rootElem=this._rootElement,
model=this._model,margins=this._margins;
var a68=this._gridElems,animate=(this._animDuration>0);
var a69=margins.left,marginTop=margins.top;
var a70=(this._width-a69-margins.right);
var a71=(this._height-marginTop-margins.bottom);
var a72=a69+a70/2,cy=marginTop+a71/2;
var a73=Math.min(a70,a71)/2;
var a74=this._gradientsUsed;
var a75=a67.getElementById("radarCirclePrototype").cloneNode(false);
a75.setAttribute("cx",a72);
a75.setAttribute("cy",cy);
a75.setAttribute("r",a73);
if(a74)
a75.setAttribute("fill","url(#gridGradient)");
if(animate)
{
a68.push(a75);
a75.setAttribute("fill-opacity","0");
}
rootElem.appendChild(a75);
var a76=this.GetVLineCount(),circleCount=this.GetHLineCount();
a75=a67.getElementById("radarInnerCirclePrototype");
a75.setAttribute("cx",a72);
a75.setAttribute("cy",cy);
for(var a77=0;a77<circleCount-1;++a77)
{
a75=a75.cloneNode(false);
if(animate)
{
a68.push(a75);
a75.setAttribute("fill-opacity","0");
}
var a78=a73-(a77+1)*a73/circleCount;
a75.setAttribute("r",a78);
rootElem.appendChild(a75);
}
var a79=new ApacheChartBuffer();
var a80=a67.getElementById("radarGridPathPrototype").cloneNode(false);
a79.append("M").append(a72).append(",").append(cy);
a79.append("l").append(0).append(",").append(-a73);
for(var a77=0;a77<a76-1;++a77)
{
var a81=a72+a73*Math.sin((a77+1)*2*Math.PI/a76),
dy=cy-a73*Math.cos((a77+1)*2*Math.PI/a76);
a79.append("M").append(a72).append(",").append(cy);
a79.append("L").append(a81).append(",").append(dy);
}
a80.setAttribute("d",a79.toString());
if(animate)
{
a68.push(a80);
a80.setAttribute("fill-opacity","0");
}
rootElem.appendChild(a80);
}
ApacheRadarChart.prototype.DrawYValueLabels=function()
{
}
ApacheRadarChart.prototype.LayoutYValueLabels=function()
{
var a82=this._svgDoc,rootElem=this._rootElement,
model=this._model,margins=this._margins;
var a83=margins.left,marginTop=margins.top;
var a84=(this._width-a83-margins.right);
var a85=(this._height-marginTop-margins.bottom);
var a86=this._labelElems,animate=(this._animDuration>0);
var a87=a83+a84/2,cy=marginTop+a85/2;
var a88=Math.min(a84,a85)/2;
var a89=this.GetVLineCount(),circleCount=this.GetHLineCount();
var a90=model.getMinYValue(),maxValue=model.getMaxYValue();
var a91=this._yLabels;
var a92=a82.getElementById("yLabelPrototype");
a92=a92.cloneNode(true);
var a93=this._addRadarYLabelAt(rootElem,a92,circleCount-1,
a87,marginTop,a93,this._formatValue(maxValue));
if(animate)
{
a86.push(a92);
a92.setAttribute("fill-opacity","0");
}
a92=a92.cloneNode(true);
this._addRadarYLabelAt(rootElem,a92,circleCount,
a87,cy,a93,this._formatValue(a90));
if(animate)
{
a86.push(a92);
a92.setAttribute("fill-opacity","0");
}
for(var a94=0;a94<circleCount-1;++a94)
{
var a95=(a94+1)*a88/circleCount;
var a96=((maxValue-a90)*(a94+1)/circleCount)+a90;
a92=a92.cloneNode(true);
this._addRadarYLabelAt(rootElem,a92,a94,a87,
a88-a95+marginTop,a93,this._formatValue(a96));
if(animate)
{
a86.push(a92);
a92.setAttribute("fill-opacity","0");
}
}
}
ApacheRadarChart.prototype._addRadarYLabelAt=function(
a97,a98,a99,
a100,a101,a102,a103)
{
this._yLabels[a99]=a98;
a98.firstChild.data=a103;
a97.appendChild(a98);
if(a102==null)
{
var a104=a98.getBBox();
a102=a104.height;
}
var a105=ApacheChart._TEXT_MARGIN,
textLength=a98.getBBox().width;
dx=a100-textLength-a105;
a98.setAttribute("x",dx);
a98.setAttribute("y",a101+a102/2);
return a102;
}
ApacheRadarChart.prototype._drawRadar=function()
{
var a106=this._svgDoc,rootElem=this._rootElement,
model=this._model,margins=this._margins;
var a107=this._dataElems,animate=(this._animDuration>0),dotElems;
var a108=margins.left,marginTop=margins.top;
var a109=(this._width-a108-margins.right);
var a110=(this._height-marginTop-margins.bottom);
var a111=a108+a109/2,cy=marginTop+a110/2;
var a112=Math.min(a109,a110)/2;
var a113=(this._type==ApacheChart.TYPE_RADAR_AREA);
var a114=a113?"areaPathPrototype":"linePathPrototype";
var a115,pathElem=a106.getElementById(a114);
var a116=model.getSeriesLabels(),seriesCount=a116.length;
var a117=model.getSeriesColors(),yValues=model.getYValues();
var a118=model.getMinYValue(),maxValue=model.getMaxYValue();
var a119="scale(0.00001,0.00001)";
var a120=this._gradientsUsed;
var a121=yValues.length;
var a122,dy;
if(!a113)
a115=a106.getElementById("lineDotPrototype");
for(var a123=0;a123<seriesCount;++a123)
{
var a124=new ApacheChartBuffer();
pathElem=pathElem.cloneNode(false);
if(animate)
{
a107.push(pathElem);
pathElem.setAttribute("transform",a119);
dotElems=a107["dots"+a123]=[];
}
for(var a125=0;a125<a121;++a125)
{
var a126=a112*(yValues[a125][a123]-a118)/(maxValue-a118);
var a122=a111+a126*Math.sin((a125)*2*Math.PI/a121),
dy=cy-a126*Math.cos((a125)*2*Math.PI/a121);
if(a125==0)
{
a124.append("M").append(a122).append(",").append(dy);
}
else
{
a124.append("L").append(a122).append(",").append(dy);
}
if(!a113)
{
a115=a115.cloneNode(false);
a115.setAttribute("cx",a122);
a115.setAttribute("cy",dy);
if(a120)
a115.setAttribute("fill","url(#gradient"+a123+")");
else
a115.setAttribute("fill",a117[a123]);
a115.setAttribute("stroke",a117[a123]);
if(animate)
{
dotElems.push(a115);
a115.setAttribute("transform",a119);
}
rootElem.appendChild(a115);
}
}
a124.append("Z");
if(a113)
{
if(a120)
pathElem.setAttribute("fill","url(#gradient"+a123+")");
else
pathElem.setAttribute("fill",a117[a123]);
}
else
{
pathElem.setAttribute("fill","none");
}
pathElem.setAttribute("stroke",a117[a123]);
pathElem.setAttribute("seriesIndex",a123);
if(this._tooltipsVisible)
{
pathElem.addEventListener("mousemove",this.ShowToolTipCallback,false);
pathElem.addEventListener("mouseout",this.HideToolTipCallback,false);
}
pathElem.addEventListener("click",this.ClickCallback,false);
pathElem.setAttribute("d",a124.toString());
rootElem.appendChild(pathElem);
}
}
ApacheRadarChart.prototype.isPointInPolygon=function(a127,a128,a129,a130)
{
var a131,j,npol=a128.length,inside=false;
for(a131=0,j=npol-1;a131<npol;j=a131++){
if((((a128[a131]<=a130)&&(a130<a128[j]))||
((a128[j]<=a130)&&(a130<a128[a131])))&&
(a129<(a127[j]-a127[a131])*(a130-a128[a131])/(a128[j]-a128[a131])+a127[a131]))
inside=!inside;
}
return inside;
}
ApacheRadarChart.prototype.GetChartEvent=function(a132,a133,a134)
{
var a135=a132.clientX,clientY=a132.clientY,evtTarget=a132.target;
var a136=(this._type==ApacheChart.TYPE_RADAR_AREA);
var a137=this._model,yValues=a137.getYValues();
var a138=a137.getMinYValue(),maxValue=a137.getMaxYValue();
var a139=this._margins,marginLeft=a139.left,marginTop=a139.top;
var a140=(this._width-marginLeft-a139.right);
var a141=(this._height-marginTop-a139.bottom);
var a142=marginLeft+a140/2,cy=marginTop+a141/2;
var a143=Math.min(a140,a141)/2;
var a144=a137.getSeriesLabels().length;
var a145=a137.getYValues(),seriesIndex;
var a146=a145.length;
if(a135<marginLeft||
a135>(marginLeft+a140)||
clientY<marginTop||
clientY>(marginTop+a141))
{
return null;
}
if(!a136)
seriesIndex=parseInt(evtTarget.getAttribute("seriesIndex"));
if(!a133)
a133=[];
if(!a134)
a134=[];
var a147,dy1,dx2,dy2,seriesIndices=[],seriesValues=[];
for(var a148=0;a148<a144;++a148)
{
if(!a136&&(seriesIndex!=a148))
continue;
for(var a149=0;a149<a146;++a149)
{
var a150=(a149!=a146-1)?a145[a149+1][a148]:a145[0][a148];
var a151=a143*(a145[a149][a148]-a138)/(maxValue-a138);
var a152=a143*(a150-a138)/(maxValue-a138);
var a153=a149*2*Math.PI/a146,
nextAngle=(a149+1)*2*Math.PI/a146;
var a147=a142+a151*Math.sin(a153),
dy1=cy-a151*Math.cos(a153);
dx2=a142+a152*Math.sin(nextAngle);
dy2=cy-a152*Math.cos(nextAngle);
if(this.isPointInPolygon([a142,a147,dx2],[cy,dy1,dy2],a135,clientY))
{
var a154=Math.atan2(cy-clientY,a135-a142);
if(a154<=Math.PI/2)
a154=Math.PI/2-a154;
else
a154=3*Math.PI/2+(Math.PI-a154);
var a155=(a154-a153)/(nextAngle-a153);
value=a145[a149][a148]+(a150-a145[a149][a148])*a155;
seriesValues.push(value);
seriesIndices.push(a148);
a134.push(dy1+(dy2-dy1)*a155);
a133.push(a147+(dx2-a147)*a155);
break;
}
}
}
return new ApacheChartEvent(seriesIndices,null,seriesValues,null);
}
ApacheRadarChart.prototype.ShowToolTip=function(a156)
{
this.HideToolTip();
var a157=[],seriesYs=[];
var a158=this.GetChartEvent(a156,a157,seriesYs);
if(a158==null||a158.getYValues().length==0)
{
return;
}
this._displayToolTips(a158.getYValues(),a158.getSeriesIndices(),
seriesYs,a157,a156);
}
ApacheRadarChart.prototype._displayToolTips=function(
a159,a160,
a161,a162,a163)
{
var a164=this._svgDoc,rootElem=this._rootElement;
var a165=this._model,seriesLabels=a165.getSeriesLabels(),
seriesCount=seriesLabels.length,seriesColors=a165.getSeriesColors();
var a166=a160.length,toolTips=this._toolTips;
var a167,dy;
for(var a168=0;a168<a166;++a168)
{
var a169=a160[a168];
var a170=toolTips[a169];
var a171=false;
if(a170==null)
{
a170=a164.getElementById("toolTip").cloneNode(true);
rootElem.appendChild(a170);
toolTips[a169]=a170;
a171=true;
}
a170.style.setProperty("visibility","visible","");
var a172=a170.firstChild.nextSibling;
var a173=a172.nextSibling.nextSibling;
var a174=a173.nextSibling.nextSibling;
var a175=a159.length;
var a176=a174.getBBox().width;
a174.firstChild.data=
seriesLabels[a169]+":  "+this._formatValue(a159[a168]);
if(a171)
{
var a177=parseInt(a173.getAttribute("height"));
var a178=parseInt(a174.getAttribute("y"));
a177-=a178;
a173.setAttribute("height",a177);
a174=a174.nextSibling.nextSibling;
a174.firstChild.data="";
}
a176+=2*ApacheChart._TEXT_MARGIN;
a173.setAttribute("width",a176);
var a179=a163.target.getBBox();
var a180=a170.getBBox();
a167=a162[a168];
a178=a161[a168]-a180.height;
if(a167+a180.width>this._width)
{
a167-=a180.width;
a172.setAttribute("cx",a173.getBBox().width);
}
else
{
a172.setAttribute("cx",0);
}
if(a178-a180.height<0)
{
a178+=a180.height;
a172.setAttribute("cy",0);
}
else
{
a172.setAttribute("cy",a173.getBBox().height);
}
a173.setAttribute("stroke",seriesColors[a169]);
a172.setAttribute("stroke",seriesColors[a169]);
a170.setAttribute("transform","translate("+a167+","+a178+")");
}
}
ApacheRadarChart.prototype.HideToolTip=function(a181)
{
var a182=this._toolTips,tooltipCount=a182.length;
for(var a183=0;a183<tooltipCount;++a183)
{
var a184=a182[a183];
if(a184)
a184.style.setProperty("visibility","hidden","");
}
}
function ApacheFunnelChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheFunnelChart);
ApacheFunnelChart.prototype.SetDataAnimStep=function(a5)
{
var a6=this._dataElems,animCount=a6.length;
var a7="scale("+a5+","+a5+")";
for(var a8=0;a8<animCount;++a8)
{
a6[a8].setAttribute("transform",a7);
}
}
ApacheFunnelChart.prototype.DrawChartData=function()
{
var a9=this._rootElement;
var a10=this._model,yValues=a10.getYValues(),yValueCount=yValues.length;
var a11=a10.getGroupLabels(),groupCount=a11?a11.length:1;
var a12=Math.ceil(Math.sqrt(yValueCount)),nRows=Math.round(Math.sqrt(yValueCount));
var a13=this._margins,dx=a13.left,dy=a13.top;
var a14=(this._width-a13.left-a13.right)/a12;
var a15=this._isPerspective?0:2*ApacheChart._TEXT_MARGIN;
var a16=(this._height-a13.top-a13.bottom-(nRows-1)*a15)/nRows;
var a17=this._svgDoc.getElementById("groupLabelPrototype");
for(var a18=0;a18<nRows;++a18)
{
for(var a19=0;a19<a12;++a19)
{
var a20=a11?(a18*a12+a19):(-1);
if(a20>=yValueCount)
break;
var a21=(a20==-1)?null:a11[a20];
var a22=a9.cloneNode(false);
a9.appendChild(a22);
var a23=this.DrawGroupLabelTitle(a21,a9,
a17.cloneNode(true),dx,dy,
a14,a16);
var a24=a14-2*ApacheChart._TEXT_MARGIN;
if(this._isPerspective)
{
a23-=a24/6;
this._drawPerspectiveFunnel(a22,a24,a23,a20);
a22.setAttribute("transform",
"translate("+(dx+ApacheChart._TEXT_MARGIN)+","+(dy+a24/12)+")");
}
else
{
this._drawFunnel(a22,a24,a23,a20);
a22.setAttribute("transform",
"translate("+(dx+ApacheChart._TEXT_MARGIN)+","+dy+")");
}
dx+=a14;
}
dx=a13.left;
dy+=a16+a15;
}
}
ApacheFunnelChart.prototype.ComputeMinMaxValues=function()
{
}
ApacheFunnelChart.prototype.DrawGroupLabels=function()
{
}
ApacheFunnelChart.prototype.LayoutGroupLabels=function()
{
}
ApacheFunnelChart.prototype.DrawGrid=function()
{
}
ApacheFunnelChart.prototype.DrawYValueLabels=function()
{
}
ApacheFunnelChart.prototype.LayoutYValueLabels=function()
{
}
ApacheFunnelChart.prototype._drawFunnel=function(
a25,a26,
a27,a28)
{
var a29=this._svgDoc,model=this._model,yValues=model.getYValues();
var a30=model.getGroupLabels(),seriesColors=model.getSeriesColors();
if(a28==-1)
a28=0;
var a31=yValues[a28].length;
var a32=0;
for(var a33=0;a33<a31;++a33)
{
a32+=yValues[a28][a33];
}
var a34=this._dataElems,animate=(this._animDuration>0)
var a35=a29.getElementById("funnelPathPrototype");
var a36=this._gradientsUsed;
var a37="scale(0.00001, 0.00001)";
var a38=0,y=0,slope=(a26/2)/a27,
dx=a26,dy,nextX,nextY;
for(var a33=a31-1;a33>=0;--a33)
{
a35=a35.cloneNode(false);
if(animate)
{
a34.push(a35);
a35.setAttribute("transform",a37);
}
var a39=(yValues[a28][a33])/(a32);
var a40=new ApacheChartBuffer();
a40.append("M").append(a38).append(",").append(y);
a40.append("L").append(dx).append(",").append(y);
dy=(a27)*a39;
nextY=y+dy;
nextX=a26/2-slope*(a27-(nextY));
dx=a26-nextX;
if(a33!=0)
{
a40.append("L").append(dx).append(",").append(nextY);
a40.append("L").append(nextX).append(",").append(nextY);
a40.append("Z");
}
else
{
var a41=(dy/3<=ApacheFunnelChart._MAX_FUNNEL_TIP)?y+(dy-dy/3):
a27-ApacheFunnelChart._MAX_FUNNEL_TIP;
nextX=a26/2-slope*(a27-(a41));
dx=a26-nextX;
a40.append("L").append(dx).append(",").append(a41);
a40.append("L").append(dx).append(",").append(a27);
a40.append("L").append(nextX).append(",").append(a27);
a40.append("L").append(nextX).append(",").append(a41);
a40.append("Z");
}
a35.setAttribute("d",a40.toString());
if(a36)
a35.setAttribute("fill","url(#gradient"+a33+")");
else
a35.setAttribute("fill",seriesColors[a33]);
a35.setAttribute("stroke",seriesColors[a33]);
a35.setAttribute("stroke-width",1);
a35.setAttribute("yValueIndex",a28);
a35.setAttribute("seriesIndex",a33);
if(this._tooltipsVisible)
{
a35.addEventListener("mouseover",this.ShowToolTipCallback,false);
a35.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a35.addEventListener("click",this.ClickCallback,false);
a25.appendChild(a35);
y=nextY;
a38=nextX;
}
}
ApacheFunnelChart.prototype._drawPerspectiveFunnel=function(
a42,a43,
a44,a45)
{
var a46=this._svgDoc,model=this._model,yValues=model.getYValues();
var a47=model.getGroupLabels(),seriesColors=model.getSeriesColors();
if(a45==-1)
a45=0;
var a48=yValues[a45].length;
var a49=0;
for(var a50=0;a50<a48;++a50)
{
a49+=yValues[a45][a50];
}
var a51=this._dataElems,animate=(this._animDuration>0)
var a52=a46.getElementById("funnelPathPrototype");
var a53=this._gradientsUsed;
var a54="scale(0.00001, 0.00001)";
var a55=0,y=0,slope=(a43/2)/a44,
dx=a43,dy,nextX,oldDx,nextY;
var a56=dx/2,ry=dx/24,oldRx,oldRy;
for(var a50=a48-1;a50>=0;--a50)
{
a52=a52.cloneNode(false);
if(animate)
{
a51.push(a52);
a52.setAttribute("transform",a54);
}
var a57=(yValues[a45][a50])/(a49);
var a58=new ApacheChartBuffer();
a58.append("M").append(a55).append(",").append(y);
a58.append("A").append(a56).append(",").append(ry);
a58.append(" 0 1,0 ").append(dx).append(",").append(y);
a58.append("A").append(a56).append(",").append(ry);
a58.append(" 0 1,0 ").append(a55).append(",").append(y);
oldDx=dx;
oldRx=a56;
oldRy=ry;
dy=(a44)*a57;
nextY=y+dy;
nextX=a43/2-slope*(a44-(nextY));
dx=a43-nextX;
a56=(dx-nextX)/2;
ry=a56/12;
if(a50!=0)
{
a58.append("L").append(nextX).append(",").append(nextY);
a58.append("A").append(a56).append(",").append(ry);
a58.append(" 0 1,0 ").append(dx).append(",").append(nextY);
a58.append("L").append(oldDx).append(",").append(y);
}
else
{
var a59=(dy/3<=ApacheFunnelChart._MAX_FUNNEL_TIP)?y+(dy-dy/3):
a44-ApacheFunnelChart._MAX_FUNNEL_TIP;
nextX=a43/2-slope*(a44-(a59));
dx=a43-nextX;
a56=(dx-nextX)/2;
ry=a56/12;
a58.append("L").append(nextX).append(",").append(a59);
a58.append("L").append(nextX).append(",").append(a44);
a58.append("A").append(a56).append(",").append(ry);
a58.append(" 0 1,0 ").append(dx).append(",").append(a44);
a58.append("A").append(a56).append(",").append(ry);
a58.append(" 0 1,0 ").append(nextX).append(",").append(a44);
a58.append("A").append(a56).append(",").append(ry);
a58.append(" 0 1,0 ").append(dx).append(",").append(a44);
a58.append("L").append(dx).append(",").append(a59);
a58.append("L").append(oldDx).append(",").append(y);
}
a52.setAttribute("d",a58.toString());
if(a53)
a52.setAttribute("fill","url(#gradient"+a50+")");
else
a52.setAttribute("fill",seriesColors[a50]);
a52.setAttribute("stroke",seriesColors[a50]);
a52.setAttribute("stroke-width",1);
a52.setAttribute("yValueIndex",a45);
a52.setAttribute("seriesIndex",a50);
if(this._tooltipsVisible)
{
a52.addEventListener("mouseover",this.ShowToolTipCallback,false);
a52.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a52.addEventListener("click",this.ClickCallback,false);
a42.appendChild(a52);
y=nextY;
a55=nextX;
}
}
ApacheFunnelChart.prototype.GetToolTipLocation=function(a60,a61)
{
var a62=a60.target;
var a63=a62.getBBox();
var a64=a62.parentNode.getCTM();
return{x:(a64.e+a63.x+a63.width/2),
y:(a64.f+a63.y+a63.height/2-a61.height)};
}
ApacheFunnelChart._MAX_FUNNEL_TIP=16;
function ApacheGaugeChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheChart,ApacheGaugeChart);
ApacheGaugeChart.prototype.Init=function(
a5,a6,a7,
a8,a9)
{
ApacheGaugeChart.superclass.Init.call(this,a5,a6,a7,
a8,a9);
}
ApacheGaugeChart.prototype.SetDataAnimStep=function(a10)
{
var a11=this._dataElems,animCount=a11.length;
var a12=this._model,yValues=a12.getYValues();
for(var a13=0;a13<animCount;++a13)
{
var a14=yValues[a13][0];
this.SetIndicatorPosition(a14,a11[a13],a10);
}
}
ApacheGaugeChart.prototype.SetIndicatorPosition=function(a15,a16,a17)
{
var a18,cx=this._animCx,cy=this._animCy;
var a19=this._model,minValue=a19.getMinYValue(),maxValue=a19.getMaxYValue();
var a20=a17*(a15-minValue)/(maxValue-minValue);
a18=Math.PI/6+a20*(5*Math.PI/3);
if(a18<Math.PI/2)
a18+=3*Math.PI/2;
else
a18-=Math.PI/2;
a18*=180/Math.PI;
a16.setAttribute("transform","rotate("+a18+" "+cx+" "+cy+")");
}
ApacheGaugeChart.prototype.DrawChartData=function()
{
if(this._yMinorGridCount<0)
this._yMinorGridCount=4;
var a21=this._rootElement;
var a22=this._model,yValues=a22.getYValues(),yValueCount=yValues.length
var a23=a22.getGroupLabels(),
groupCount=a23?a23.length:1;
var a24=Math.ceil(Math.sqrt(yValueCount)),nRows=Math.round(Math.sqrt(yValueCount));
var a25=this._margins,dx=a25.left,dy=a25.top;
var a26=(this._width-a25.left-a25.right)/a24;
var a27=2*ApacheChart._TEXT_MARGIN;
var a28=(this._height-a25.top-a25.bottom-(nRows-1)*a27)/nRows;
var a29=this._svgDoc.getElementById("groupLabelPrototype");
for(var a30=0;a30<nRows;++a30)
{
for(var a31=0;a31<a24;++a31)
{
var a32=a23?(a30*a24+a31):(-1);
if(a32>=yValueCount)
break;
var a33=(a32==-1)?null:a23[a32];
var a34=a21.cloneNode(false);
a21.appendChild(a34);
if(a33)
a29=a29.cloneNode(true);
var a35=this.DrawGroupLabelTitle(a33,a21,
a29,dx,dy,
a26,a28);
var a36=a26-2*ApacheChart._TEXT_MARGIN;
this.DrawDial(a34,a36,a35,a32);
a34.setAttribute("transform",
"translate("+(dx+ApacheChart._TEXT_MARGIN)+","+dy+")");
if(a33)
{
var a37=a34.getBBox(),gHeight=a37.height;
if(gHeight<a35-a27)
{
var a38=parseInt(a29.getAttribute("y"));
a38-=(a35-gHeight)/2-a27;
a29.setAttribute("y",a38);
}
}
dx+=a26;
}
dx=a25.left;
dy+=a28+a27;
}
}
ApacheGaugeChart.prototype.DrawLegend=function()
{
}
ApacheGaugeChart.prototype.ComputeMinMaxValues=function()
{
}
ApacheGaugeChart.prototype.DrawGroupLabels=function()
{
}
ApacheGaugeChart.prototype.LayoutGroupLabels=function()
{
}
ApacheGaugeChart.prototype.DrawGrid=function()
{
}
ApacheGaugeChart.prototype.DrawYValueLabels=function()
{
}
ApacheGaugeChart.prototype.LayoutYValueLabels=function()
{
}
ApacheGaugeChart.prototype.DrawDial=function(
a39,a40,
a41,a42)
{
var a43=this._svgDoc,model=this._model;
if(a42==-1)
a42=0;
var a44=this._dataElems,animate=(this._animDuration>0);
var a45=this.GetGaugeTemplateName();
var a46=a43.getElementById(a45).cloneNode(true);
a39.appendChild(a46);
var a47=a46.getBBox(),gaugeWidth=a47.width,
gaugeR=gaugeWidth/2;
var a48=this._markerTextGroup;
var a49=a46.getElementsByTagName("g");
var a50=a49.item(a49.length-1);
a50.setAttribute("yValueIndex",a42);
a50.setAttribute("seriesIndex",0);
if(this._tooltipsVisible)
{
a50.addEventListener("mouseover",this.ShowToolTipCallback,false);
a50.addEventListener("mouseout",this.HideToolTipCallback,false);
}
a50.addEventListener("click",this.ClickCallback,false);
if(this._animCx==null)
{
this._animCx=a50.getAttribute("_pivotCenterX");
this._animCy=a50.getAttribute("_pivotCenterY");
}
if(animate)
a44.push(a50);
else
{
this.SetIndicatorPosition(this._model.getYValues()[a42][0],a50,1);
}
if(a48!=null)
{
a48=a48.cloneNode(true);
a46.appendChild(a48);
}
else
{
this.CreateTextMarkerGroup(a46,gaugeR);
}
this.ScaleGauge(a46,a40,a41,gaugeWidth,a47.height);
}
ApacheGaugeChart.prototype.GetGaugeTemplateName=function()
{
return"circularGauge";
}
ApacheGaugeChart.prototype.CreateTextMarkerGroup=function(a51,a52)
{
var a53=this._svgDoc,model=this._model;
var a54=a53.createElementNS("http://www.w3.org/2000/svg","g");
a51.appendChild(a54);
this._markerTextGroup=a54;
var a55=a53.getElementById("gaugeMarkerMajor"),
majorMarkerCount=this._yMajorGridCount,
minorMarker=a53.getElementById("gaugeMarkerMinor"),
minorMarkerCount=this._yMinorGridCount,
textElem=a53.getElementById("gaugeTextPrototype");
var a56=a51.getElementsByTagName("path");
var a57=parseInt(a51.getAttribute("_markerRadius"));
var a58=model.getMinYValue(),maxValue=model.getMaxYValue();
var a59,y,angle,textMargin;
for(var a60=0,theta=Math.PI/6;
a60<=majorMarkerCount;++a60,theta+=(5*Math.PI/3)/majorMarkerCount)
{
var a61;
if(theta<Math.PI/2)
a61=theta+3*Math.PI/2;
else
a61=theta-Math.PI/2;
a59=a52-a57*(Math.cos(a61));
y=a52-a57*(Math.sin(a61));
var a62=a61*180/Math.PI;
var a63=a55.cloneNode(true);
a54.appendChild(a63);
a63.setAttribute("transform",
"translate("+a59.toFixed(0)+","+y.toFixed(0)+") rotate("+a62.toFixed(0)+" 0 0)");
var a64=a58+a60*(maxValue-a58)/(majorMarkerCount);
textElem=textElem.cloneNode(true);
textElem.firstChild.data=this._formatValue(a64);
a54.appendChild(textElem);
var a65=textElem.getBBox();
if(a60==0)
{
textMargin=a65.height/2;
}
a59=a52-(a57-textMargin)*(Math.cos(a61));
y=a52-(a57-textMargin)*(Math.sin(a61));
if(theta>=5*Math.PI/6&&theta<=7*Math.PI/6)
{
y+=a65.height;
a59-=a65.width/2
}
else
{
y+=a65.height/2;
if(theta<Math.PI)
a59+=2*ApacheChart._TEXT_MARGIN;
else
a59-=a65.width+2*ApacheChart._TEXT_MARGIN;
}
textElem.setAttribute("transform",
"translate("+a59.toFixed(0)+","+y.toFixed(0)+")");
}
for(var a60=(minorMarkerCount+1),
theta=Math.PI/6+(5*Math.PI/3)/(majorMarkerCount*minorMarkerCount);
a60<=(majorMarkerCount+1)*minorMarkerCount;
++a60,theta+=(5*Math.PI/3)/(majorMarkerCount*minorMarkerCount))
{
if(a60%minorMarkerCount==0)
continue;
var a61;
if(theta<Math.PI/2)
a61=theta+3*Math.PI/2;
else
a61=theta-Math.PI/2;
var a59=a52-a57*(Math.cos(a61));
var a66=a52-a57*(Math.sin(a61));
var a62=a61*180/Math.PI;
var a63=minorMarker.cloneNode(true);
a54.appendChild(a63);
a63.setAttribute("transform",
"translate("+a59.toFixed(0)+","+a66.toFixed(0)+") rotate("+a62.toFixed(0)+" 0 0)");
}
}
ApacheGaugeChart.prototype.ScaleGauge=function(a67,a68,a69,a70,a71)
{
var a72=Math.min(a68,a69);
var a73=(a72==a68)?0:(a68-a72)/2,
ty=(a72==a69)?0:(a69-a72)/2;
var a74=a72/a70;
a67.setAttribute("transform","translate("+a73+","+ty+") scale("+a74+","+a74+")");
}
ApacheGaugeChart.prototype.GetChartEvent=function(a75)
{
var a76=a75.target;
while(a76!=null&&a76.tagName!="g")
a76=a76.parentNode;
if(a76==null)
return null;
var a77=parseInt(a76.getAttribute("yValueIndex"));
var a78=this._model,yValues=a78.getYValues();
return new ApacheChartEvent(null,[a77],[yValues[a77][0]],null);
}
ApacheGaugeChart.prototype.FillToolTipData=function(a79,a80,a81)
{
var a82=this.GetChartEvent(a81);
if(a82==null)
return;
var a83=a82.getYValues()[0];
var a84=this._model.getGroupLabels();
var a85=a79.nextSibling.nextSibling;
a85.firstChild.data=""+this._formatValue(a83);
var a86=a85.getBBox().width;
a85=a85.nextSibling.nextSibling;
a85.firstChild.data="";
var a87=a86+2*ApacheChart._TEXT_MARGIN;
a79.setAttribute("width",a87);
a79.setAttribute("stroke",seriesColors[0]);
a80.setAttribute("r",0);
}
ApacheGaugeChart.prototype.GetToolTipLocation=function(a88,a89)
{
return{x:(a88.clientX+20),y:(a88.clientY+20)};
}
function ApacheSemiGaugeChart(
a0,a1,a2,
a3,a4)
{
this.Init(a0,a1,a2,a3,a4);
}
ApacheChartObj.Inherit(ApacheGaugeChart,ApacheSemiGaugeChart);
ApacheSemiGaugeChart.prototype.SetIndicatorPosition=function(a5,a6,a7)
{
var a8,cx=this._animCx,cy=this._animCy;
var a9=this._model,minValue=a9.getMinYValue(),maxValue=a9.getMaxYValue();
var a10=a7*(a5-minValue)/(maxValue-minValue);
a8=a10*Math.PI;
a8*=180/Math.PI;
a6.setAttribute("transform","rotate("+a8+" "+cx+" "+cy+")");
}
ApacheSemiGaugeChart.prototype.GetGaugeTemplateName=function()
{
return"semiGauge";
}
ApacheSemiGaugeChart.prototype.CreateTextMarkerGroup=function(a11,a12)
{
var a13=this._svgDoc,model=this._model;
gElem=a13.createElementNS("http://www.w3.org/2000/svg","g");
a11.appendChild(gElem);
this._markerTextGroup=gElem;
var a14=a13.getElementById("gaugeMarkerMajor"),
majorMarkerCount=this._yMajorGridCount,
minorMarker=a13.getElementById("gaugeMarkerMinor"),
minorMarkerCount=this._yMinorGridCount,
textElem=a13.getElementById("gaugeTextPrototype");
var a15=a11.getElementsByTagName("path");
var a16=parseInt(a11.getAttribute("_markerRadius"));
var a17=model.getMinYValue(),maxValue=model.getMaxYValue();
var a18,y,angle,textMargin;
for(var a19=0;a19<=majorMarkerCount;++a19)
{
var a20=a19*Math.PI/majorMarkerCount;
a18=a12-a16*(Math.cos(a20));
y=a12-a16*(Math.sin(a20));
var a21=a20*180/Math.PI;
var a22=a14.cloneNode(true);
gElem.appendChild(a22);
a22.setAttribute("transform",
"translate("+a18.toFixed(0)+","+y.toFixed(0)+") rotate("+a21.toFixed(0)+" 0 0)");
var a23=a17+a19*(maxValue-a17)/(majorMarkerCount);
textElem=textElem.cloneNode(true);
textElem.firstChild.data=this._formatValue(a23);
gElem.appendChild(textElem);
var a24=textElem.getBBox();
if(a19==0)
{
textMargin=a24.height/2;
}
a18=a12-(a16-textMargin)*(Math.cos(a20));
y=a12-(a16-textMargin)*(Math.sin(a20));
if(a20>=Math.PI/3&&a20<=2*Math.PI/3)
{
y+=a24.height;
a18-=a24.width/2
}
else
{
y+=a24.height/2;
if(a20<Math.PI/2)
a18+=2*ApacheChart._TEXT_MARGIN;
else
a18-=a24.width+2*ApacheChart._TEXT_MARGIN;
}
textElem.setAttribute("transform",
"translate("+a18.toFixed(0)+","+y.toFixed(0)+")");
}
for(var a19=1;a19<=(majorMarkerCount)*minorMarkerCount;++a19)
{
if(a19%minorMarkerCount==0)
continue;
var a20=a19*Math.PI/(majorMarkerCount*minorMarkerCount);
var a18=a12-a16*(Math.cos(a20));
var a25=a12-a16*(Math.sin(a20));
var a21=a20*180/Math.PI;
var a22=minorMarker.cloneNode(true);
gElem.appendChild(a22);
a22.setAttribute("transform",
"translate("+a18.toFixed(0)+","+a25.toFixed(0)+") rotate("+a21.toFixed(0)+" 0 0)");
}
}
ApacheSemiGaugeChart.prototype.ScaleGauge=function(
a26,
a27,
a28,
a29,
a30)
{
var a31=a27/a29,sy=a28/a30;
var a32=Math.min(a31,sy);
var a33=(a27<=a29)?0:(a27-a29)/2,
ty=(a28<=a30)?0:(a28-a30)/2;
a26.setAttribute("transform","translate("+a33+","+ty+") scale("+a32+","+a32+")");
}

function TrPage()
{
this._loadedLibraries=TrPage._collectLoadedLibraries();
this._requestQueue=new TrRequestQueue(window);
}
TrPage.getInstance=function()
{
if(TrPage._INSTANCE==null)
TrPage._INSTANCE=new TrPage();
return TrPage._INSTANCE;
}
TrPage.prototype.getRequestQueue=function()
{
return this._requestQueue;
}
TrPage.prototype.sendPartialFormPost=function(
a0,
a1,
a2)
{
this.getRequestQueue().sendFormPost(
this,this._requestStatusChanged,
a0,a1,a2);
}
TrPage.prototype._requestStatusChanged=function(a3)
{
if(a3.getStatus()==TrXMLRequestEvent.STATUS_COMPLETE)
{
var a4=a3.getResponseStatusCode();
if(a4==200)
{
_pprStopBlocking(window);
if(a3.isPprResponse())
{
var a5=a3.getResponseXML();
if(a5!=null)
{
this._handlePprResponse(a5.documentElement);
}
}
else
{
}
}
else if(a4>=400)
{
_pprStopBlocking(window);
}
}
}
TrPage.prototype._handlePprResponse=function(a6)
{
var a7=TrPage._getNodeName(a6);
if(a7=="content")
{
this._handlePprResponseAction(a6);
var a8=a6.childNodes;
var a9=a8.length;
for(var a10=0;a10<a9;a10++)
{
var a11=a8[a10];
var a12=TrPage._getNodeName(a11);
if(a12=="fragment")
{
this._handlePprResponseFragment(a11);
}
else if(a12=="script")
{
this._handlePprResponseScript(a11);
}
else if(a12=="script-library")
{
this._handlePprResponseLibrary(a11);
}
}
}
else if(a7=="redirect")
{
var a13=TrPage._getTextContent(a6);
window.location.href=a13;
}
else if(a7=="error")
{
var a14=TrPage._getTextContent(a6);
if(a14==null)
a14="Unknown error during PPR";
alert(a14);
}
else if(a7=="noop")
{
}
else
{
}
}
TrPage.prototype._addResetFields=function(a15,a16)
{
var a17=this._resetFields;
if(!a17)
{
a17=new Object();
this._resetFields=a17;
}
var a18=a17[a15];
if(!a18)
{
a18=new Object();
a17[a15]=a18;
}
for(var a19=0;a19<a16.length;a19++)
{
a18[a16[a19]]=true;
}
}
TrPage.prototype._resetHiddenValues=function(a20)
{
var a21=this._resetFields;
if(a21)
{
var a22=a21[a20.getAttribute("name")];
if(a22)
{
for(var a23 in a22)
{
var a24=a20[a23];
if(!a24)
a24=a20.elements.currField;
if(a24)
a24.value='';
}
}
}
}
TrPage.prototype._addResetCalls=function(
a25,
a26)
{
var a27=this._resetCalls;
if(!a27)
{
a27=new Object();
this._resetCalls=a27;
}
var a28=a27[a25];
if(!a28)
{
a28=new Object();
a27[a25]=a28;
}
for(var a29 in a26)
{
a28[a29]=a26[a29];
}
}
TrPage.prototype._resetForm=function(form)
{
var resetCalls=this._resetCalls;
if(!resetCalls)
return false;
var formReset=resetCalls[form.getAttribute("name")];
if(!formReset)
return false;
var doReload=false;
for(var k in formReset)
{
var trueResetCallback=unescape(formReset[k]);
if(eval(trueResetCallback))
doReload=true;
}
return doReload;
}
TrPage._getNodeName=function(a30)
{
var a31=a30.nodeName;
if(!a31)
a31=a30.tagName;
return a31;
}
TrPage.prototype._handlePprResponseAction=function(a32)
{
var a33=a32.getAttribute("action");
if(a33)
{
var a34=window.document;
a34.forms[0].action=a33;
}
}
TrPage.prototype._handlePprResponseFragment=function(a35)
{
var a36=window.document;
var a37;
var a38;
var a39=null;
if(_agent.isWindowsMobile6)
{
var a40=a35.childNodes[0];
if(!a40)
return;
var a41=a40.data;
tempDiv=a36.createElement("div");
tempDiv.id="tempDiv";
tempDiv.hidden="true";
var a42=a36.body;
a42.appendChild(tempDiv);
tempDiv.innerHTML=a41;
var a43=TrPage._getFirstElementWithId(tempDiv);
var a37=_getElementById(a36,a43.id);
if(!a37)
{
return;
}
a38=_getActiveElement();
if(a38&&TrPage._isDomAncestorOf(a38,a37))
a39=a38.id;
a37.parentNode.insertBefore(a43,a37);
a37.innerHTML="";
a37.parentNode.removeChild(a37);
tempDiv.innerHTML="";
a42.removeChild(tempDiv);
}
else
{
var a43=this._getFirstElementFromFragment(a35);
if(!a43)
return;
var a44=a43.getAttribute("id");
if(!a44)
return;
a37=_getElementById(a36,a44);
a38=_getActiveElement();
if(a38&&TrPage._isDomAncestorOf(a38,a37))
a39=a38.id;
if(a37)
a37.parentNode.replaceChild(a43,a37);
}
var a45=this._domReplaceListeners;
if(a45)
{
for(var a46=0;a46<a45.length;a46+=2)
{
var a47=a45[a46];
var a48=a45[a46+1];
if(a48!=null)
a47.call(a48,a37,a43);
else
a47(a37,a43);
}
}
if(a39)
{
a38=a36.getElementById(a39);
if(a38&&a38.focus)
{
a38.focus();
window._trActiveElement=a38;
}
}
}
TrPage._isDomAncestorOf=function(a49,a50)
{
while(a49)
{
if(a49==a50)
return true;
var a51=a49.parentNode;
if(a51==a49)
break;
a49=a51;
}
return false;
}
TrPage.prototype.__replaceDomElement=function(a52,a53)
{
a53.parentNode.replaceChild(a52,a53);
}
TrPage.prototype._getFirstElementFromFragment=function(a54)
{
var a55=a54.childNodes;
var a56=a54.childNodes[0];
var a57=a56.data;
var a58=window.document;
var a59=a58.createElement("div");
a59.innerHTML=a57;
return TrPage._getFirstElementWithId(a59);
}
TrPage._getFirstElementWithId=function(a60)
{
var a61=a60.childNodes;
var a62=a61.length;
for(var a63=0;a63<a62;a63++)
{
var a64=a61[a63];
if(a64.id)
{
if(!_agent.supportsNodeType)
{
return a64;
}
else if(a64.nodeType==1)
{
return a64;
}
}
return TrPage._getFirstElementWithId(a64);
}
return null;
}
TrPage.prototype._loadScript=function(source)
{
var loadedLibraries=this._loadedLibraries;
if(loadedLibraries[source])
return;
loadedLibraries[source]=true;
var xmlHttp=new TrXMLRequest();
xmlHttp.setSynchronous(true);
xmlHttp.send(source,null);
if(xmlHttp.getStatus()==200)
{
var responseText=xmlHttp.getResponseText();
if(responseText)
{
if(_agent.isIE)
window.execScript(responseText);
else
window.eval(responseText);
}
}
xmlHttp.cleanup();
}
TrPage.prototype._handlePprResponseScript=function(scriptNode)
{
var source=scriptNode.getAttribute("src");
if(source)
{
this._loadScript(source);
}
else
{
var nodeText=TrPage._getTextContent(scriptNode);
if(nodeText)
{
if(_agent.isIE)
window.execScript(nodeText);
else
window.eval(nodeText);
}
}
}
TrPage.prototype._handlePprResponseLibrary=function(a65)
{
var a66=TrPage._getTextContent(a65);
this._loadScript(a66);
}
TrPage._getTextContent=function(a67)
{
if(_agent.isIE)
{
var a68=a67.innerText;
if(a68==undefined)
a68=a67.text;
return a68;
}
if(_agent.isSafari)
{
var a69="";
var a70=a67.firstChild;
while(a70)
{
var a71=a70.nodeType;
if((a71==3)||(a71==4))
a69=a69+a70.data;
a70=a70.nextSibling;
}
return a69;
}
return a67.textContent;
}
TrPage._collectLoadedLibraries=function()
{
if(!_agent.supportsDomDocument)
{
return null;
}
else
{
var a72=new Object();
var a73=window.document;
var a74=a73.getElementsByTagName("script");
if(a74!=null)
{
for(var a75=0;a75<a74.length;a75++)
{
var a76=a74[a75].getAttribute("src");
if(a76)
{
a72[a76]=true;
}
}
}
return a72;
}
}
TrPage.prototype.addDomReplaceListener=function(a77,a78)
{
var a79=this._domReplaceListeners;
if(!a79)
{
a79=new Array();
this._domReplaceListeners=a79;
}
a79.push(a77);
a79.push(a78);
}
TrPage.prototype.removeDomReplaceListener=function(a80,a81)
{
var a82=this._domReplaceListeners;
var a83=a82.length;
for(var a84=0;a84<a83;a84++)
{
var a85=a82[a84];
a84++;
if(a85==a80)
{
var a86=a82[a84];
if(a86===a81)
{
a82.splice(a84-1,2);
break;
}
}
}
if(a82.length==0)
{
this._domReplaceListeners=null;
}
}
TrPage.prototype.addStyleClassMap=function(a87)
{
if(!a87)
return;
if(!this._styleClassMap)
this._styleClassMap=new Object();
for(var a88 in a87)
this._styleClassMap[a88]=a87[a88];
}
TrPage.prototype.getStyleClass=function(a89)
{
if(a89&&this._styleClassMap)
{
var a90=this._styleClassMap[a89];
if(a90)
return a90;
}
return a89;
}
TrPage._autoSubmit=function(a91,a92,a93,a94,a95)
{
if(_agent.isIE)
{
if(a93["type"]=="hidden")
a93=window.event;
}
var a96=true;
if(_TrEventBasedValidation)
a96=_validateInput(a93,true);
if(a96)
{
if(!a95)
a95=new Object();
a95.event="autosub";
a95.source=a92;
_submitPartialChange(a91,a94,a95);
}
}

function TrStatusIndicator()
{
}
TrStatusIndicator._register=function(a0)
{
if(!TrStatusIndicator._registered)
{
TrStatusIndicator._registered=new Object();
TrPage.getInstance().getRequestQueue().addStateChangeListener(
TrStatusIndicator._handleStateChange);
}
TrStatusIndicator._registered[a0]=true;
}
TrStatusIndicator._handleStateChange=function(a1)
{
var a2=a1==TrRequestQueue.STATE_BUSY;
for(id in TrStatusIndicator._registered)
{
var a3=document.getElementById(id+"::busy");
if(!a3)
continue;
a3.style.display=a2?"inline":"none";
var a4=document.getElementById(id+"::ready");
a4.style.display=a2?"none":"inline";
}
}

function TrRequestQueue(a0)
{
this._state=TrRequestQueue.STATE_READY;
this._requestQueue=new Array();
this._stateChangeListeners=null;
this._window=a0;
}
TrRequestQueue.STATE_READY=0;
TrRequestQueue.STATE_BUSY=1;
TrRequestQueue._MULTIPART_FRAME="_trDTSFrame";
TrRequestQueue._XMLHTTP_TYPE=0;
TrRequestQueue._MULTIPART_TYPE=1;
TrRequestQueue.prototype.dispose=function()
{
this._requestQueue=null;
this._stateChangeListeners=null;
this._window=null;
}
TrRequestQueue._RequestItem=function(
a1,
a2,
a3,
a4,
a5,
a6
)
{
this._type=a1;
this._context=a2;
this._actionURL=a3;
this._headerParams=a4;
this._content=a5;
this._method=a6;
}
TrRequestQueue.prototype._broadcastRequestStatusChanged=function(
a7,a8,a9)
{
if(a8)
{
try
{
a8.call(a7,a9);
}
catch(e)
{
TrRequestQueue._logError(
"Error ",e," delivering XML request status changed to ",
a8);
}
}
}
TrRequestQueue.prototype._addRequestToQueue=function(
a10,
a11,
a12,
a13,
a14,
a15
)
{
var a16=new TrRequestQueue._RequestItem(
a10,a11,a13,a15,a14,a12);
this._requestQueue.push(a16);
try
{
var a17=new TrXMLRequestEvent(
TrXMLRequestEvent.STATUS_QUEUED,
null);
this._broadcastRequestStatusChanged(a11,a12,a17);
}
catch(e)
{
TrRequestQueue._logError("Error on listener callback invocation - STATUS_QUEUED",e);
}
if(this._state==TrRequestQueue.STATE_READY)
{
this._state=TrRequestQueue.STATE_BUSY;
this._broadcastStateChangeEvent(TrRequestQueue.STATE_BUSY);
this._doRequest();
}
}
TrRequestQueue.prototype.sendFormPost=function(
a18,
a19,
a20,
a21,
a22
)
{
if(this._isMultipartForm(a20))
{
this.sendMultipartRequest(a18,a19,a20.action,a20,a21);
}
else
{
var a23=this._getPostbackContent(a20,a21);
if(_agent.isIE&&window.external)
window.external.AutoCompleteSaveForm(a20);
this.sendRequest(a18,a19,a20.action,a23,a22);
}
}
TrRequestQueue.prototype._isMultipartForm=function(a24)
{
if(!_agent.supportsDomDocument)
{
return false;
}
if(a24.enctype.toLowerCase()!="multipart/form-data")
return false;
var a25=a24.getElementsByTagName("input"),
inputCount=a25.length,multiPartForm=null;
for(var a26=0;a26<inputCount;++a26)
{
var a27=a25[a26];
if(a27.type=="file"&&a27.value)
{
return true;
}
}
return false;
}
TrRequestQueue.prototype._getPostbackContent=function(a28,a29)
{
var a30=a28.elements;
var a31={};
if(a30)
{
for(var a32=0;a32<a30.length;a32++)
{
var a33=a30[a32];
if(a33.name&&!a33.disabled&&!(a33.tagName=="INPUT"&&a33.type=="submit"))
{
if(a33.options)
{
a31[a33.name]=new Array();
for(var a34=0;a34<a33.options.length;a34++)
{
var a35=a33.options[a34];
if(a35.selected)
{
var a36=(a35.value===null)?
a35.text:a35.value;
a31[a33.name].push(a36);
}
}
}
else if(!((a33.type=="checkbox"||
a33.type=="radio")&&
!a33.checked))
{
var a37=a31[a33.name];
if(a37)
{
if(!a37.join)
{
var a38=new Array();
a38.push(a37);
a31[a33.name]=a38;
a37=a38;
}
a37.push(a33.value);
}
else
{
a31[a33.name]=a33.value;
}
}
}
}
}
for(var a39 in a29)
{
var a40=a29[a39];
a31[a39]=a29[a39];
}
var a41="";
for(var a39 in a31)
{
var a42=a31[a39];
if(a42!=null)
{
if(a42.join)
{
var a43=a42;
for(var a44=0;a44<a43.length;a44++)
{
a41=TrRequestQueue._appendUrlFormEncoded(a41,a39,a43[a44]);
}
}
else
{
a41=TrRequestQueue._appendUrlFormEncoded(a41,a39,a42);
}
}
}
return a41;
}
TrRequestQueue._appendUrlFormEncoded=function(
a45,
a46,
a47)
{
if(a45.length>0)
{
a45=a45+"&";
}
return a45+a46+"="+a47.toString().replace(/\%/g,'%25')
.replace(/\+/g,'%2B')
.replace(/\//g,'%2F')
.replace(/\&/g,'%26')
.replace(/\"/g,'%22')
.replace(/\'/g,'%27');
}
TrRequestQueue.prototype.sendRequest=function(
a48,
a49,
a50,
a51,
a52
)
{
this._addRequestToQueue(TrRequestQueue._XMLHTTP_TYPE,a48,a49,a50,a51,a52);
}
TrRequestQueue.prototype.sendMultipartRequest=function(
a53,
a54,
a55,
a56,
a57
)
{
var a58=
{"htmlForm":a56,"params":a57,"context":a53,"method":a54};
this._addRequestToQueue(TrRequestQueue._MULTIPART_TYPE,a58,null,a55);
}
TrRequestQueue.prototype._doRequest=function()
{
var a59=this._requestQueue.shift();
switch(a59._type)
{
case TrRequestQueue._XMLHTTP_TYPE:
this._doXmlHttpRequest(a59);
break;
case TrRequestQueue._MULTIPART_TYPE:
this._doRequestThroughIframe(a59);
break;
}
}
TrRequestQueue.prototype._doXmlHttpRequest=function(a60)
{
var a61=new TrXMLRequest();
a61.__dtsRequestContext=a60._context;
a61.__dtsRequestMethod=a60._method;
var a62=TrUIUtils.createCallback(this,this._handleRequestCallback);
a61.setCallback(a62);
a61.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
var a63=a60._headerParams;
if(a63!=null)
{
for(var a64 in a63)
{
var a65=a63[a64];
if(a65["join"])
a65=a65.join(',')
a61.setRequestHeader(a64,a65);
}
}
a61.send(a60._actionURL,a60._content);
}
TrRequestQueue.prototype._doRequestThroughIframe=function(a66)
{
var a67=a66._context.htmlForm;
var a68=a66._actionURL;
var a69=a66._context.params;
var a70=TrRequestQueue._MULTIPART_FRAME;
var a71=this._getDomDocument();
var a72=a71.getElementById(a70),iframeDoc;
var a73=_agent.isIE;
if(!a72)
{
a72=a71.createElement('iframe');
a72.name=a70;
a72.id=a70;
var a74=a72.style;
a74.top=a74.left='0px';
a74.width=a74.height='1px'
a74.position='absolute';
a74.visibility="hidden";
a71.body.appendChild(a72);
}
if(a73)
{
a72=a71.frames[a70];
a72.name=a70;
iframeDoc=a72.document;
}
else if(_agent.isSafari)
{
iframeDoc=a72.document;
}
else
{
iframeDoc=a72.contentDocument;
}
if(iframeDoc&&iframeDoc.firstChild)
iframeDoc.removeChild(iframeDoc.firstChild);
this._dtsContext=a66._context.context;
this._dtsRequestMethod=a66._context.method;
this._htmlForm=a67;
this._savedActionUrl=a67.action;
this._savedTarget=a67.target;
a67.method="POST";
a67.action=a68;
a67.target=a70;
this._appendParamNode(a71,a67,"Tr-XHR-Message","true");
this._appendParamNode(a71,a67,"partial","true");
if(a69)
{
for(var a75 in a69)
{
this._appendParamNode(a71,a67,a75,a69[a75]);
}
}
if(this._iframeLoadCallback==null)
this._iframeLoadCallback=TrUIUtils.createCallback(this,this._handleIFrameLoad);
if(_agent.isIE&&window.external)
window.external.AutoCompleteSaveForm(a67);
a67.submit();
this._window.setTimeout(this._iframeLoadCallback,50);
}
TrRequestQueue.prototype._appendParamNode=function(a76,a77,a78,a79)
{
var a80=this._paramNodes;
if(!a80)
{
a80=new Array();
this._paramNodes=a80;
}
var a81=a76.createElement("input");
a81.type="hidden";
a81.name=a78;
a81.value=a79;
a80.push(a81);
a77.appendChild(a81);
}
TrRequestQueue.prototype._clearParamNodes=function()
{
var a82=this._paramNodes;
if(a82)
{
var a83=a82[0].parentNode;
var a84=a82.length;
for(var a85=0;a85<a84;a85++)
{
a83.removeChild(a82[a85]);
}
delete this._paramNodes;
}
}
TrRequestQueue.prototype._handleIFrameLoad=function()
{
var a86=this._getDomDocument();
var a87=_agent.isIE;
var a88=TrRequestQueue._MULTIPART_FRAME;
var a89,iframeDoc;
if(a87)
{
a89=a86.frames[a88];
var a90=a89.document;
}
else
{
a89=a86.getElementById(a88);
a90=a89.contentDocument;
}
try
{
if(!a90.documentElement||!a90.documentElement.firstChild
||(a87&&a90.readyState!="complete"))
{
this._window.setTimeout(this._iframeLoadCallback,50);
}
else
{
this._onIFrameLoadComplete(a90,this._dtsContext,
this._dtsRequestMethod);
}
}
catch(e)
{
TrRequestQueue._alertError();
TrRequestQueue._logError("Error while performing request",e);
this._htmlForm.action=this._savedActionUrl;
this._htmlForm.target=this._savedTarget;
}
}
TrRequestQueue.prototype._onIFrameLoadComplete=function(
a91,
a92,
a93)
{
try
{
var a94=new TrIFrameXMLRequestEvent(
a91);
this._broadcastRequestStatusChanged(a92,a93,a94);
}
finally
{
if(a91.firstChild)
a91.removeChild(a91.firstChild);
this._htmlForm.action=this._savedActionUrl;
this._htmlForm.target=this._savedTarget;
this._clearParamNodes();
this._requestDone();
}
}
TrRequestQueue.prototype._handleRequestCallback=function(
a95
)
{
var a96=a95.getCompletionState();
if(a96!=TrXMLRequest.COMPLETED)
return;
var a97=0;
var a98=TrRequestQueue._getFailedConnectionText();
try
{
a97=a95.getStatus();
}
catch(e)
{
}
if((a97!=200)&&(a97!=0))
{
TrRequestQueue._alertError();
TrRequestQueue._logError("Error StatusCode(",
a97,
") while performing request\n",
a95.getResponseText());
}
try
{
if(a97!=0)
{
var a99=new TrXMLRequestEvent(
TrXMLRequestEvent.STATUS_COMPLETE,
a95);
this._broadcastRequestStatusChanged(
a95.__dtsRequestContext,
a95.__dtsRequestMethod,
a99);
}
}
finally
{
a95.cleanup();
delete a95;
this._requestDone();
}
}
TrRequestQueue.prototype._requestDone=function()
{
if(this._requestQueue.length>0)
{
this._doRequest();
}
else
{
this._state=TrRequestQueue.STATE_READY;
this._broadcastStateChangeEvent(TrRequestQueue.STATE_READY);
}
}
TrRequestQueue.prototype.addStateChangeListener=function(a100,a101)
{
var a102=this._stateChangeListeners;
if(!a102)
{
a102=new Array();
this._stateChangeListeners=a102;
}
a102.push(a100);
a102.push(a101);
}
TrRequestQueue.prototype.removeStateChangeListener=function(a103,a104)
{
var a105=this._stateChangeListeners;
var a106=a105.length;
for(var a107=0;a107<a106;a107++)
{
var a108=a105[a107];
a107++;
if(a108==a103)
{
var a109=a105[a107];
if(a109===a104)
{
a105.splice(a107-1,2);
}
}
}
if(a105.length==0)
{
this._stateChangeListeners=null;
}
}
TrRequestQueue.prototype.getDTSState=function()
{
return this._state;
}
TrRequestQueue.prototype._broadcastStateChangeEvent=function(a110)
{
var a111=this._stateChangeListeners;
if(a111)
{
var a112=a111.length;
for(var a113=0;a113<a112;a113++)
{
try
{
var a114=a111[a113];
a113++;
var a115=a111[a113];
if(a115!=null)
a114.call(a115,a110);
else
a114(a110);
}
catch(e)
{
TrRequestQueue._logError("Error on DTS State Change Listener",e);
}
}
}
}
TrRequestQueue.prototype._getDomDocument=function()
{
return this._window.document;
}
TrRequestQueue._getFailedConnectionText=function()
{
return"Connection failed";
}
TrRequestQueue._alertError=function()
{
var a116=TrRequestQueue._getFailedConnectionText();
if(a116!=null)
alert(a116);
}
TrRequestQueue._logWarning=function(a117)
{
if(window.console&&console.warn)
console.warn(arguments);
}
TrRequestQueue._logError=function(a118)
{
if(window.console&&console.error)
console.error(arguments);
}

function TrXMLRequest()
{
this.isSynchronous=false;
this.callback=null;
this._state=TrXMLRequest.UNINITIALIZED;
this.headers=new Object();
this.xmlhttp=TrXMLRequest._createXmlHttpRequest();
}
TrXMLRequest.UNINITIALIZED=0;
TrXMLRequest.LOADING=1;
TrXMLRequest.LOADED=2;
TrXMLRequest.INTERACTIVE=3;
TrXMLRequest.COMPLETED=4;
TrXMLRequest.prototype.setSynchronous=
function(a0)
{
this.isSynchronous=a0;
};
TrXMLRequest.prototype.setCallback=
function(a1)
{
this.callback=a1;
};
TrXMLRequest.prototype.getCompletionState=
function()
{
return this._state;
};
TrXMLRequest.prototype.getStatus=
function()
{
return this.xmlhttp.status;
}
TrXMLRequest.prototype.getResponseXML=
function()
{
return this.xmlhttp.responseXML;
}
TrXMLRequest.prototype.getResponseText=
function()
{
return this.xmlhttp.responseText;
}
TrXMLRequest.prototype.send=
function(a2,a3)
{
var a4=this.xmlhttp;
if(!this.isSynchronous)
{
var a5=new Function("arguments.callee.obj.__onReadyStateChange();");
a5.obj=this;
a4.onreadystatechange=a5;
}
var a6=a3?"POST":"GET";
a4.open(a6,a2,!this.isSynchronous);
for(var a7 in this.headers)
a4.setRequestHeader(a7,this.headers[a7]);
a4.setRequestHeader("Tr-XHR-Message","true");
a4.send(a3);
if(this.isSynchronous)
{
this._state=a4.readyState;
}
}
TrXMLRequest.prototype.getResponseHeader=
function(a8)
{
return this.xmlhttp.getResponseHeader(a8);
}
TrXMLRequest.prototype.getAllResponseHeaders=
function()
{
return this.xmlhttp.getAllResponseHeaders();
}
TrXMLRequest.prototype.setRequestHeader=
function(a9,a10)
{
this.headers[a9]=a10;
}
TrXMLRequest._createXmlHttpRequest=function()
{
var a11;
if(window.XMLHttpRequest)
{
a11=new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
try
{
a11=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
a11=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
}
}
}
return a11;
}
TrXMLRequest.prototype.__onReadyStateChange=
function()
{
this._state=this.xmlhttp.readyState;
if(this.callback)
this.callback(this);
}
TrXMLRequest.prototype.cleanup=function()
{
this.callback=null
delete this.xmlhttp;
}

function TrXMLRequestEvent(
a0,
a1
)
{
this._status=a0;
this._request=a1;
}
TrXMLRequestEvent.STATUS_QUEUED=1;
TrXMLRequestEvent.STATUS_SEND_BEFORE=2;
TrXMLRequestEvent.STATUS_SEND_AFTER=3;
TrXMLRequestEvent.STATUS_COMPLETE=4;
TrXMLRequestEvent.prototype.getStatus=function()
{
return this._status;
}
TrXMLRequestEvent.prototype.getResponseXML=function()
{
return this._request.getResponseXML();
}
TrXMLRequestEvent.prototype._isResponseValidXML=function()
{
var a2=this._request.getResponseXML();
if(!a2)
return false;
var a3=a2.documentElement;
if(!a3)
return false;
var a4=a3.nodeName;
if(!a4)
a4=a3.tagName;
if(a4=="parsererror")
return false;
return true;
}
TrXMLRequestEvent.prototype.getResponseText=function()
{
return this._request.getResponseText();
}
TrXMLRequestEvent.prototype.getResponseStatusCode=function()
{
return this._request.getStatus();
}
TrXMLRequestEvent.prototype._getAllResponseHeaders=function()
{
return this._request.getAllResponseHeaders();
}
TrXMLRequestEvent.prototype.getResponseHeader=function(
a5
)
{
var a6=this._request.getAllResponseHeaders();
return(a6.indexOf(a5)!=-1)?
this._request.getResponseHeader(a5)
:null;
}
TrXMLRequestEvent.prototype.isPprResponse=function()
{
var a7=true;
if(a7&&(!this._isResponseValidXML()))
{
TrRequestQueue._logError("Invalid PPR response."+
" The response-headers were:\n"+
this._getAllResponseHeaders()+
"\n The invalid response was:\n"+
this.getResponseText());
}
return a7;
}
TrXMLRequestEvent.prototype.getResponseContentType=function()
{
this.getResponseHeader("Content-Type");
}

function TrIFrameXMLRequestEvent(
a0)
{
this._iframeDoc=a0;
}
TrIFrameXMLRequestEvent.prototype.getStatus=function()
{
return TrXMLRequestEvent.STATUS_COMPLETE;
}
TrIFrameXMLRequestEvent.prototype.getResponseXML=function()
{
var a1=_agent.isIE;
var a2=this._iframeDoc;
if(a1&&a2.XMLDocument)
return a2.XMLDocument;
else
return a2;
}
TrIFrameXMLRequestEvent.prototype.getResponseText=function()
{
var a3=_agent.isIE;
var a4=this._iframeDoc,xmlDocument=null;
if(a3&&a4.XMLDocument)
xmlDocument=a4.XMLDocument;
else if(window.XMLDocument&&(a4 instanceof XMLDocument))
xmlDocument=a4;
if(xmlDocument)
return AdfAgent.AGENT.getNodeXml(xmlDocument);
else
return a4.documentElement.innerHTML;
}
TrIFrameXMLRequestEvent.prototype._isResponseValidXML=function()
{
var a5=_agent.isIE;
var a6=this._iframeDoc;
if(a5&&a6.XMLDocument)
return true;
else if(window.XMLDocument&&(a6 instanceof XMLDocument))
return true;
else
return false;
}
TrIFrameXMLRequestEvent.prototype.getResponseStatusCode=function()
{
return 200;
}
TrIFrameXMLRequestEvent.prototype.isPprResponse=function()
{
var a7=_agent.isIE;
var a8=this._iframeDoc;
var a9=false;
if(a7&&a8.XMLDocument)
{
var a10=a8.XMLDocument,childNodes=a10.childNodes;
if(childNodes.length>=2&&childNodes[1].nodeName=="Tr-XHR-Response-Type")
a9=true;
}
else
{
if(a8.firstChild&&a8.firstChild.nodeName=="Tr-XHR-Response-Type")
a9=true;
}
return a9;
}
TrIFrameXMLRequestEvent.prototype.getResponseContentType=function()
{
if(this._isResponseValidXML())
return"text/xml";
return"text/html";
}
