function $(axA){return document.getElementById(axA);}function ToggleDisplay(axad,axac){if(typeof(axac)!=="undefined"||axac===null){$(axac).src=($(axad).style.display==='none')?ALERTImagePath+'minus.gif':ALERTImagePath+'plus.gif';}$(axad).style.display=($(axad).style.display==='none')?'inline':'none';};function SetDisplayMode(axab,axad,axac){if(typeof(axac)!=="undefined"||axac===null){$(axac).src=axab?ALERTImagePath+'minus.gif':ALERTImagePath+'plus.gif';}$(axad).style.display=axab?'inline':'none';};function RefreshAndClose(){if(this==top){if(typeof(window.opener.TREECONTROL_refresh)!=="undefined")window.opener.TREECONTROL_refresh();window.close();}else{if(typeof(top.TREECONTROL_refresh)!=="undefined")top.TREECONTROL_refresh();top.closeChild();}};function LogRequest(axO){if(typeof(Debugger)!=="undefined")Debugger.logRequest(axO);else if(typeof(window.opener)!=="undefined"&&typeof(window.opener.Debugger)!=="undefined")window.opener.Debugger.logRequest(axO);};function LogResponse(axR){if(typeof(Debugger)!=="undefined")Debugger.logResponse(axR);else if(typeof(window.opener)!=="undefined"&&typeof(window.opener.Debugger)!=="undefined")window.opener.Debugger.logResponse(axR);};function LogJSONResponse(axC,axS){if(typeof(Debugger)!=="undefined")Debugger.logJSONResponse(axC,axS);else if(typeof(window.opener)!=="undefined"&&typeof(window.opener.Debugger)!=="undefined")window.opener.Debugger.logJSONResponse(axC,axS);};function LogError(axw){if(typeof(Debugger)!=="undefined")Debugger.logError(axw);else if(typeof(window.opener)!=="undefined"&&typeof(window.opener.Debugger)!=="undefined")window.opener.Debugger.logError(axw);};function LogObjectProperties(axF,axS,axJ){if(typeof(Debugger)!=="undefined")Debugger.logObjectProperties(axF,axS,axJ);else if(typeof(window.opener)!=="undefined"&&typeof(window.opener.Debugger)!=="undefined")window.opener.Debugger.logObjectProperties(axF,axS,axJ);};var axr=window.createPopup();function DisplayPopupInfo(axD,axU,axV,axX,axT){axr.document.body.innerHTML="<DIV STYLE=\"color: white; background:#ffffcc; width:"+axU+"; border:1px solid black; padding:4px; font-family:Trebuchet MS; font-size:70%; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#0050DD', EndColorStr='#005090');\">"+axD+"</DIV>";axr.show(0,0,axU,0);var axz=axr.document.body.scrollHeight;axr.hide();if(axT!==null){axr.show(axV,axX,axU,axz,axT);}else{axr.show(axV,axX,axU,axz);}};function DisplayPopupInfoID(axA,axU,axV,axX,axT){var axv=$(axA);if(axv!=null){DisplayPopupInfo(axv.outerHTML,axU,axV,axX,axT);}else{LogError("Unable to load element id "+axA+" for ShowPopupInfoID");}};function HidePopupInfo(){axr.hide();};function AJAX_startJSONQueryRequest(axP,axL,axI,axu){var axK=new axa(axc(),axu);LogRequest(axP);axaxh.axo(axK);axK.axW.onreadystatechange=axe;axK.axW.open(axI,axP,true);if(axI.toUpperCase()=="POST")axK.axW.setRequestHeader("Context-Type","application/x-www-form-urlencoded");axK.axW.send(axL);};function AJAX_startQueryRequest(axP,axL,axI,axu){var axK=new axa(axc(),axu);LogRequest(axP);axaxh.axo(axK);axK.axW.onreadystatechange=axf;axK.axW.open(axI,axP,true);if(axI.toUpperCase()=="POST")axK.axW.setRequestHeader("Content-Type","application/x-www-form-urlencoded");axK.axW.send(axL);};function AJAX_startJSONXMLRequest(axP,axL,axu){var axK=new axa(axc(),axu);LogRequest(axP+" &nbsp;&nbsp;&nbsp;Data: "+axL);axaxh.axo(axK);axK.axW.onreadystatechange=axe;axK.axW.open("POST",axP,true);axK.axW.setRequestHeader("Content-Type","text/xml");axK.axW.send(axL);};function axg(axP,axL,axu){var axK=new axa(axc(),axu);LogRequest(axP+" &nbsp;&nbsp;&nbsp;Data: "+axL);axaxh.axo(axK);axK.axW.onreadystatechange=axf;axK.axW.open("POST",axP,true);axK.axW.setRequestHeader("Content-Type","text/xml");axK.axW.send(axL);};function AJAX_pendingRequests(){return axaxh.axH;};function attachObjectEvent(axG,axy,axE){try{if(typeof(axG.addEventListener)!=="undefined"){axG.addEventListener(axy,axE,false);}else if(typeof(axG.attachEvent)!=="undefined"){axG.attachEvent(axy,axE);}else{LogError("Common.js: Unknown browser event model.");return false;}}catch(e){LogError("Common:js The object specified does not support the eventType, "+axy);return false;}return true;};function detachObjectEvent(axG,axy,axE){try{if(typeof(axG.removeEventListener)!=="undefined"){axG.removeEventListener(axy,axE,false);}else if(typeof(axG.deatchEvent)!=="undefined"){axG.detachEvent(axy,axE);}else{LogError("Common:js Unknown browser event model.");return false;}}catch(e){LogError("Common:js The object specified does not support the eventType, "+axy);return false;}return true;};var axp=new Array();function attachDocumentEvent(axy,axE){if(typeof(axp[axy])==="undefined"){axp[axy]=new Array();}else{for(var i=0;i<axp[axy].length;++i){if(axp[axy][i]===axE){LogError("Common.js: The method is already registered as a document event");return false;}}}return attachObjectEvent(window.document,axy,axE);};function detachDocumentEvent(axy,axE){if(typeof(axp[axy])==="undefined"){LogError("Common.js: No event handlers defined for the eventType "+axy);return false;}else{for(var i=0;i<axp[axy].length;++i){if(axp[axy][i]===axE){return true;}}}return detachObjectEvent(window.document,axy,axE);};function GetScrollTop(){if(typeof(document.documentElement)!=="undefined")return document.documentElement.scrollTop+document.body.scrollTop;return document.body.scrollTop;};function GetScrollLeft(){if(typeof(document.documentElement)!=="undefined")return document.documentElement.scrollLeft+document.body.scrollLeft;return document.body.scrollLeft;};var axaxh=new axb();var axn;var axm=0;var axl=1;var axk=2;var axj=3;var axi=4;function axa(axM,axu){this.axW=axM;this.axu=axu;};function axb(){this.axt=new Array();this.axH=0;this.axo=function(axN){for(i=0;i<this.axt.length;++i){if(this.axt[i]==null){this.axt[i]=axN;return;}}this.axt.push(axN);if(axN!==null){this.axH+=1;}};this.axq=function(){this.axH=this.axH<=0?0:this.axH-1;};this.axs=function(axB){this.axt[i]=null;};};function axc(){var axW;if(window.XMLHttpRequest){axW=new XMLHttpRequest();if(axW.overrideMimeType)axW.overrideMimeType('text/xml');}else if(window.ActiveXObject){try{axW=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){axW=new ActiveXObject("Microsoft.XMLHTTP");}}return axW;};function axf(){for(i=0;i<axaxh.axt.length;++i){axn=axaxh.axt[i];if(axn!=null&&axn.axW.readyState==axi){axaxh.axq();axaxh.axs(i);if(axn.axW.status==200){if(axn.axW.responseXML.hasChildNodes()){LogResponse(axn.axW.responseXML);axn.axu(axn.axW.responseXML);}else{LogResponse(axn.axW.responseText);axn.axu(axn.axW.responseText);}}else{LogError("HTTP Error: "+axn.axW.status+", "+axn.axW.statusText);}}}};function axe(){for(i=0;i<axaxh.axt.length;++i){axn=axaxh.axt[i];if(axn!=null&&axn.axW.readyState==axi){axaxh.axq();axaxh.axs(i);if(axn.axW.status==200){if(axn.axW.responseText.indexOf('<html>')!==-1){if(window.opener!=null){window.opener.document.location.href=ApplicationPath+"/Errors/SessionTimeout.aspx";window.close();}else{document.location.href=ApplicationPath+"/Errors/SessionTimeout.aspx";}}else{LogResponse(axn.axW.responseText);}axQ=JSON.parse(axn.axW.responseText);if(axQ===false){LogError("BAD_RESPONSE_OBJECT");axn.axu("BAD_RESPONSE_OBJECT");}else{if(typeof(axQ.compressedData)!=="undefined"){axQ=JSON.parse(eval(axQ.compressedData));}LogJSONResponse(axQ,"AJAX Response");if(typeof(axQ.ERROR)!=="undefined"){if(typeof(axQ.ERROR.length)!=="undefined"){for(var j=0;j<axQ.ERROR.length;++j){axd(axQ.ERROR[j]);}}else{axd(axQ.ERROR);}axn.axu("ERROR");}else{axn.axu(axQ);}}}else{LogError("HTTP Error: "+axn.axW.status+", "+axn.axW.statusText);}}}};function axd(axx){switch(axx.type){case "unauthenticated":LogError(axx.type+": User not authenticated to access "+axx.requestPage);break;case "unhandledMethod":LogError(axx.type+": "+axx.methodName+" is an unhandled method in "+axx.requestPage);break;case "malformedParam":LogError(axx.type+": "+axx.methodName+" expects the parameter "+axx.paramName+" of type "+axx.objectType+" which could not be parsed from the value "+axx.paramValue+" in request page "+axx.requestPage);break;case "missingParam":LogError(axx.type+": "+axx.methodName+" could not find a value for the parameter "+axx.paramName+" in the request page "+axx.requestPage);break;case "dotNetError":LogError(axx.type+": "+axx.message+", "+axx.stackTrace);break;case "custom":LogError(axx.type+": "+axx.methodName+" failed with message : "+axx.message);break;}};var axY=new Date();var taskPopupWindows=new Array();function axaa(evt){var axh=new Date();if(axh-axY>=(SessionTimeout*60000)){AJAX_startJSONQueryRequest(AJAXRequestPath+"User.aspx?method=EndSession",null,"GET",axZ);if(window.opener!=null){for(var i=0;i<taskPopupWindows.length;++i){if(typeof(taskPopupWindows[i])!=="undefined"&&taskPopupWindows[i]!==null&&typeof(taskPopupWindows[i]["close"])!="function"){taskPopupWindows[i].close();}}window.opener.document.location.href=ApplicationPath+"/Errors/SessionTimeout.aspx";window.close();}else{for(var i=0;i<taskPopupWindows.length;++i){if(typeof(taskPopupWindows[i])!=="undefined"&&taskPopupWindows[i]!==null&&typeof(taskPopupWindows[i]["close"])!="function"){taskPopupWindows[i].close();}}document.location.href=ApplicationPath+"/Errors/SessionTimeout.aspx";}}axY=axh;};attachDocumentEvent("onmouseup",axaa);function axZ(evt){};var JSON=function(){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},s={'boolean':function(x){return String(x);},number:function(x){return isFinite(x)?String(x):'null';},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}c=b.charCodeAt();return '\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);});}return '"'+x+'"';},object:function(x){if(x){var a=[],b,f,i,l,v;if(x instanceof Array){a[0]='[';l=x.length;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){if(b){a[a.length]=',';}a[a.length]=v;b=true;}}}a[a.length]=']';}else if(typeof x.hasOwnProperty==='function'){a[0]='{';for(i in x){if(x.hasOwnProperty(i)){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){if(b){a[a.length]=',';}a.push(s.string(i),':',v);b=true;}}}}a[a.length]='}';}else{return;}return a.join('');}return 'null';}};return{copyright:'(c)2005 JSON.org',license:'http://www.JSON.org/license.html',stringify:function(v){var f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){return v;}}return null;},parse:function(text){try{return!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g,'')))&&eval('('+text+')');}catch(e){return false;}}};}();
