var NodeType={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};
var LayerManager=function(){
var _1=9000;
return {getNextZindex:function(){
_1++;
return _1;
}};
}();
var UserConfig={_hOptions:{},get_oOption:function(_2){
return this._hOptions[_2];
},set_oOption:function(_3,_4){
this._hOptions[_3]=_4;
}};
Point=Class.create();
Point.prototype={initialize:function(x,y){
this.set_iXCoordinate(x);
this.set_iYCoordinate(y);
},set_iXCoordinate:function(x){
this.x=x;
},set_iYCoordinate:function(y){
this.y=y;
},get_iXCoordinate:function(){
return this.x;
},get_iYCoordinate:function(){
return this.y;
}};
Dimension=Class.create();
Dimension.prototype={initialize:function(_5,_6){
this.set_iHeight(_6);
this.set_iWidth(_5);
},set_iWidth:function(_7){
this.width=_7;
},set_iHeight:function(_8){
this.height=_8;
},get_iWidth:function(){
return this.width;
},get_iHeight:function(){
return this.height;
}};
var XB={nodeListToArray:function(_9){
var _a;
if(_9!=null){
_a=[];
var _b=_9.length;
for(var i=0;i<_b;i++){
_a.push(_9[i]);
}
}
return _a;
},trim:function(_c){
if(typeof _c!=="string"){
return _c;
}
return _c.replace(/^\s+|\s+$/g,"");
},get_oFrameInnerDimensions:function(_d){
if(_d==undefined){
_d=self;
}
var x,y;
if(document.documentElement&&document.documentElement.clientHeight){
x=document.documentElement.clientWidth;
y=document.documentElement.clientHeight;
}else{
if(_d.innerHeight){
x=_d.innerWidth;
y=_d.innerHeight;
}else{
if(document.body){
x=document.body.clientWidth;
y=document.body.clientHeight;
}
}
}
return new Dimension(x,y);
},Dumper:function(_e){
return this.dumpObj(_e,""," ",1);
},dumpObj:function(_f,_10,_11,_12){
var _13=5;
_10=_10?_10:"Object:";
_11=_11?_11:" ";
if(_12>=_13){
return _11+_10+"<Maximum Depth Reached>\n";
}
if(typeof _f=="object"){
var _14=null;
var _15=_11+_10+": ";
_11+="\t";
if(_f instanceof Array){
_15+="[";
for(var i=0;i<_f.length;i++){
_15+=this.dumpObj(_f[i],i,_11,_12+1);
}
_15+="],\n";
}else{
_15+="\n"+_11+"{\n";
for(var _16 in _f){
try{
_14=_f[_16];
}
catch(e){
_14="<Unable to Evaluate>";
}
if(_14==undefined){
_15+=_11+_16+": undefined\n";
}else{
if(typeof _14=="object"){
_15+=this.dumpObj(_14,_16,_11,_12+1);
}else{
_15+=_11+_16+": '"+_14+"',\n";
}
}
}
_15+=_11+"},\n";
}
return _15;
}else{
return "'"+_f+"',";
}
},get_oPageOrigin:function(_17){
if(_17==undefined){
_17=document;
}
var _18=_17.documentElement.scrollTop||_17.body.scrollTop;
var _19=_17.documentElement.scrollLeft||_17.body.scrollLeft;
return new Point(_19,_18);
},get_bTransparencySupported:function(){
if(this._bTransparencySupported==undefined){
this._bTransparencySupported=false;
try{
var _1a=document.body.filters;
this._bTransparencySupported=true;
}
catch(oError){
}
}
return this._bTransparencySupported;
},get_oCurrentStyle:function(_1b){
return _1b.currentStyle||document.defaultView.getComputedStyle(_1b,null);
},setOffsetHeight:function(_1c,_1d){
if(_1c==document.body){
return;
}
var _1e;
if(_1c.sizeCache!=null&&_1c.sizeCache.iPaddingAndBorderHeight!=null){
_1e=_1c.sizeCache.iPaddingAndBorderHeight;
}else{
var _1f=_1c.style.overflowY;
_1c.style.overflowY="hidden";
_1c.style.height="1px";
_1e=_1c.offsetHeight-1;
_1c.style.overflowY=_1f;
if(_1e>=0){
if(_1c.sizeCache==null){
_1c.sizeCache={};
}
_1c.sizeCache.iPaddingAndBorderHeight=_1e;
}else{
_1e=0;
}
}
_1c.style.height=Math.max(0,_1d-_1e)+"px";
},setOffsetWidth:function(_20,_21){
if(_20==document.body){
return;
}
var _22;
if(_20.sizeCache!=null&&_20.sizeCache.iPaddingAndBorderWidth!=null){
_22=_20.sizeCache.iPaddingAndBorderWidth;
}else{
var _23=_20.style.overflowX;
_20.style.overflowX="hidden";
_20.style.width="1px";
_22=_20.offsetWidth-1;
_20.style.overflowX=_23;
if(_22>=0){
if(_20.sizeCache==null){
_20.sizeCache={};
}
_20.sizeCache.iPaddingAndBorderWidth=_22;
}else{
_22=0;
}
}
_20.style.width=Math.max(0,_21-_22)+"px";
},get_iEstimatedTextWidth:function(_24){
var _25=0;
if(typeof _24==="number"){
_24+="";
}
if(typeof _24==="string"){
_25=_24.length*7;
}
return _25;
},get_iEstimatedTextWidth_viaDom:function(_26){
var _27=0;
if(typeof _26==="number"){
_26+="";
}
if(typeof _26==="string"){
var _28=document.createElement("DIV");
_28.style.whiteSpace="pre";
_28.style.position="absolute";
_28.style.top="-50px";
_28.style.left="0px";
_28.appendChild(document.createTextNode(_26));
document.body.appendChild(_28);
_27=_28.scrollWidth;
document.body.removeChild(_28);
}
return _27;
},get_iPreferredWidth:function(_29){
return XB.get_oPreferredSize(_29).get_iWidth();
},get_iPreferredHeight:function(_2a){
return XB.get_oPreferredSize(_2a).get_iHeight();
},get_oPreferredSize:function(_2b){
if(_2b.sizeCache!=null&&_2b.sizeCache.oPreferredSize!=null){
return _2b.sizeCache.oPreferredSize;
}
if(_2b.sizeCache==null){
_2b.sizeCache={};
}
var _2c=parseInt(_2b.getAttribute("fixed-width"),10);
var _2d=parseInt(_2b.getAttribute("fixed-height"),10);
if(!isNaN(_2c)&&!isNaN(_2d)){
_2b.sizeCache.oPreferredSize=new Dimension(_2c,_2d);
return _2b.sizeCache.oPreferredSize;
}
var _2e=XB.get_oCurrentStyle(_2b);
if((!_2b.nodeName.match(/^t[hd]$/i))&&(_2e==null||_2e.display=="block")&&_2b.scrollWidth>0){
var _2f=_2b.style.width;
var _30=_2b.style.height;
var _31=_2b.style.overflowX;
var _32=_2b.style.overflowY;
var _33=_2b.style.whiteSpace;
_2b.style.overflowX="hidden";
_2b.style.overflowY="hidden";
_2b.style.width="1px";
_2b.style.height="auto";
_2b.style.whiteSpace="nowrap";
if(isNaN(_2c)){
_2c=_2b.scrollWidth;
}
if(isNaN(_2d)){
_2d=_2b.scrollHeight;
}
var _34=new Dimension(_2c,_2d);
_2b.style.overflowX=_31;
_2b.style.overflowY=_32;
_2b.style.width=_2f;
_2b.style.height=_30;
_2b.style.whiteSpace=_33;
_2b.sizeCache.oPreferredSize=_34;
return _34;
}
if(XB._oPreferredSizeDomElement==null){
var _35=document.createElement("DIV");
var _36=_35.style;
_36.whiteSpace="nowrap";
_36.overflow="hidden";
_36.height="10px";
_36.width="10px";
_36.position="absolute";
_36.top="0px";
_36.left="-20px";
document.body.appendChild(_35);
XB._oPreferredSizeDomElement=_35;
}
XB._oPreferredSizeDomElement.className=_2b.className;
XB._oPreferredSizeDomElement.innerHTML=_2b.innerHTML;
if(isNaN(_2c)){
_2c=XB._oPreferredSizeDomElement.scrollWidth;
}
if(isNaN(_2d)){
_2d=XB._oPreferredSizeDomElement.scrollHeight;
}
_2b.sizeCache.oPreferredSize=new Dimension(_2c,_2d);
return _2b.sizeCache.oPreferredSize;
},clearSelection:function(){
var _37;
if(document.selection&&document.selection.empty){
document.selection.empty();
}else{
if(window.getSelection){
_37=window.getSelection();
if(_37.removeAllRanges){
_37.removeAllRanges();
}
}else{
if(document.getSelection){
_37=document.getSelection();
if(_37.removeAllRanges){
_37.removeAllRanges();
}
}
}
}
},setInnerText:function(_38,_39){
if(_38==null){
return;
}
var _3a=XB.firstElementChild(_38);
if(_3a!=null){
while(true){
var _3b=XB.firstElementChild(_3a);
if(_3b!=null){
_3a=_3b;
}else{
break;
}
}
}
if(_3a==null){
_3a=_38;
}
if(_3a.firstChild!=null){
_3a.replaceChild(document.createTextNode(_39),_3a.firstChild);
}else{
_3a.appendChild(document.createTextNode(_39));
}
},innerText:function(_3c){
if(_3c==null){
return null;
}
return _3c.textContent||_3c.innerText;
},xmlNodeInnerText:function(_3d){
if(_3d==null){
return null;
}
var _3e=_3d.text||_3d.textContent||_3d.data;
if(_3e==null&&_3d.childNodes!=null&&_3d.childNodes[0]!=null){
_3e=_3d.childNodes[0].data;
}
return _3e;
},cancelKeyEvent:function(_3f){
try{
if(Prototype.Browser.IE){
_3f.keyCode=0;
}
}
catch(oError){
}
Event.stop(_3f);
},getKeyCode:function(_40){
return _40.keyCode||_40.charCode;
},getKeyChar:function(_41){
var _42=_41.keyCode;
if(_42!=null&&_42>=96&&_42<=105){
return (_42-96)+"";
}
_42=_42||_41.charCode;
return String.fromCharCode(_42).toLowerCase();
},getBounds:function(_43){
var _44=XB.get_oCurrentSize(_43);
var _45=Position.cumulativeOffset(_43);
var _46=Position.realOffset(_43);
var _47=_45[0]-_46[0];
var _48=_45[1]-_46[1];
return {x:_47,y:_48,width:_44.width,height:_44.height};
},hitTest:function(_49,x,y){
var _4a=XB.get_oCurrentSize(_49);
var _4b=Position.cumulativeOffset(_49);
var _4c=Position.realOffset(_49);
var _4d=_4b[0]-_4c[0];
var _4e=_4d+_4a.width;
var _4f=_4b[1]-_4c[1];
var _50=_4f+_4a.height;
if(_49.nodeName.toUpperCase()!="TD"){
_4e+=2;
_50+=2;
}
if(x>=_4d&&x<_4e&&y>=_4f&&y<=_50){
return true;
}
return false;
},convertStyleToInt:function(_51){
var _52=parseInt(_51,10);
if(isNaN(_52)){
_52=0;
}
return _52;
},get_oCurrentSize:function(_53){
var _54=XB.get_oCurrentStyle(_53);
var _55=_53.offsetWidth+XB.convertStyleToInt(_54.borderLeftWidth)+XB.convertStyleToInt(_54.borderRightWidth)+XB.convertStyleToInt(_54.paddingRight)+XB.convertStyleToInt(_54.paddingLeft);
var _56=_53.offsetHeight+XB.convertStyleToInt(_54.borderTopHeight)+XB.convertStyleToInt(_54.borderBottomHeight)+XB.convertStyleToInt(_54.paddingBottom)+XB.convertStyleToInt(_54.paddingTop);
return new Dimension(_55,_56);
},previousElementNodeSibling:function(_57,_58){
if(_58==null){
_58=1;
}
var _59=0;
var _5a=_57;
while((_5a=_5a.previousSibling)){
if(_5a.nodeType==NodeType.ELEMENT_NODE){
_59++;
if(_59==_58){
return _5a;
}
}
}
return null;
},nextElementNodeSibling:function(_5b,_5c){
if(_5c==null){
_5c=1;
}
var _5d=0;
var _5e=_5b;
while((_5e=_5e.nextSibling)){
if(_5e.nodeType==NodeType.ELEMENT_NODE){
_5d++;
if(_5d==_5c){
return _5e;
}
}
}
return null;
},firstElementChild:function(_5f){
var _60=_5f.firstChild;
if(_60==null||_60.nodeType==NodeType.ELEMENT_NODE){
return _60;
}else{
return XB.nextElementNodeSibling(_60);
}
},requiresHorizontalScrollbars:function(_61){
return _61.scrollWidth>_61.clientWidth?true:false;
},requiresVerticalScrollbars:function(_62){
return _62.scrollHeight>_62.clientHeight?true:false;
},setFloatStyle:function(_63,_64){
_63.style.cssFloat=_63.style.styleFloat=_64;
},reflowLayout:function(){
},hitch:function(_65,_66){
if(typeof (_66)=="string"){
return function(){
return _65[_66].apply(_65,arguments);
};
}else{
return function(){
return _66.apply(_65,arguments);
};
}
},disableSelection:function(_67){
_67=_67||document.body;
if(typeof _67.onselectstart!="undefined"){
_67.onselectstart=function(){
return false;
};
}else{
if(typeof _67.style.MozUserSelect!="undefined"){
_67.style.MozUserSelect="-moz-none";
}else{
_67.onmousedown=function(){
return false;
};
_67.style.cursor="default";
}
}
},enableSelection:function(){
var _68=document.body;
_68.onselectstart=function(){
return true;
};
_68.unselectable="off";
_68.style.MozUserSelect="";
},getStylesAsHash:function(_69){
if(typeof _69!=="string"){
return _69;
}
var _6a=this.sFloatKey=this.sFloatKey||document.body.style.styleFloat===undefined?"cssFloat":"styleFloat";
var _6b={};
var _6c=_69.split(";");
var _6d=_6c.length;
var i;
for(i=0;i<_6d;i++){
var _6e=_6c[i].split(":");
if(_6e.length!=2){
continue;
}
var _6f=XB.trim(_6e[0]);
if(_6f=="float"){
_6f=_6a;
}else{
_6f=_6f.camelize();
}
_6b[_6f]=XB.trim(_6e[1]);
}
return _6b;
},getStylesAsString:function(_70){
if(typeof _70==="string"){
return _70;
}
var _71="";
for(var _72 in _70){
var _73=_70[_72];
if(typeof _73==="function"){
continue;
}
_72=_72.underscore().dasherize();
if(_72=="css_float"||_72=="style_float"){
_72="float";
}
_71+=_72+": "+_73+";";
}
return _71;
},createAnonymousStylesheetClass:function(_74){
var _75=XB.createAnonymousStylesheetClass.iCounter||0;
_75++;
var _76="lambda_"+_75;
XB.addStylesheetRule("."+_76,_74);
XB.createAnonymousStylesheetClass.iCounter=_75;
return _76;
},addStylesheetRule:function(_77,_78){
var _79=XB.getStylesAsString(_78);
var _7a=document.styleSheets;
var _7b=_7a.length-1;
var _7c=document.styleSheets[_7b];
while(_7c.href!=null&&_7c.href.length>0&&!_7c.href.match("^/")&&!_7c.href.match("^"+document.location.protocol+"//"+document.location.host)){
_7b--;
if(_7b<0){
return;
}
_7c=document.styleSheets[_7b];
}
var _7d=_7c.cssRules?_7c.cssRules.length:_7c.rules.length;
if(_7c.deleteRule){
_7c.insertRule(_77+"{"+_79+"}",_7d-1);
}else{
if(_7c.removeRule){
var _7e=_77.split(",");
var _7f=_7e.length;
if(_79==""){
return;
}
for(var i=0;i<_7f;i++){
_7c.addRule(_7e[i],_79);
}
}
}
},position:function(_80){
var _81=Position.cumulativeOffset(_80);
var _82=Position.realOffset(_80);
return new Point(_81[0]-_82[0],_81[1]-_82[1]);
},wheelDelta:function(_83){
var _84=0;
if(_83.wheelDelta){
_84=_83.wheelDelta/120;
if(window.opera){
_84=-1*_84;
}
}else{
if(_83.detail){
_84=-1*_83.detail/3;
}
}
return Math.round(_84);
},addCommas:function(_85){
_85+="";
var x=_85.split(".");
var x1=x[0];
var x2=x.length>1?"."+x[1]:"";
var _86=/(\d+)(\d{3})/;
while(_86.test(x1)){
x1=x1.replace(_86,"$1"+","+"$2");
}
return x1+x2;
},userDateFormat:function(_87,_88){
if(_88==undefined){
return _87;
}
var _89=XB.parseFormattedDateString(_87);
var _8a=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var _8b=_8a[_89.getMonth()];
var sMm=_89.getMonth()+1;
if(sMm.toString().length==1){
sMm="0"+sMm.toString();
}
var _8c=_89.getFullYear();
var sDd=_89.getDate();
if(sDd.toString().length==1){
sDd="0"+sDd.toString();
}
switch(_88.toString()){
case "0":
_87=_8b+" "+sDd+" "+_8c;
break;
case "1":
_87=_8b+" "+sDd+", "+_8c;
break;
case "2":
_87=_8c+"-"+_8b+"-"+sDd;
break;
case "3":
_87=sDd+"-"+_8b+"-"+_8c;
break;
case "4":
_87=_8c+"-"+sMm+"-"+sDd;
break;
default:
break;
}
return _87;
},parseFormattedDateString:function(_8d){
var _8e;
var _8f;
var sMm;
var sDd;
var _90;
if(_8d==null||_8d.match==null){
}else{
if((_8e=_8d.match(/(\w{3}) (\d{1,2}) (\d{4})/))){
_8f=_8e[1];
sDd=_8e[2];
_90=_8e[3];
_8d=new Date(_8f+" "+sDd+","+_90);
}else{
if((_8e=_8d.match(/(\w{3}) (\d{1,2}), (\d{4})/))){
_8f=_8e[1];
sDd=_8e[2];
_90=_8e[3];
_8d=new Date(_8f+" "+sDd+","+_90);
}else{
if((_8e=_8d.match(/(\d{4})-(\w{3})-(\d{2})/))){
_8f=_8e[2];
sDd=_8e[3];
_90=_8e[1];
_8d=new Date(_8f+" "+sDd+","+_90);
}else{
if((_8e=_8d.match(/(\d{2})-(\w{3})-(\d{4})/))){
_8f=_8e[2];
sDd=_8e[1];
_90=_8e[3];
_8d=new Date(_8f+" "+sDd+","+_90);
}else{
if((_8e=_8d.match(/(\d{4})-(\d{2})-(\d{2})/))){
sMm=_8e[2];
sDd=_8e[3];
_90=_8e[1];
_8d=new Date(parseInt(_90,10),parseInt(sMm,10)-1,parseInt(sDd,10));
}else{
if((_8e=_8d.match(/(\d{2})\/(\d{2})\/(\d{4})/))){
sMm=_8e[1];
sDd=_8e[2];
_90=_8e[3];
_8d=new Date();
_8d.setFullYear(parseInt(_90,10),parseInt(sMm,10)-1,parseInt(sDd,10));
}else{
if((_8e=_8d.match(/(\d{4})(\d{2})(\d{2})/))){
sMm=_8e[2];
sDd=_8e[3];
_90=_8e[1];
_8d=new Date();
_8d.setFullYear(parseInt(_90,10),parseInt(sMm,10)-1,parseInt(sDd,10));
}
}
}
}
}
}
}
}
return _8d;
},setSelectionRange:function(_91,_92,_93){
if(_91.setSelectionRange){
_91.focus();
_91.setSelectionRange(_92,_93);
}else{
if(_91.createTextRange){
var _94=_91.createTextRange();
_94.collapse(true);
_94.moveEnd("character",_93);
_94.moveStart("character",_92);
_94.select();
}
}
},inArray:function(_95,_96){
var i;
for(i=_96.length-1;i>=0;i--){
if(_96[i]==_95){
return true;
}
}
return false;
},pad:function pad(_97,_98){
var str=""+_97;
while(str.length<_98){
str="0"+str;
}
return str;
}};
var WebtraderRequest=Class.create();
WebtraderRequest.PROGRESS_TYPE_SMALL=1;
WebtraderRequest.PROGRESS_TYPE_LARGE=2;
WebtraderRequest.PROGRESS_TYPE_DOWNLOAD=3;
WebtraderRequest.prototype={initialize:function(_99,_9a,_9b){
if(_9b==undefined){
_9b={};
}
this._iConnectionErrorCount=0;
this._oFormArgs=_99;
this._oOptions=_9b;
this._oDocument=_9a;
this._sDebugMessages="";
this.onresult=_9b.onresult;
var _9c=_9a.defaultView||_9a.parentWindow;
this._iProgressDivOpacity=UserConfig.get_oOption("WebtraderRequest.ProgressDivOpacity");
this.onHaveWebtraderRequestId=null;
var _9d=this;
Event.observe(_9c,"unload",function(){
_9d._abort();
});
this._iWebtraderRequestId=_9b.iWebtraderRequestId;
},makeRequest:function(){
var _9e=this._oOptions;
var _9f=this._oFormArgs;
var _a0=_9f["ACTION"];
this._sAction=_a0;
if(this._oDocument!=undefined&&this._oDocument.body!=undefined){
this._onBodySelectStart=function(_a1){
Event.stop(_a1);
return false;
};
Event.observe(this._oDocument.body,"selectstart",this._onBodySelectStart);
}
if(_9e.bCoverPage==undefined||_9e.bCoverPage){
BodyCover.show();
}
var _a2=this._generateSmallProgressDiv();
this._setProgressStatus("Requesting ...",0,_a0);
var _a3=new quickcontent.Client();
_a3.set_sServerFunction("WebtraderAction");
_a3.set_oArgs(_9f);
if(_9f.iLastWatchRequestId>0){
this._setProgressStatus("Waiting for user to do something ...",0,_a0);
this._bWatchingUser=true;
_a3.set_sServerFunction("intranet.debug.WatchWebtraderActions");
}
this._oClient=_a3;
if(this._iWebtraderRequestId!=null){
this._setProgressStatus("Waiting for ",0,"previous calculations");
this._checkRequestStatus(this._iWebtraderRequestId);
return;
}
var _a4=this;
_a3.ondataparsed=function(_a5){
_a4.debug("Received response from server");
if(_a5.sError!=undefined){
var _a6=_a5.hPreviousRequest.sStatus;
_a4.debug("Response was error, "+_a5.sError+", status="+_a6);
if(_a6=="PROCESSING"||_a6=="SPAWNED"){
_a4._abort();
BodyCover.show();
intex.run(function(){
var _a7=new quickframe.jobs.WaitForOrCancelJobDialog({iWebtraderRequestId:_a5.hPreviousRequest.iWebtraderRequestId});
_a7.on("Loaded",function(){
BodyCover.hide();
var _a8=_a4.oJobManagerDialog=new Dialogue(document.body,{"iWidth":600,"iHeight":240,"bModal":true,"bResizable":false,"sTitle":"Your Previous Action is Still Calculating"});
_a8.show();
_a8.set_oMainComponent(_a7);
});
},{"requires":["quickframe.jobs.WaitForOrCancelJobDialog"]});
}else{
if(_a6=="CANCELED"){
IntexAlert("Your previous action, which you canceled, is still being cleaned up.  You will have to wait a minute for this to finish.\n\nPlease wait and try again.\n\nThe action that is being cleaned up was started on "+_a5.hPreviousRequest.sStartTime);
_a4._abort();
}else{
IntexAlert("Unknown status, "+_a6);
_a4._abort();
}
}
}else{
if(_a4.onHaveWebtraderRequestId!=undefined){
_a4.debug("Calling callback for onHaveWebtraderRequestid");
_a4.onHaveWebtraderRequestId.call(_a4,_a5.iWebtraderRequestId);
}
if(_a5.sAction){
_a4.debug("Status has action, "+_a5.sAction);
_a0=_a4._sAction=_a5.sAction;
}
if(_a5.sNewSessionKey){
_a4.debug("Received session key, "+_a5.sNewSessionKey);
quickcontent.sSessionKey=_a5.sNewSessionKey;
}
_a4._setProgressStatus("Processing ...",0,_a0);
_a4._iWebtraderRequestId=_a5.iWebtraderRequestId;
_a4._checkRequestStatus(_a5.iWebtraderRequestId);
}
};
_a3.onerror=function(_a9){
_a4.debug("Request had error, "+_a9);
if(_a9.sType=="intex::UserFriendlyError::AuthenticationError"){
IntexAlert("Your INTEXnet session has expired.  Please log back in.");
_a4._abort();
_a4._oDocument.location.assign("/intexnet/Logout.htm");
}else{
this.defaultOnError(_a9);
_a4._abort();
}
};
_a3.fetch();
},_generateSmallProgressDiv:function(){
var _aa;
var _ab;
if(this._oProgressDiv){
_aa=this._oProgressDiv.style.top;
_ab=this._oProgressDiv.style.left;
}
this._destroyProgressDiv();
var _ac=this._oDocument;
var _ad=_ac.body;
var _ae=XB.get_oPageOrigin();
if(_aa==undefined){
_aa=_ae.y+"px";
}
if(_ab==undefined){
_ab=(20+_ae.x)+"px";
}
var _af=_ac.createElement("DIV");
_af.style.display="none";
_af.style.position="absolute";
_af.style.top=_aa;
_af.style.left=_ab;
_af.style.zIndex=LayerManager.getNextZindex();
_af.style.height="300px";
_af.style.width="600px";
var _b0=_ac.createElement("DIV");
_b0.className="img-shadow";
var _b1=_ac.createElement("DIV");
_b1.className="progress-div-small";
var _b2=_ac.createElement("DIV");
_b2.className="progress-div-small-content";
var _b3=_ac.createElement("DIV");
_b3.innerHTML="&nbsp;";
_b3.className="progress-div-loading-indicator";
_b2.appendChild(_b3);
var _b4=_ac.createElement("DIV");
_b4.className="progress-div-message";
_b2.appendChild(_b4);
this._oMessageDiv=_b4;
var _b5=_ac.createElement("DIV");
_b5.className="progress-div-details";
_b2.appendChild(_b5);
this._oDetailsDiv=_b5;
var _b6=_ac.createElement("DIV");
_b6.style.textAlign="right";
_b2.appendChild(_b6);
var _b7=_ac.createElement("A");
_b7.innerHTML="Cancel";
_b7.href="javascript:undefined";
_b6.appendChild(_b7);
var _b8=_ac.createElement("div");
_b8.style.color="#909090";
_b8.style.textDecoration="underline";
_b8.innerHTML="Taking longer than usual? ...";
_b8.style.position="absolute";
_b8.style.bottom="15px";
_b8.style.left="15px";
_b8.style.cursor="pointer";
_b8.style.fontSize="10px";
_b6.appendChild(_b8);
Event.observe(_b8,"click",XB.hitch(this,this.showJobManager));
var _b9=this;
Event.observe(_b7,"mousedown",function(){
_b9._cancel();
});
_b1.appendChild(_b2);
_b0.appendChild(_b1);
_af.appendChild(_b0);
this._oDocument.body.appendChild(_af);
this._oProgressDiv=_af;
this._eProgressDivType=WebtraderRequest.PROGRESS_TYPE_SMALL;
this._oProgressDiv.style.cursor="move";
if(this._iProgressDivOpacity!=null){
Element.setOpacity(_af,this._iProgressDivOpacity);
}
new Effect.SlideDown(_af);
new Draggable(_af);
},_destroyProgressDiv:function(){
if(this._oProgressDiv!=undefined){
this._oDocument.body.removeChild(this._oProgressDiv);
this._oMessageDiv=undefined;
this._oDetailsDiv=undefined;
this._oProgressBar=undefined;
this._oProgressDiv=undefined;
this._eProgressDivType=undefined;
}
},_generateLargeProgressDiv:function(){
var _ba;
var _bb;
if(this._oProgressDiv){
_ba=this._oProgressDiv.style.top;
_bb=this._oProgressDiv.style.left;
}
this._destroyProgressDiv();
var _bc=this._oDocument;
var _bd=_bc.body;
var _be=XB.get_oPageOrigin();
if(_ba==undefined){
_ba=_be.y+"px";
}
if(_bb==undefined){
_bb=(20+_be.x)+"px";
}
var _bf=_bc.createElement("DIV");
_bf.style.position="absolute";
_bf.style.top=_ba;
_bf.style.left=_bb;
_bf.style.zIndex=LayerManager.getNextZindex();
_bf.className="img-shadow";
var _c0=_bc.createElement("DIV");
_c0.className="progress-div-large";
var _c1=_bc.createElement("DIV");
_c1.className="progress-div-large-content";
var _c2=_bc.createElement("DIV");
_c2.className="progress-div-message";
_c1.appendChild(_c2);
this._oMessageDiv=_c2;
var _c3=_bc.createElement("DIV");
this._oProgressBar=new ProgressBar(_c3);
_c1.appendChild(_c3);
var _c4=_bc.createElement("DIV");
_c4.className="progress-div-details";
_c1.appendChild(_c4);
this._oDetailsDiv=_c4;
var _c5=_bc.createElement("DIV");
_c5.style.textAlign="right";
_c5.marginTop="15px";
_c1.appendChild(_c5);
var _c6=_bc.createElement("INPUT");
_c6.type="button";
_c6.value="Cancel";
_c5.appendChild(_c6);
var _c7=_bc.createElement("div");
_c7.style.color="#909090";
_c7.style.textDecoration="underline";
_c7.innerHTML="Taking longer than usual? ...";
_c7.style.position="absolute";
_c7.style.bottom="15px";
_c7.style.left="15px";
_c7.style.cursor="pointer";
_c7.style.fontSize="10px";
_c5.appendChild(_c7);
Event.observe(_c7,"click",XB.hitch(this,this.showJobManager));
var _c8=this;
Event.observe(_c6,"click",function(){
_c8._cancel();
});
_c0.appendChild(_c1);
_bf.appendChild(_c0);
this._oDocument.body.appendChild(_bf);
this._oProgressBar.pack();
_bf.style.visibility="hidden";
_bf.style.visibility="visible";
this._oProgressDiv=_bf;
this._eProgressDivType=WebtraderRequest.PROGRESS_TYPE_LARGE;
this._oProgressDiv.style.cursor="move";
if(this._iProgressDivOpacity!=null){
Element.setOpacity(_bf,this._iProgressDivOpacity);
}
new Draggable(this._oProgressDiv);
},showJobManager:function(){
this.debug("Opening the job manager");
var _c9=this;
intex.run(function(){
if(_c9._oJobManagerDialog==null){
var _ca=new quickframe.jobs.JobManager({oWebtraderRequest:_c9,iWebtraderRequestId:_c9._iWebtraderRequestId});
_ca.on("Loaded",function(){
var _cb=_c9.oJobManagerDialog=new Dialogue(document.body,{"iWidth":150,"iHeight":50,"bModal":true,"bResizable":true,"sTitle":"Your Most Recent Job Status"});
_cb.show();
_cb.move(-500,-500);
_cb.set_oMainComponent(_ca);
});
}else{
_c9._oJobManagerDialog.show();
}
},{"requires":["quickframe.jobs.JobManager"]});
},debug:function(_cc){
this._sDebugMessages+=(new Date())+": "+_cc+"\n";
},_generateDownloadDiv:function(_cd){
var _ce;
var _cf;
if(this._oProgressDiv){
_ce=this._oProgressDiv.style.top;
_cf=this._oProgressDiv.style.left;
}
this._destroyProgressDiv();
var _d0=this._oDocument;
var _d1=_d0.body;
var _d2=XB.get_oPageOrigin();
if(_ce==undefined){
_ce=_d2.y+"px";
}
if(_cf==undefined){
_cf=(20+_d2.x)+"px";
}
var _d3=_d0.createElement("DIV");
_d3.style.position="absolute";
_d3.style.top=_ce;
_d3.style.left=_cf;
_d3.style.zIndex=LayerManager.getNextZindex();
_d3.className="img-shadow";
var _d4=_d0.createElement("DIV");
_d4.className="progress-div-large";
var _d5=_d0.createElement("DIV");
_d5.className="progress-div-large-content";
var _d6=_d0.createElement("DIV");
_d6.className="progress-div-message";
_d5.appendChild(_d6);
this._oMessageDiv=_d6;
_d6.innerHTML="Downloading File";
var _d7=_d0.createElement("DIV");
this._oProgressBar=new ProgressBar(_d7);
this._oProgressBar.set_iPercentComplete(100);
_d5.appendChild(_d7);
var _d8=_d0.createElement("DIV");
_d8.className="progress-div-details";
_d5.appendChild(_d8);
this._oDetailsDiv=_d8;
_d8.innerHTML="If your download does not start automatically:<br/>&nbsp;&nbsp;a) You may download the file from this <a href=\""+_cd+"\">direct link<"+"/a>, or<br/>&nbsp;&nbsp;b) You may <a href=\"javascript:PopUpWinKbArticle('ie_automatically_prompt_for_download.txt')\">change your browser settings.<"+"/a>";
var _d9=_d0.createElement("DIV");
_d9.className="progress-div-details";
_d9.style.paddingTop="5px";
_d9.style.color="#6377AF";
_d5.appendChild(_d9);
this._oTimerDiv=_d9;
var _da=_d0.createElement("DIV");
_da.style.textAlign="right";
_da.marginTop="15px";
_d5.appendChild(_da);
var _db=_d0.createElement("INPUT");
_db.style.marginRight="5px";
_db.type="button";
_db.value="Keep Open";
_da.appendChild(_db);
var _dc=_d0.createElement("INPUT");
_dc.type="button";
_dc.value="Close";
_da.appendChild(_dc);
var _dd=this;
Event.observe(_db,"click",function(){
_dd._bKeepDownloadDivOpen=true;
_db.parentNode.removeChild(_db);
_d9.innerHTML="&nbsp;";
});
Event.observe(_dc,"click",function(){
_dd._abort();
});
_d4.appendChild(_d5);
_d3.appendChild(_d4);
this._oDocument.body.appendChild(_d3);
this._oProgressBar.pack();
_d3.style.visibility="hidden";
_d3.style.visibility="visible";
this._oProgressDiv=_d3;
this._eProgressDivType=WebtraderRequest.PROGRESS_TYPE_DOWNLOAD;
this._oProgressDiv.style.cursor="move";
if(this._iProgressDivOpacity!=null){
Element.setOpacity(_d3,this._iProgressDivOpacity);
}
},_setProgressStatus:function(_de,_df,_e0){
if(this._oMessageDiv!=undefined){
if(_de==undefined){
_de="";
}
this._oMessageDiv.innerHTML=_de;
}
if(this._oDetailsDiv!=undefined){
if(_e0==undefined){
_e0="";
}
this._oDetailsDiv.innerHTML=_e0;
}
if(this._oProgressBar!=undefined){
this._oProgressBar.set_iPercentComplete(_df);
}
},_checkRequestStatus:function(_e1,_e2){
this.debug("Checking request status for request, "+_e1+".  Request #"+_e2);
if(this._oClient){
this.debug("Aborting previous check request due to new check request");
this._oClient.abort();
}
var _e3=this;
var _e4=new quickcontent.Client();
_e4.set_sServerFunction("WebtraderRequestStatus");
_e4.set_oArgs({"iWebtraderRequestId":_e1,"iStatusVersion":_e2,"iConnectionErrorCount":this._iConnectionErrorCount});
_e4.set_iTimeout(60000);
_e4.ontimeout=function(_e5){
_e3.debug("10 minute timeout occured.  This is likely due to a connection problem.");
_e3._oClient=null;
_e5.ondataparsed=null;
_e5.onerror=function(){
};
_e5.ontimeout=function(){
return false;
};
_e3._iConnectionErrorCount++;
_e3._checkRequestStatus(_e1,_e2);
return false;
};
this._oClient=_e4;
_e4.ondataparsed=function(_e6){
_e3.debug("Request Status response received fromt the server");
var _e7;
var _e8;
var _e9;
if(_e6==null){
_e3._checkRequestStatus(_e1,_e2);
return;
}
if(_e6.sStatus=="ERROR"){
_e3.debug("Response was error, "+_e6.sMessage);
IntexAlert(_e6.sMessage);
_e3._abort();
if(_e6.sResubmitAction!=undefined){
_e3.debug("Running resubmit action, "+_e6.sResubmitAction);
var _ea=document.WebTraderFrm;
var _eb=GetFormValues(_ea);
_e9=modify_action_to_resubmit(_e6.sResubmitAction);
ActionWithForm(_e9,_eb);
}
return;
}else{
if(_e6.sMessage!=undefined){
_e7=_e6.sMessage;
_e8=_e6.sDetails;
_e3.debug("Received message="+_e7+", details="+_e8);
}else{
_e9=_e3._sAction;
_e7="Processing ...";
_e8=_e9;
_e3.debug("Received message="+_e7+", details="+_e8);
}
}
var _ec=_e6.sUrl;
if(_ec==undefined){
if(_e2!=undefined&&_e3._eProgressDivType!=WebtraderRequest.PROGRESS_TYPE_LARGE&&_e6.iPercentComplete>0){
_e3._generateLargeProgressDiv();
_e3.debug("Generating large progress div");
}
_e3._setProgressStatus(_e7,_e6.iPercentComplete,_e8);
_e3._checkRequestStatus(_e1,_e6.iStatusVersion);
}else{
if(_e3.onresult!=null){
if(_e3.onresult(_e6,_e3)===false){
_e3.debug("onresult callback specified, so bailing out");
_e3._abort();
return;
}
}
_e3.debug("A URL is defined, so we will redirect to it, "+_ec);
try{
var _ed=_e3._oDocument.location;
_e3._setProgressStatus("Redirecting ...",100,"Your page is complete, redirecting ...");
if(_e3._bWatchingUser){
if(!_ec.match(/\?/)){
_ec+="?";
}
_ec+="&iLastWatchRequestId="+_e3._iWebtraderRequestId;
}
_ed.assign(_ec);
if(_ec.match("/download[^/]+.asp")||_ec.match("/downloadWebtrader[^/]+/")){
_e3._generateDownloadDiv(_ec);
_e3._bKeepDownloadDivOpen=false;
_e3._iAbortInSeconds=11;
var _ee;
_ee=function(){
if(_e3._bKeepDownloadDivOpen){
return;
}
if(_e3._iAbortInSeconds<=0){
_e3._abort();
}else{
_e3._iAbortInSeconds--;
_e3._oTimerDiv.innerHTML="This message will close in "+_e3._iAbortInSeconds+" seconds.";
setTimeout(_ee,1000);
}
};
_ee();
}else{
setTimeout(function(){
_e3._abort();
},2000);
}
}
catch(oError){
}
}
};
_e4.onerror=function(_ef){
_e3.debug("Received error from server, "+_ef);
if(_ef.sType=="intex::UserFriendlyError::AuthenticationError"){
IntexAlert("Your INTEXnet session has expired.  Please log back in.");
_e3._abort();
_e3._oDocument.location.assign("/intexnet/Logout.htm");
}else{
this.defaultOnError(_ef);
_e3._abort();
}
};
_e4.fetch();
},_cleanUp:function(){
this._destroyProgressDiv();
for(sAttribute in this){
this[sAttribute]=null;
}
},_cancel:function(){
var _f0=new quickcontent.Client();
var _f1=this;
_f0.set_oArgs({"iWebtraderRequestId":this._iWebtraderRequestId});
_f0.onerror=function(_f2){
this.defaultOnError(_f2);
_f1._abort();
};
_f0.ondataparsed=function(_f3){
if(_f3){
IntexAlert("Your action has been canceled.");
}else{
IntexAlert("There was an error canceling your request");
}
_f1._abort();
};
_f0.set_sServerFunction("CancelWebtraderAction");
_f0.fetch();
},_abort:function(){
var _f4=this._oDocument.body;
if(this._oClient!=undefined){
this._oClient.abort();
}
if(this._oProgressDiv!=null){
_f4.removeChild(this._oProgressDiv);
this._oProgressDiv=null;
}
BodyCover.hide();
_f4.style.cursor="default";
if(this._onBodySelectStart!=null){
Event.stopObserving(_f4,"selectstart",this._onBodySelectStart);
}
_f4.onselectstart=null;
}};
var Cover=Class.create();
Cover.prototype={initialize:function(_f5,_f6){
this._oCoveredDomElement=_f5;
this._sMessage=_f6.sMessage;
if(_f6!=undefined){
this._oDocument=_f6.oDocument;
this._iOpacity=_f6.iOpacity;
this._sColor=_f6.sColor;
this._iZIndex=_f6.iZIndex;
this._bUseSupport=_f6.bUseSupport;
this._oParentNode=_f6.oParentNode;
}
if(this._oCoveredDomElement==undefined){
this._oCoveredDomElement=document.body;
}
if(this._iOpacity==undefined){
this._iOpacity=0.5;
}
if(this._sColor==undefined){
this._sColor="gray";
}
if(this._iZIndex==undefined){
this._iZIndex=LayerManager.getNextZindex();
}
if(Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5),10)==6){
this._bUseSupport=true;
}else{
this._bUseSupport=false;
}
},get_oDomElement:function(){
if(this._oDomElement==undefined){
var _f7=this._oCoveredDomElement.ownerDocument;
var _f8=_f7.createElement("IFRAME");
_f8.src="/intexnet/about_blank.htm";
_f8.style.position="absolute";
_f8.style.top="0";
_f8.style.left="0";
_f8.style.zIndex=this._iZIndex-1;
_f8.style.background=this._sColor;
this._oCoverSupport=_f8;
var _f9=_f7.createElement("DIV");
_f9.style.background=this._sColor;
_f9.style.position="absolute";
_f9.style.top="0";
_f9.style.left="0";
_f9.style.zIndex=this._iZIndex;
this._oDomElement=_f9;
Element.setOpacity(_f8,0);
Element.setOpacity(_f9,this._iOpacity);
this._adjustCoverSizeAndPosition();
}
return this._oDomElement;
},_adjustCoverSizeAndPosition:function(){
var _fa=this._oDomElement;
var _fb=this._oCoverSupport;
var _fc=this._oCoveredDomElement;
var _fd=_fc.ownerDocument;
var _fe=_fd.body;
var _ff;
var _100;
if(_fc==_fe){
var _101=this._get_oWindow();
var _102=XB.get_oFrameInnerDimensions(_101);
_ff=Math.max(_102.height,_fe.scrollHeight)+"px";
_100=Math.max(_102.width,_fe.scrollWidth)+"px";
if(this._oMessageDiv!=null){
var _103=XB.get_oPageOrigin();
this._oMessageDiv.style.top=_103.y+"px";
this._oMessageDiv.style.left=_103.x+"px";
}
}else{
_ff=_fc.scrollHeight+"px";
_100=_fc.scrollWidth+"px";
var _104;
if(this._oParentNode!=null){
_104=Position.positionedOffset(_fc);
}else{
_104=Position.cumulativeOffset(_fc);
}
var _105=_104[0];
var iTop=_104[1];
_fa.style.left=_105+"px";
_fa.style.top=iTop+"px";
_fb.style.left=_105+"px";
_fb.style.top=iTop+"px";
if(this._oMessageDiv!=null){
this._oMessageDiv.style.top=iTop+"px";
this._oMessageDiv.style.left=(_105+parseInt(_100,10)-this._oMessageDiv.scrollWidth-5)+"px";
}
}
_fa.style.height=_ff;
_fa.style.width=_100;
_fb.style.height=_ff;
_fb.style.width=_100;
},set_sMessage:function(_106){
this._sMessage=_106;
},hide:function(){
if(this._oDomElement!=undefined){
var _107=this._oParentNode||this._oCoveredDomElement.ownerDocument.body;
if(this._oDomElement.parentNode==_107){
_107.removeChild(this._oDomElement);
if(this._bUseSupport){
_107.removeChild(this._oCoverSupport);
}
}
if(this._oMessageDiv!=null&&this._oMessageDiv.parentNode!=null){
this._oMessageDiv.parentNode.removeChild(this._oMessageDiv);
this._oMessageDiv=null;
}
}
},_get_oWindow:function(){
var _108=this._oCoveredDomElement.ownerDocument;
return _108.defaultView||_108.parentWindow;
},show:function(_109){
_109=_109||{};
var _10a=this._oParentNode||this._oCoveredDomElement.ownerDocument.body;
this.get_oDomElement();
_10a.appendChild(this.get_oDomElement());
if(this._bUseSupport){
_10a.appendChild(this._oCoverSupport);
}
var _10b=_109.sMessage||this._sMessage;
if(_10b!=null){
if(this._oMessageDiv==null){
var _10c=document.createElement("DIV");
_10c.className="quickcontentloading";
_10c.style.position="absolute";
_10c.style.top="0";
_10c.style.backgroundColor="InfoBackground";
_10c.style.backgroundPosition="10px 20px";
_10c.style.border="1px solid black";
_10c.style.padding="20px 30px";
_10c.style.zIndex=LayerManager.getNextZindex();
_10c.style.margin="0";
_10c.style.whiteSpace="nowrap";
this._oMessageDiv=_10c;
}
this._oMessageDiv.innerHTML=_10b;
_10a=this._oParentNode||document.body;
_10a.appendChild(this._oMessageDiv);
this._adjustCoverSizeAndPosition();
}
}};
var BodyCover={_oCover:null,show:function(_10d){
if(this._oCover==null){
var _10e=XB.get_bTransparencySupported()?"gray":"white";
var _10f;
if(_10d!=null){
_10f=_10d.sMessage;
}
this._oCover=new Cover(document.body,{"iOpacity":0.3,"sColor":_10e,"sMessage":_10f});
}
this._oCover._sMessage=null;
if(_10d!=null){
if(_10d.bUseSupport!=null){
this._oCover._bUseSupport=_10d.bUseSupport;
}
if(_10d.sMessage!=null){
this._oCover._sMessage=_10d.sMessage;
}
}
Application.trigger("BeforeBodyCoverShown");
this._oCover.show();
},hide:function(){
Application.trigger("BeforeBodyCoverHidden");
if(this._oCover!=null){
this._oCover.hide();
}
Application.trigger("BodyCoverHidden");
}};
var ActionListener=Class.create();
ActionListener.prototype={initialize:function(){
this._hListeners={};
this.on=this.addListener;
},_normalizeEventName:function(_110){
if(_110==null){
return _110;
}
return _110.toLowerCase();
},addListener:function(_111,_112){
_111=this._normalizeEventName(_111);
var _113=this._hListeners;
if(_113[_111]==null){
_113[_111]=[];
}
_113[_111].push(_112);
},removeListener:function(_114,_115){
_114=this._normalizeEventName(_114);
var _116=this._hListeners[_114];
if(_116!=null){
var _117=_116.length;
for(i=0;i<_117;i++){
if(_116[i]==_115){
delete _116[i];
}
}
}
},trigger:function(_118){
_118=this._normalizeEventName(_118);
var _119=this._hListeners[_118];
if(_119!=null){
var _11a=this.trigger.arguments;
var _11b=_11a.length;
var _11c=[];
var i;
for(i=1;i<_11b;i++){
_11c.push(_11a[i]);
}
var _11d=_119.length;
for(i=0;i<_11d;i++){
var _11e=_119[i];
if(_11e!=null){
if(_11c.length<1){
_11e.apply(_11e);
}else{
_11e.apply(_11e,_11c);
}
}
}
}
}};
var Application=new ActionListener();
function get_sQueryVariable(_11f){
var _120=window.location.search.substring(1);
var _121=_120.split("&");
for(var i=0;i<_121.length;i++){
var _122=_121[i].split("=");
if(unescape(_122[0])==_11f){
return unescape(_122[1]);
}
}
return null;
};
var DialogueResizeGrip=Class.create();
DialogueResizeGrip.prototype={initialize:function(_123){
this._oDialogue=_123;
var _124=this._addGrip(_123);
var _125=_123.get_oWindow();
Event.observe(_125,"mousemove",XB.hitch(this,this.onMouseMoveWindow));
Event.observe(_125,"mousedown",XB.hitch(this,this.onMouseDownWindow));
},getResizeDirectionFromCursorPosition:function(_126){
var _127=this._oDialogue.get_oWindow();
var _128=Position.cumulativeOffset(_127)[0]-Position.realOffset(_127)[0];
var _129=Position.cumulativeOffset(_127)[1]-Position.realOffset(_127)[1];
var x=_126.clientX;
var y=_126.clientY;
var _12a=this._oDialogue._iWidth;
var _12b=this._oDialogue._iHeight;
if(x-_128<5){
if(y-_129<15){
return "nw-resize";
}else{
if(_129+_12b-y<15){
return "sw-resize";
}else{
return "w-resize";
}
}
}else{
if(_128+_12a-x<5){
if(y-_129<15){
return "ne-resize";
}else{
if(_129+_12b-y<15){
return "se-resize";
}else{
return "e-resize";
}
}
}else{
if(y-_129<10){
return "n-resize";
}else{
if(_129+_12b-y<5){
return "s-resize";
}else{
return null;
}
}
}
}
},onMouseDownWindow:function(_12c){
var _12d=this.getResizeDirectionFromCursorPosition(_12c);
if(this._bResizing){
this._onMouseUpDocument(_12c);
return;
}else{
if(_12d==null){
return;
}
}
this.startResize(_12d);
},startResize:function(_12e){
this._bResizing=true;
XB.clearSelection();
XB.disableSelection(document.body);
var _12f=this._oDialogue;
var _130=_12f.get_oWindow();
this._sResizeDirection=_12e;
this._iLeftEdge=Position.cumulativeOffset(_130)[0]-Position.realOffset(_130)[0];
this._iTopEdge=Position.cumulativeOffset(_130)[1]-Position.realOffset(_130)[1];
_12f.turnOutlineModeOn();
this._wrapperOnMouseMoveDocument=XB.hitch(this,this._onMouseMoveDocument);
Event.observe(window.document,"mousemove",this._wrapperOnMouseMoveDocument);
this._wrapperOnMouseUpDocument=XB.hitch(this,this._onMouseUpDocument);
Event.observe(window.document,"mouseup",this._wrapperOnMouseUpDocument);
},onMouseMoveWindow:function(_131){
var _132=this.getResizeDirectionFromCursorPosition(_131);
this._oDialogue.get_oWindow().style.cursor=_132==null?"default":_132;
},_addGrip:function(_133){
var _134=_133._oWindowOuterContents;
var _135=document.createElement("DIV");
_135.className="gc-resize-box-grip";
_134.appendChild(_135);
return _135;
},_onMouseMoveDocument:function(_136){
if(Prototype.Browser.IE){
if(_136.button===0){
this._onMouseUpDocument(_136);
return;
}
}
var _137=this._sResizeDirection;
var _138=this._oDialogue;
var _139,_13a,_13b,_13c,_13d,_13e,_13f,_140,_141,_142;
if(_137=="se-resize"){
_138.set_iHeight(_136.clientY-this._iTopEdge);
_138.set_iWidth(_136.clientX-this._iLeftEdge);
}else{
if(_137=="s-resize"){
_138.set_iHeight(_136.clientY-this._iTopEdge);
}else{
if(_137=="e-resize"){
_138.set_iWidth(_136.clientX-this._iLeftEdge);
}else{
if(_137=="w-resize"){
_139=_138._oClientPosition.x;
_13a=_136.clientX;
_13b=_13a-_139;
_13c=_138._iWidth;
_13d=_13c-_13b;
if(_13d>150){
_138.moveToClientPosition(_13a,_138._oClientPosition.y);
_138.set_iWidth(_13d);
}
}else{
if(_137=="n-resize"){
_13e=_138._oClientPosition.y;
_13f=_136.clientY;
_140=_13f-_13e;
_141=_138._iHeight;
_142=_141-_140;
if(_142>150){
_138.moveToClientPosition(_138._oClientPosition.x,_13f);
_138.set_iHeight(_142);
}
}else{
if(_137=="ne-resize"){
_13e=_138._oClientPosition.y;
_13f=_136.clientY;
_140=_13f-_13e;
_141=_138._iHeight;
_142=_141-_140;
if(_142>150){
_138.moveToClientPosition(_138._oClientPosition.x,_13f);
_138.set_iHeight(_142);
}
_138.set_iWidth(_136.clientX-this._iLeftEdge);
}else{
if(_137=="sw-resize"){
_139=_138._oClientPosition.x;
_13a=_136.clientX;
_13b=_13a-_139;
_13c=_138._iWidth;
_13d=_13c-_13b;
if(_13d>150){
_138.moveToClientPosition(_13a,_138._oClientPosition.y);
_138.set_iWidth(_13d);
}
_138.set_iHeight(_136.clientY-this._iTopEdge);
}else{
if(_137=="nw-resize"){
_139=_138._oClientPosition.x;
_13a=_136.clientX;
_13b=_13a-_139;
_13c=_138._iWidth;
_13d=_13c-_13b;
if(_13d>150){
_138.moveToClientPosition(_13a,_138._oClientPosition.y);
_138.set_iWidth(_13d);
}
_13e=_138._oClientPosition.y;
_13f=_136.clientY;
_140=_13f-_13e;
_141=_138._iHeight;
_142=_141-_140;
if(_142>150){
_138.moveToClientPosition(_138._oClientPosition.x,_13f);
_138.set_iHeight(_142);
}
}
}
}
}
}
}
}
}
},_onMouseUpDocument:function(_143){
this._oDialogue.pack();
Event.stopObserving(window.document,"mouseup",this._wrapperOnMouseUpDocument);
Event.stopObserving(window.document,"mousemove",this._wrapperOnMouseMoveDocument);
this._bResizing=false;
XB.enableSelection(document.body);
this._oDialogue.turnOutlineModeOff();
}};
var Dialogue=Class.create();
Dialogue.POSITION_RANDOM=1;
Dialogue.POSITION_CENTER=2;
Dialogue.prototype={initialize:function(_144,_145){
if(_145==undefined){
_145={};
}
this._oWindow=undefined;
this._oIFrame=undefined;
this._bModal=(_145.bModal==undefined)?false:_145.bModal;
this._oParent=(_144==undefined)?document.body:_144;
this._sTitle=(_145.sTitle==undefined)?"":_145.sTitle;
this._iHeight=(_145.iHeight==undefined)?200:_145.iHeight;
this._iWidth=(_145.iWidth==undefined)?400:_145.iWidth;
this._bResizable=(_145.bResizable==undefined)?true:_145.bResizable;
this._bScrollbars=(_145.bScrollbars==undefined)?true:_145.bScrollbars;
this._bClosable=(_145.bClosable==undefined)?true:_145.bClosable;
this.onhide=_145.onhide;
this._bSupportWithIframe=_145._bSupportWithIframe;
this._ePosition=_145.ePosition==null?Dialogue.POSITION_RANDOM:_145.ePosition;
this._oActionListener=new ActionListener();
this.on=this.addListener=XB.hitch(this._oActionListener,this._oActionListener.addListener);
this.removeListener=XB.hitch(this._oActionListener,this._oActionListener.removeListener);
},pack:function(){
this.set_iHeight(this._iHeight);
this.set_iWidth(this._iWidth);
},set_iHeight:function(_146){
if(_146==undefined||_146<150){
return;
}
this._iHeight=_146;
if(this._oContentDiv!=undefined){
this._oContentDiv.style.height=_146+"px";
var _147=_146+"px";
if(this._oHeavyweightPanel!=null){
this._oHeavyweightPanel.style.height=_147;
}
var _148=20;
var _149=this._iContentHeight=Math.max(_146-_148,0);
if(this._bOutlineModeOn){
this._bResizedInOutlineMode=true;
this._oWindowOuterContents.style.height=_146+"px";
return;
}
this._oContentDiv.style.height=_149+"px";
var _14a=LayoutManager.get_oLayout(this._oContentDiv);
if(_14a!=undefined){
_14a.set_iHeight(_149);
}
}
},set_iWidth:function(_14b){
if(_14b==undefined||_14b<150){
return;
}
this._iWidth=_14b;
if(this._oContentDiv!=undefined){
var _14c=_14b+"px";
this._oWindow.style.width=_14c;
this._oWindowOuterContents.style.width=_14c;
if(this._oHeavyweightPanel!=null){
this._oHeavyweightPanel.style.width=_14c;
}
this._oTitleBar.style.width=_14c;
this._oTitleBarForeground.style.width=Math.max(_14b-2,0)+"px";
if(this._bOutlineModeOn){
this._bResizedInOutlineMode=true;
return;
}
var _14d=LayoutManager.get_oLayout(this._oContentDiv);
if(_14d!=undefined){
_14d.set_iWidth(_14b);
}
}
},turnOutlineModeOn:function(){
if(!this._bOutlineModeOn){
this._oContentDiv.style.display="none";
this._bOutlineModeOn=true;
this._oWindowOuterContents.style.height=this._iHeight+"px";
}
},turnOutlineModeOff:function(){
if(this._bOutlineModeOn){
this._oContentDiv.style.display="block";
this._bOutlineModeOn=false;
if(this._bResizedInOutlineMode){
this._bResizedInOutlineMode=false;
this._oWindowOuterContents.style.height="";
this.pack();
}
}
},_buildWindow:function(){
var _14e=this._iHeight;
var _14f=this._iWidth;
var _150=document.createElement("DIV");
_150.className="dialog";
_150.style.margin="0";
_150.style.padding="0";
_150.style.position="absolute";
_150.style.top="10px";
_150.style.left="10px";
_150.style.display="none";
_150.style.zIndex=this._bModal?LayerManager.getNextZindex():10;
var _151=document.createElement("DIV");
this._oWindowOuterContents=_151;
_151.style.position="relative";
_150.appendChild(_151);
var _152;
if(this._bSupportWithIframe){
_152=document.createElement("IFRAME");
_152.src="/intexnet/about_blank.htm";
_152.style.position="absolute";
_152.style.top=0;
_152.style.left=0;
this._oHeavyweightPanel=_152;
_151.appendChild(_152);
}
var _153=document.createElement("DIV");
_153.style.background="ButtonFace";
_153.style.top=0;
_153.style.left=0;
_151.appendChild(_153);
this._oWindowLightweightContents=_153;
var _154=this.oTitleBar=document.createElement("DIV");
_154.className="dialog-title-bar";
_154.innerHTML="<img class=\"bgImage\" src=\"/images/report_titlebar_active.png\">";
var _155=document.createElement("DIV");
_155.className="foreground";
_155.innerHTML="<div class=\"icon\"></div><div class=\"title\">"+this._sTitle+"</div>";
_154.appendChild(_155);
this._oTitleBar=_154;
_153.appendChild(_154);
var _156=this;
var _157=document.createElement("div");
_157.className="close-button";
_155.appendChild(_157);
this._oTitleBarForeground=_155;
Event.observe(_157,"mousedown",function(_158){
Event.stop(_158);
});
var _159=new Button(_157);
_159.onclick=function(){
_156.hide();
};
if(this._bClosable===false){
_157.style.display="none";
}
if(this._bResizable){
var _15a=document.createElement("div");
_15a.className="maximize-button";
_155.appendChild(_15a);
Event.observe(_15a,"mousedown",function(_15b){
Event.stop(_15b);
});
var _15c=this._oMaximizeButtonModel=new Button(_15a);
_15c.onclick=XB.hitch(this,this.toggleMaximized);
}
XB.disableSelection(_154);
Event.observe(_154,"mousedown",XB.hitch(this,this.onMouseDownTitlebar));
Event.observe(_154,"dblclick",XB.hitch(this,this.onDblClickTitlebar));
var _15d=this.get_oContentDiv();
_15d.className="content";
if(this._bScrollbars!==true){
_15d.style.overflow="hidden";
}
_153.appendChild(_15d);
this._oWindow=_150;
this.set_iHeight(_14e);
this.set_iWidth(_14f);
this._oParent.appendChild(_150);
if(this._bResizable){
new DialogueResizeGrip(this);
}
this._oClientPosition=this.getClientPosition();
},maintainClientPosition:function(){
var _15e=this._oClientPosition;
this.moveToClientPosition(_15e.x,_15e.y);
},toggleMaximized:function(){
if(this._bMaximized){
this.restore();
}else{
this.maximize();
}
},_enableBodyScrolling:function(){
document.body.style.overflow="";
if(document.body.parentNode!=null&&document.body.parentNode.style!=null){
document.body.parentNode.style.overflow="";
}
},restore:function(){
if(this._bMaximized){
Event.stopObserving(window,"resize",this._fAdjustMaximizedHeight);
this._enableBodyScrolling();
this._bMaximized=false;
this.set_iHeight(this._iRestoreHeight);
this.set_iWidth(this._iRestoreWidth);
this._oMaximizeButtonModel.set_sClass("maximize-button");
this.moveToClientPosition(this._oRestorePosition.x,this._oRestorePosition.y);
}
},maximize:function(){
if(this._bResizable&&!this._bMaximized){
this._oRestorePosition=this._oClientPosition;
document.body.style.overflow="hidden";
if(document.body.parentNode!=null&&document.body.parentNode.style!=null){
document.body.parentNode.style.overflow="hidden";
}
this.moveToClientPosition(0,0);
this._iRestoreHeight=this._iHeight;
this._iRestoreWidth=this._iWidth;
this._oMaximizeButtonModel.set_sClass("restore-button");
var _15f=this._fAdjustMaximizedHeight=XB.hitch(this,function(){
var _160=XB.get_oFrameInnerDimensions();
this.set_iHeight(_160.height);
this.set_iWidth(_160.width);
});
_15f();
Event.observe(window,"resize",_15f);
this._bMaximized=true;
}
},onDblClickTitlebar:function(_161){
this.toggleMaximized();
},onMouseDownTitlebar:function(_162){
if(this._bMaximized){
return;
}
if(!this.bDragging){
XB.clearSelection();
XB.disableSelection();
var _163=this.fOnMouseUpAfterMove=XB.hitch(this,this.onMouseUpAfterMove);
var _164=this.fOnMouseMove=XB.hitch(this,this.onMouseMove);
Event.observe(document,"mouseup",_163);
Event.observe(this.oTitleBar,"mouseup",_163);
Event.observe(document,"mousemove",_164);
var _165=this.get_oWindow();
var _166=XB.position(_165);
this.iAnchorX=_162.clientX-_166.x;
this.iAnchorY=_162.clientY-_166.y;
this.bDragging=true;
Event.stop(_162);
}else{
this.onMouseUpAfterMove();
}
},getClientPosition:function(){
var _167=this.get_oWindow();
var iTop=parseInt(_167.style.top,10);
var _168=parseInt(_167.style.left,10);
var _169=XB.get_oPageOrigin();
return new Point(_168-_169.x,iTop-_169.y);
},moveToClientPosition:function(_16a,_16b){
this._iClientX=_16a;
this._iClientY=_16b;
var _16c=XB.get_oPageOrigin();
this.move(_16c.x+_16a,_16c.y+_16b);
},move:function(iX,iY){
var _16d=this.get_oWindow();
_16d.style.left=iX+"px";
_16d.style.top=iY+"px";
this._oClientPosition=this.getClientPosition();
},onMouseMove:function(_16e){
this.turnOutlineModeOn();
this.moveToClientPosition(_16e.clientX-this.iAnchorX,_16e.clientY-this.iAnchorY);
Event.stop(_16e);
},onMouseUpAfterMove:function(_16f){
Event.stopObserving(document,"mousemove",this.fOnMouseMove);
Event.stopObserving(document,"mouseup",this.fOnMouseUpAfterMove);
Event.stopObserving(this.oTitleBar,"mouseup",this.fOnMouseUpAfterMove);
this.fOnMouseMove=null;
this.fOnMouseUpAfterMove=null;
this.ensureWindowDragBarOnScreen();
XB.enableSelection();
this.bDragging=false;
Event.stop(_16f);
this.turnOutlineModeOff();
this._oActionListener.trigger("AfterDrag");
},ensureWindowDragBarOnScreen:function(){
var _170=this.get_oWindow();
var _171=XB.get_oFrameInnerDimensions();
var _172=XB.get_oPageOrigin();
var _173=_172.x;
var _174=_172.y;
var _175=_171.get_iWidth();
var _176=_171.get_iHeight();
var _177=_173-_170.offsetWidth+30;
var _178=_173+_175-10;
var _179=_174;
var _17a=_174+_176-10;
var _17b=parseInt(_170.style.left,10);
var _17c=parseInt(_170.style.top,10);
var _17d=false;
var _17e=_17b;
var _17f=_17c;
if(_17b<_177){
_17d=true;
_17e=_177;
}else{
if(_17b>_178){
_17d=true;
_17e=_178;
}
}
if(_17c<_179){
_17d=true;
_17f=_179;
}else{
if(_17c>_17a){
_17d=true;
_17f=_17a;
}
}
if(_17d){
this.move(_17e,_17f);
}
},get_oContentDiv:function(){
if(this._oContentDiv==undefined){
this._oContentDiv=document.createElement("DIV");
}
return this._oContentDiv;
},get_oWindow:function(){
if(this._oWindow==undefined){
this._buildWindow();
}
return this._oWindow;
},hide:function(){
if(this._bMaximized){
this._enableBodyScrolling();
}
this.get_oWindow().style.display="none";
if(this._bModal){
BodyCover.hide();
}
if(this.onhide!=null){
this.onhide(this);
}
},show:function(){
if(this._bModal){
BodyCover.show();
}
var _180=this.get_oWindow();
_180.style.display="block";
var _181=this._oHeavyweightPanel;
if(_181!=null){
_181.style.height=_180.scrollHeight+"px";
_181.style.width=_180.scrollWidth+"px";
}
var _182=XB.get_oFrameInnerDimensions(self);
var _183=XB.get_oPageOrigin();
var _184=_182.height;
var _185=_182.width;
var _186=_183.y;
var _187=_183.x;
var _188=_187;
var _189=_186;
var _18a=Math.max(_188,_188+_185-_180.scrollWidth);
var _18b=Math.max(_189,_189+_184-_180.scrollHeight);
var _18c;
var _18d;
if((this._ePosition=Dialogue.POSITION_CENTER)){
_18d=_189+Math.floor((_18b-_189)/2);
_18c=_188+Math.floor((_18a-_188)/2);
}else{
_18d=(_189+Math.floor(Math.random()*(_18b-_189)));
_18c=(_188+Math.floor(Math.random()*(_18a-_188)));
}
this.move(_18c,_18d);
},pack:function(){
this.set_iHeight(this._iHeight);
this.set_iWidth(this._iWidth);
},set_oMainComponent:function(_18e){
var _18f=this.get_oContentDiv();
_18f.innerHTML="";
var _190=_18e.get_oDomElement();
if(_190!=null){
_18f.appendChild(_190);
var _191=new FillLayout(_18f);
_191.performLayout();
_191.afterresize=XB.hitch(_18e,_18e.pack);
}
_18e.set_oContainingDialog(this);
_18e.on("hide",XB.hitch(this,this.hide));
_18e.onAddedToDom();
if(_190!=null){
this.pack();
}
},dispose:function(){
var _192=this._oWindow;
if(_192!=null&&_192.parentNode!=null){
this.hide();
_192.parentNode.removeChild(_192);
this._oWindow=null;
}
}};
var LayoutManager={_hLayouts:{},registerLayout:function(_193,_194){
var _195=_193.id;
if(_195==undefined||_195.length<1){
_195=DivNameGenerator.get_sNewUniqueDivName();
_193.id=_195;
}
this._hLayouts[_195]=_194;
},unregisterLayout:function(_196){
var _197=_196.id;
if(_197==undefined||_197.length<1){
return;
}
delete this._hLayouts[_197];
},get_oLayout:function(_198){
if(_198!=null){
return this._hLayouts[_198.id];
}
return null;
},onResize:function(){
var _199=this.get_oLayout(document.body);
if(_199!=undefined){
var _19a=self.innerWidth||document.documentElement.offsetWidth;
var _19b=XB.get_oFrameInnerDimensions();
_199.set_iWidth(_19b.width);
_199.set_iHeight(_19b.height);
_199.resizeChildIFrames();
}
},pack:function(_19c){
var _19d;
while(_19c){
_19d=this.get_oLayout(_19c);
if(_19d!=null){
_19d.pack();
return;
}
if(_19c==document.body){
return;
}
_19c=_19c.parentNode;
}
},get_oActionListener:function(){
if(this._oActionListener==null){
this._oActionListener=new ActionListener();
}
return this._oActionListener;
},addListener:function(_19e,_19f){
this.get_oActionListener().addListener(_19e,_19f);
},removeListener:function(_1a0,_1a1){
this.get_oActionListener().removeListener(_1a0,_1a1);
},parseLayouts:function(_1a2){
var _1a3=new TagParser();
var _1a4=new Array();
this._addNodeAndChildrenRecursively(_1a2,_1a4);
var _1a5=_1a4.length;
for(var i=0;i<_1a5;i++){
_1a3.parse(_1a4[i]);
}
},attachLayoutsToBody:function(){
this.get_oActionListener().trigger("before_layouts_attached");
this.parseLayouts(document.body);
this.onResize();
if(!this._bObservingResize){
if(top==self||top.LayoutManager==null){
Event.observe(window,"resize",function(){
LayoutManager.onResize();
});
}
this._bObservingResize=true;
}
this.bLayoutsAttached=true;
this.get_oActionListener().trigger("layouts_attached");
},_addNodeAndChildrenRecursively:function(_1a6,_1a7){
_1a7.push(_1a6);
var _1a8=_1a6.childNodes;
var _1a9=_1a8.length;
for(var i=0;i<_1a9;i++){
var _1aa=_1a8[i];
if(_1aa.nodeType==1){
this._addNodeAndChildrenRecursively(_1aa,_1a7);
}
}
},set_oMainComponent:function(_1ab){
document.body.innerHTML="";
var _1ac=_1ab.get_oDomElement();
if(_1ac!=null){
document.body.appendChild(_1ac);
var _1ad=new FillLayout(document.body);
_1ad.performLayout();
this.onResize();
}
}};
var StandardDialog=Class.create();
StandardDialog.parentClass=Dialogue;
Object.extend(StandardDialog,{alert:function(_1ae,_1af,_1b0){
_1b0=_1b0||{};
_1b0=Object.extend({"bModal":true,"sMessage":_1ae,"bShowOkButton":true,"onhide":_1af,"sIconSrc":"/images/dialog/alert.gif"},_1b0);
var _1b1=new StandardDialog(document.body,_1b0);
_1b1.show();
return _1b1;
},confirm:function(_1b2,_1b3,_1b4){
_1b4=_1b4||{};
_1b4=Object.extend({"bModal":true,"sMessage":_1b2,"bShowOkButton":true,"onhide":_1b3,"bShowCancelButton":true,"sIconSrc":"/images/dialog/confirm.gif"},_1b4);
var _1b5=new StandardDialog(document.body,_1b4);
_1b5.show();
return _1b5;
},prompt:function(_1b6,_1b7,_1b8){
_1b8=_1b8||{};
_1b8=Object.extend({"bModal":true,"sMessage":_1b6,"bShowOkButton":true,"onhide":_1b7,"bShowCancelButton":true,"sIconSrc":"/images/dialog/confirm.gif","bShowInputField":true},_1b8);
var _1b9=new StandardDialog(document.body,_1b8);
_1b9.show();
return _1b9;
}});
StandardDialog.StandardNameValidator=Class.create();
Object.extend(StandardDialog.StandardNameValidator.prototype,{initialize:function(_1ba){
if(_1ba==null){
_1ba={};
}
this._bExtended=_1ba.bExtended;
this._bPerformAsciiTest=_1ba.bPerformAsciiTest==null?true:_1ba.bPerformAsciiTest;
this._bPerformFileNameTest=_1ba.bPerformFileNameTest==null?false:_1ba.bPerformFileNameTest;
this._bPerformIntexSpecialCharacterTest=_1ba.bPerformIntexSpecialCharacterTest==null?false:_1ba.bPerformIntexSpecialCharacterTest;
if(_1ba.iMaxLength!=null){
this._iMaxLength=_1ba.iMaxLength;
this._bPerformLengthTest=true;
}
},_performAsciiTest:function(_1bb){
var _1bc=32;
var _1bd=(this._bExtended?255:128);
for(var i=0;i<_1bb.length;i++){
var _1be=_1bb.charCodeAt(i);
if(_1be<_1bc||_1be>_1bd){
throw {"sMessage":"You have entered an invalid character, '"+_1bb.charAt(i)+"'"};
}
}
},_performFileNameTest:function(_1bf){
var _1c0="\\/:*?\"<>|";
if(_1bf.match(/[\\\/:*\?\"<>\|]/)){
throw {"sMessage":"You may not use the following characters:"+_1c0};
}
},_performIntexSpecialCharacterTest:function(_1c1){
var _1c2="A-Za-z0-9 !#$%&'()+-.[]@={}_^";
if(_1c1.match(/[^A-Za-z0-9 !#$%&'()+\-\.\[\]@={}_\^]/)){
throw {"sMessage":"You may only use the following characters:"+_1c2};
}
},_performLengthTest:function(_1c3){
if(_1c3.length>this._iMaxLength){
throw {"sMessage":"Too long.  Please shorten to less than "+this._iMaxLength+" characters."};
}
},validate:function(_1c4){
if(this._bPerformAsciiTest){
this._performAsciiTest(_1c4);
}
if(this._bPerformFileNameTest){
this._performFileNameTest(_1c4);
}
if(this._bPerformIntexSpecialCharacterTest){
this._performIntexSpecialCharacterTest(_1c4);
}
if(this._bPerformLengthTest){
this._performLengthTest(_1c4);
}
return true;
}});
Object.extend(StandardDialog.prototype,StandardDialog.parentClass.prototype);
Object.extend(StandardDialog.prototype,{initialize:function(_1c5,_1c6){
_1c5=_1c5||document.body;
_1c6=_1c6||{};
StandardDialog.parentClass.prototype.initialize.call(this,_1c5,_1c6);
this._bShowOkButton=_1c6.bShowOkButton;
this._bShowCancelButton=_1c6.bShowCancelButton;
this._bShowInputField=_1c6.bShowInputField;
this._bShowMultiLineInput=_1c6.bShowMultiLineInput;
this._sMessage=_1c6.sMessage;
this._sInputText=_1c6.sInputText;
this._sIconSrc=_1c6.sIconSrc;
this._iWidth=_1c6.iWidth==null?323:_1c6.iWidth;
this._bResizable=_1c6.bResizable==null?false:_1c6.bResizable;
this._ePosition=_1c6.ePosition==null?Dialogue.POSITION_CENTER:_1c6.ePosition;
this._bHtmlContent=_1c6.bHtmlContent==null?false:_1c6.bHtmlContent;
this._bYesNo=_1c6.bYesNo==null?false:_1c6.bYesNo;
this._bValidate=_1c6.bValidate==null?false:_1c6.bValidate;
if(_1c6.oValidator!=null){
this._oValidator=_1c6.oValidator;
this._bValidate=true;
}
if(this._bValidate&&this._oValidator==null){
this._oValidator=new StandardDialog.StandardNameValidator();
}
},show:function(){
this._bOkPressed=false;
StandardDialog.parentClass.prototype.show.call(this);
if(this._oInput!=null){
this._oInput.focus();
}else{
if(this._oOkButton!=null){
this._oOkButton.focus();
}
}
this._oContentDiv.style.height=null;
this._oContentDiv.style.overflow="hidden";
this.set_iHeight(this._oContentDiv.offsetHeight+20);
},get_sInput:function(){
if(this._oInput!=null){
return this._oInput.value;
}
return null;
},get_bOkPressed:function(){
return this._bOkPressed;
},get_oContentDiv:function(){
var _1c7=this;
if(this._oContentDiv==undefined){
var _1c8=document.createElement("DIV");
_1c8.style.padding="10px";
var _1c9=document.createElement("img");
XB.setFloatStyle(_1c9,"left");
_1c9.padding="20px";
_1c9.src=this._sIconSrc;
var _1ca=document.createElement("div");
_1ca.style.padding="0 10px 20px 10px";
_1ca.style.paddingLeft="40px";
if(this._bHtmlContent){
_1ca.innerHTML=this._sMessage;
}else{
_1ca.appendChild(document.createTextNode(this._sMessage));
}
_1c8.appendChild(_1c9);
_1c8.appendChild(_1ca);
if(this._bShowInputField){
var _1cb=document.createElement("DIV");
_1cb.style.paddingLeft="40px";
_1cb.style.paddingRight="10px";
var _1cc;
if(this._bShowMultiLineInput){
_1cc=document.createElement("textarea");
_1cc.style.height="100px";
_1cc.setAttribute("wrap","off");
}else{
_1cc=document.createElement("input");
_1cc.type="text";
}
_1cc.style.width="100%";
this._oInput=_1cc;
if(this._sInputText!=null){
_1cc.value=this._sInputText;
}
if(this._bValidate){
var _1cd=document.createElement("DIV");
_1cd.style.color="red";
_1cd.style.height="17px";
_1cb.appendChild(_1cd);
this._oValidateErrorDiv=_1cd;
Event.observe(_1cc,"keyup",function(_1ce){
_1c7._onKeyUp(_1ce);
});
}
_1cb.appendChild(_1cc);
_1c8.appendChild(_1cb);
}
var _1cf=document.createElement("div");
_1cf.style.textAlign="center";
_1cf.style.padding="10px";
if(this._bShowOkButton){
var _1d0=document.createElement("button");
_1d0.innerHTML=this._bYesNo?"Yes":"OK";
_1d0.style.marginRight="10px";
_1d0.style.width="75px";
_1cf.appendChild(_1d0);
Event.observe(_1d0,"click",function(){
_1c7._bOkPressed=true;
_1c7.hide();
});
this._oOkButton=_1d0;
}
if(this._bShowCancelButton){
var _1d1=document.createElement("button");
_1d1.innerHTML=this._bYesNo?"No":"Cancel";
_1d1.style.width="75px";
_1cf.appendChild(_1d1);
Event.observe(_1d1,"click",function(){
_1c7.hide();
});
}
_1c8.appendChild(_1cf);
this._oContentDiv=_1c8;
}
return this._oContentDiv;
},_onKeyUp:function(_1d2){
var _1d3=this._oInput;
try{
this._oValidator.validate(_1d3.value);
this._oOkButton.disabled=false;
this._oValidateErrorDiv.innerHTML="";
}
catch(oError){
this._oOkButton.disabled=true;
this._oValidateErrorDiv.innerHTML=oError.sMessage;
}
}});
var Button=Class.create();
Button.prototype={initialize:function(_1d4){
this._oDomElement=_1d4;
this._sBaseClassName=_1d4.className;
this._addEventListeners();
this.onclick=null;
},set_sClass:function(_1d5){
this._sBaseClassName=this._oDomElement.className=_1d5;
if(this._sState!=null){
this.setState(this._sState);
}
},_addEventListeners:function(){
var _1d6=this;
var _1d7=this._oDomElement;
Event.observe(_1d7,"mouseover",function(){
_1d6._onMouseOver();
});
Event.observe(_1d7,"mouseout",function(){
_1d6._onMouseOut();
});
Event.observe(_1d7,"mousedown",function(){
_1d6._onMouseDown();
});
Event.observe(_1d7,"mouseup",function(){
_1d6._onMouseUp();
});
},_onMouseOver:function(){
if(this.disabled){
return;
}
if(this._bActive){
this.setState("down");
}else{
this.setState("hover");
}
},_onMouseOut:function(){
if(this.disabled){
return;
}
if(this._bActive){
this.setState("hover");
}else{
this.setState("normal");
}
},_onMouseDown:function(){
if(this.disabled){
return;
}
this.setState("down");
this.setActive();
},_onMouseUp:function(){
if(this.disabled){
return;
}
if(this._bActive&&this.onclick!=null){
this.onclick.call(this._oDomElement,this);
}
this.setState("hover");
this.setInactive();
},disable:function(){
this.disabled=true;
this.setState("disabled");
},enable:function(){
this.disabled=false;
this.setState("normal");
},setState:function(_1d8){
var _1d9;
if(_1d8=="normal"){
_1d9="";
}else{
_1d9="-"+_1d8;
}
this._sState=_1d8;
this._oDomElement.className=this._sBaseClassName+_1d9;
},setActive:function(){
if(!this._bActive){
this._bActive=true;
window.focus();
var _1da=this;
this._wrapperOnMouseUpBody=function(_1db){
_1da._onMouseUpBody(_1db);
};
Event.observe(document.body,"mouseup",this._wrapperOnMouseUpBody);
this._wrapperOnMouseDownBody=function(_1dc){
_1da._onMouseDownBody(_1dc);
};
Event.observe(document.body,"mousedown",this._wrapperOnMouseDownBody);
this._wrapperOnMouseMoveBody=function(_1dd){
_1da._onMouseMoveBody(_1dd);
};
Event.observe(document.body,"mousemove",this._wrapperOnMouseMoveBody);
this._wrapperOnWindowBlur=function(_1de){
_1da._onWindowBlur(_1de);
};
Event.observe(window,"blur",this._wrapperOnWindowBlur);
}
},setInactive:function(){
if(this._bActive){
this._bActive=false;
Event.stopObserving(document.body,"mouseup",this._wrapperOnMouseUpBody);
Event.stopObserving(document.body,"mousedown",this._wrapperOnMouseDownBody);
Event.stopObserving(document.body,"mousemove",this._wrapperOnMouseMoveBody);
Event.stopObserving(window,"blur",this._wrapperOnWindowBlur);
}
},_onMouseUpBody:function(_1df){
if(!XB.hitTest(this._oDomElement,_1df.clientX,_1df.clientY)){
this.setInactive();
this.setState("normal");
}
},_onMouseDownBody:function(_1e0){
if(!XB.hitTest(this._oDomElement,_1e0.clientX,_1e0.clientY)){
this.setInactive();
this.setState("normal");
}
},_onMouseMoveBody:function(_1e1){
if(this._bActive){
XB.clearSelection();
}
},_onWindowBlur:function(_1e2){
if(!Position.within(this._oDomElement,_1e2.clientX,_1e2.clientY)){
this.setInactive();
this.setState("normal");
}else{
window.focus();
}
}};
function IntexAlert(vMsg,_1e3){
if(typeof vMsg=="string"){
vMsg=vMsg.replace(/<BR\s*\/?>/ig,"\n");
vMsg=vMsg.replace(/<P>/ig,"\n\n");
vMsg=vMsg.replace(/<[!\/A-Z][^>]*?>/ig,"");
vMsg=vMsg.replace(/&nbsp;/g," ");
vMsg=vMsg.replace(/&lt;/g,"<");
vMsg=vMsg.replace(/&gt;/g,">");
}
alert(vMsg);
};
Event.observe(window,"load",function(){
var _1e4=get_sQueryVariable("iLastWatchRequestId");
if(_1e4>0){
var _1e5=new WebtraderRequest({"iLastWatchRequestId":_1e4},window.document);
_1e5.makeRequest();
}
});
var Debug={LEVEL_ERROR:1,LEVEL_WARNING:2,LEVEL_NOTICE:3,LEVEL_INFO:4,get_oConsole:function(){
if(Debug._oConsole==undefined){
Debug._oConsole=$("console");
if(Debug._oConsole==undefined){
return null;
}
Debug._oConsole.style.whiteSpace="pre";
}
return Debug._oConsole;
},print:function(_1e6){
var _1e7=this.get_oConsole();
if(_1e7!=null){
Debug._oConsole.innerHTML+=_1e6+"<br>";
Debug._oConsole.scrollTop="10000";
}
},clear:function(){
var _1e8=this.get_oConsole();
if(_1e8!=null){
Debug._oConsole.innerHTML="";
}
},get_aEvents:function(_1e9,_1ea){
var _1eb=[];
for(var sKey in Event.observers){
var _1ec=Event.observers[sKey];
if(_1ec[0]==_1e9&&(_1ea==null||_1ec[1]==_1ea)){
_1eb.push(_1ec);
}
}
return _1eb;
}};
var Cookie={set:function(_1ed,_1ee,_1ef,_1f0,_1f1){
_1f0=_1f0||"/";
var _1f2="";
if(_1ef){
var _1f3=new Date();
_1f3.setTime(_1f3.getTime()+(_1ef*24*60*60*1000));
_1f2="; expires="+_1f3.toGMTString();
}
var _1f4=_1ed+"="+_1ee+_1f2+";";
if(_1f1!=null){
_1f4+=" domain="+_1f1+";";
}
_1f4+=" path="+_1f0;
document.cookie=_1f4;
},get:function(_1f5){
var _1f6=_1f5+"=";
var _1f7=document.cookie.split(";");
for(var i=0;i<_1f7.length;i++){
var _1f8=_1f7[i];
_1f8=_1f8.replace(/^\s+/,"");
if(_1f8.indexOf(_1f6)==0){
return _1f8.substring(_1f6.length,_1f8.length);
}
}
return null;
}};
var SessionData={set:function(_1f9){
if(_1f9!=null){
_1f9.wid=(new Date()).getTime();
}
var _1fa=JsonParser.toJsonString(_1f9);
window.name=this.encodeForWindowName(_1fa);
Cookie.set("sd",escape(_1fa));
},get:function(sKey){
var _1fb=this.decodeWindowName(window.name);
if(_1fb==null||_1fb.indexOf("{")<0){
_1fb=unescape(Cookie.get("sd"));
}
if(_1fb!=null&&_1fb.length>0){
try{
var _1fc=eval("result="+_1fb);
if(sKey!=undefined&&_1fc!=null){
return _1fc[sKey];
}
return _1fc;
}
catch(oError){
return null;
}
}else{
return null;
}
},getWindowName:function(wid){
var _1fd=Object.extend({},this.get());
_1fd.key=quickcontent.get_sSessionKey();
_1fd.wid=(wid==null||wid=="_blank")?(new Date()).getTime():wid;
return this.encodeForWindowName(JsonParser.toJsonString(_1fd));
},encodeForWindowName:function(_1fe){
var _1ff=escape(_1fe);
_1ff=_1ff.replace(/\*/g,"%2a").replace(/@/g,"%40").replace(/\-/g,"%2d").replace(/\_/g,"%5f").replace(/\+/g,"%2b").replace(/\./g,"%2e").replace(/\//g,"%2f");
_1ff=_1ff.replace(/%/g,"_");
return _1ff;
},decodeWindowName:function(_200){
if(_200==null){
return null;
}
return unescape(_200.replace(/\_/g,"%"));
}};


