﻿window.onerror=FG;function FG(message,url,line){try{var J="<b>An error has occurred.</b><br/>Line: {0}<br/>Error: {1}".format(line,message);P.ShowMessageBox(J,cW.Stop,cV.OK,function(popupWindowId,params){return;},"title:BI Companion; width:350; height:250; autoHeight:true; zIndex:11100; resize:all;");}catch(e){}return true;};var Dj="",Dw="",appName="";bM="",appVersion="";var iy="",sd="",gG="";var Fz=new aE();Fz.btnCallback=null;var kp=true,ye=true,eC="",qf=new Array(),fl="",ea="",nz="",mZ="",nJ="",oA="";var ayZ=false;var gk="",qg="",gY="",CV="",ok="",mX="";var oc="DMOptions.dmo";var eI=null;var pk="",uM="";var O=new nt();var DZ=String.fromCharCode(64),ra=[];var oU=false,rb=0,DemoModeMaxXmlaRequests=0;var rq="";var ws=true;var wy=true;var vZ=1,zQ= -1,wd=window.location.protocol+"//"+window.location.host.replace(/(\w*):?(\w*)/gi,'$1');var ww=true;var wt=ws|ww;var rh="";var aec=null;var pE=false,eD=3,eG=new Array(0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0,3.0,4.0);var sM=true,vJ="3",vQ=null,nS='<div>'+'<img src="../App_Share/Images/EntSoftSol/dmSplash.gif" width="650" height="450" border="0" usemap="#Map" alt="" />'+'<map id="Map">'+'<area id="Logo" shape="rect" coords="36,33,351,80" target="_blank" href="http://www.entsoftsol.com/" alt="" />'+'<area id="Web" shape="rect" coords="393,34,497,46" target="_blank" href="http://www.entsoftsol.com/" alt="" />'+'<area id="Email" shape="rect" coords="392,77,495,90" target="_blank" href="http://www.entsoftsol.com/ContactUs/tabid/108/Default.aspx" alt="" />'+'<area id="DMCompanion" shape="rect" coords="57,341,367,408" target="_blank" href="http://www.entsoftsol.com/Products/BISolutions/CompanionforDataMining/ProductOverview/tabid/69/Default.aspx" alt="" />'+'<area id="Close" shape="rect" coords="598,35,614,52" onclick="wu();" style="cursor:pointer;" alt="" />'+'<area id="Close" shape="rect" coords="0,0,650,450" onclick="wu();" style="cursor:pointer;" alt="" />'+'</map>'+'</div>',gX=null;function Wq(){return bM;};function WS(){return oU;};function Gm(evnt){var F=document.domain.split(".");if(F.length>2&& !(F.length==4&&isNaN(parseInt(F[3]))==false))document.domain=F[F.length-2]+"."+F[F.length-1];window.IsMainWindow=true;uM=pk;if((eg.browser!="IE")||(parseInt(eg.version)<6)){aE.Show(false);var J=escape("<b>This application requires Microsoft Internet Explorer 6.0 or above.</b>");P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+J+"&icon=warning","",function(popupWindowId,params){},"title:BI Companion; hasCloseBtn:false; width:350; height:150; zIndex:11100;");try{document.body.removeChild(document.forms["form1"]);}catch(e){}return;}if(tblToolbar.rows.length>0){var qv="";for(var i=0;i<tblToolbar.rows[0].cells.length;i++){var gz=tblToolbar.rows[0].cells[i];var GX=(gz.getAttribute("button")!=null);var FJ=(gz.getAttribute("separator")!=null);if(GX&&(gz.style.display!="none"))qv="button";else if(FJ){gz.style.display=(qv=="button")?"block":"none";if(gz.style.display!="none")qv="separator";}}tblToolbar.rows[0].style.display="";}if(!rJ){aE.Show(false);try{document.body.removeChild(document.forms["form1"]);}catch(e){}if(oK){var cS=escape("BI Suite Setup (<span style='font-size:7pt;'>v.{0}</span>)".format(appVersion));P.ShowModal("../App_Share/Popups/Setup.aspx","",function(popupWindowId,params){return;},"title:"+cS+"; width:650; height:400; autoHeight:true; resize:left right;  hasCloseBtn:no;");}else{var J=escape("<b>This application has not been configured for the first time.<br/>Please contact your system administrator.</b>");P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+J+"&icon=warning","",function(popupWindowId,params){},"title:DM Companion; hasCloseBtn:false; width:350; height:150; zIndex:11100;");}return;}var V=vp("../License.xml");if(oK){T("tbbSetup").style.display="";}for(var i=0;i<=3;i++)ra[i]=DZ+i;if(oU)T("spnAppName").innerHTML+=pf(nU("_3"),appName,256);if(rb>0)setInterval(yT,ir.MinToMs(rb));if(ws&&(vZ>0))setInterval(wF,ir.MinToMs(vZ));gi.eI=vp(eval("String.fromCharCode({0})".format(EC.join(","))));gi.Ey();lK(form1.selXmlaServers,qf);jY(form1.selXmlaServers,eC);var aN=nC(false);if(aN.bValue)pk=aN.sValue;O.LoadFromXml(pk,false);O.Apply();jm();aE.Show(false);};function Gn(evnt){jm();};function jm(){Hn();yA();nZ();};function Hn(){var bJ=T("divVSplitter");var iD=T("divLeftPanel");var qx=T("divTopPanel");if(bJ.offsetLeft>0){iD.style.display="";iD.style.top=(qx.clientHeight-1)+"px";iD.style.width=(bJ.offsetLeft)+"px";iD.style.height=(document.body.clientHeight-iD.offsetTop)+"px";var DR=100;var pO=bJ.offsetLeft-30;if(pO<DR)pO=DR;T("selXmlaServers").style.width=pO;T("selDatabases").style.width=pO;T("selMiningStructures").style.width=pO;T("selMiningModels").style.width=pO;T("selPredictions").style.width=pO;}else{iD.style.display="none";}};function yA(){var bJ=T("divVSplitter");var iD=T("divLeftPanel");var qx=T("divTopPanel");bJ.style.left=((iD.style.display=="none")?0:iD.offsetWidth)+"px";bJ.style.top=(qx.offsetHeight-1)+"px";bJ.style.height=(document.body.clientHeight-bJ.offsetTop)+"px";};function nZ(){var left,top,width,height;var bJ=T("divVSplitter");var qx=T("divTopPanel");var xa=T("divRightPanel");xa.style.left=(bJ.offsetLeft+bJ.offsetWidth)+"px";xa.style.top=(qx.offsetHeight-1)+"px";xa.style.width=(document.body.clientWidth-(bJ.offsetLeft+bJ.offsetWidth))+"px";xa.style.height=(document.body.clientHeight-xa.offsetTop)+"px";var xV=T("divTabPanel");xV.style.left="5px";xV.style.top="5px";xV.style.width=parseInt(xa.style.width)-10;xV.style.height=parseInt(xa.style.height)-10;var PE=T("divTabPanel_header");PE.style.width=parseInt(xV.style.width);var Ap=T("divTabPanel_body");Ap.style.width=parseInt(xV.style.width);Ap.style.height=parseInt(xV.style.height)-(PE.offsetTop+PE.offsetHeight);if(dA.get_activeTabIndex()==0){divTabPanel1.style.width=parseInt(Ap.style.width)-20;divTabPanel1.style.height=parseInt(Ap.style.height)-20;}if(dA.get_activeTabIndex()==1){divTabPanel2Chart.style.width=parseInt(Ap.style.width)-15;divTabPanel2Chart.style.height=parseInt(Ap.style.height)-divTabPanel2Chart.offsetTop-15;var minChartWidth=300;var minChartHeight=300;var chartWidth=minChartWidth;var chartHeight=minChartHeight;if(divTabPanel2Chart.offsetWidth>minChartWidth)chartWidth=divTabPanel2Chart.offsetWidth;if(divTabPanel2Chart.offsetHeight>minChartHeight)chartHeight=divTabPanel2Chart.offsetHeight;if(GH!=chartWidth||Gi!=chartHeight){GH=chartWidth;Gi=chartHeight;Ab(false,GH,Gi);}}};function GE(evnt,splitterId,splitterMaskId,resizeFn){var evntClientX=evnt.clientX*(1/eG[eD]);var evntClientY=evnt.clientY*(1/eG[eD]);window.splitter=T(splitterId);window.splitterMask=T(splitterMaskId);window.splitterMask.style.display="";window.resizeSplitterFn=resizeFn;splitter.dragging=true;splitter.parentOffsetX=my(splitter.parentNode)+evntClientX-my(splitter);document.onmousemove=function(evnt){if(!evnt)evnt=window.event;GF(evnt)};document.onmouseup=function(evnt){if(!evnt)evnt=window.event;Gl(evnt)};document.body.ondrag=function(){return!splitter.dragging};document.body.onselectstart=function(){return!splitter.dragging};return false;};function GF(evnt){var evntClientX=evnt.clientX*(1/eG[eD]);var evntClientY=evnt.clientY*(1/eG[eD]);var rightSectionMinWidth=200;var bJ=window.splitter;x=evntClientX-bJ.parentOffsetX;if(x<=30)x=0;else if(x>=bJ.parentNode.offsetWidth-bJ.offsetWidth-rightSectionMinWidth)x=bJ.parentNode.offsetWidth-bJ.offsetWidth-rightSectionMinWidth;bJ.style.left=x+"px";return false;};function Gl(evnt){document.onmousemove=null;document.onmouseup=null;var bJ=window.splitter;var splitterMask=window.splitterMask;var resizeFn=window.resizeSplitterFn;bJ.style.left=(bJ.offsetLeft<=30)?"0px":bJ.offsetLeft+"px";bJ.dragging=false;window.ra_element=null;resizeFn();window.splitterMask.style.display="none";};function FF(splitterId,leftSectionId,resizeFn){var bJ=T(splitterId);var leftSection=T(leftSectionId);var isOpening=(bJ.offsetLeft==0);bJ.style.left=isOpening?parseInt(leftSection.style.width):0;bJ.style.left=(bJ.offsetLeft<=30)?"0px":bJ.offsetLeft+"px";resizeFn();};var EC=[46,46,47,76,105,99,101,110,115,101,46,120,109,108];var EI=[110,101,119,32,68,97,116,101,40,41,59];var EE=[118,100,116,49,46,103,101,116,89,101,97,114,40,41,59];var ED=[118,100,116,49,46,103,101,116,77,111,110,116,104,40,41,59];var Ep=[118,100,116,49,46,103,101,116,68,97,116,101,40,41,59];var Er=[104,116,116,112,58,47,47,108,111,99,97,108,104,111,115,116];var Ev=eval("String.fromCharCode({0})".format(Er.join(",")));function vF(jG,kn){if(!aA(jG))jG=10;if(!aA(kn))kn=20;return fU(jG+((kn-jG)*Math.random()),20);};var vY=vF();var gi={vV:"",ob:new Array(),DU:function(Fx){this.ob[this.ob.length]=Fx;},wq:function(lM){if(!wt)return true;if(wt){if(!isNaN(this.tK)&&(this.tK++ <vY))return true;this.tK=0;vY=vF();var wv=eval("String.fromCharCode({0})".format([114,111,111,116,47].join(",")));lM=lM.toLowerCase();var GC=appName.replace(" ","");for(var i=0;i<this.ob.length;i++){if(!wy)lM=Ev;var bV=pf(this.ob[i],lM,256);var V=ly(bV);if(!V||V.xml.isEmpty())continue;if(wy){var gQ=aL(V,wv+"ep","");if(!aA(gQ))continue;gQ=gQ.toLowerCase();if(gQ!=lM)continue;}var qa=V.selectSingleNode(wv+GC);if(!qa)continue;if(rU(qa,"a1").charCodeAt(0)!=116)continue;var ny=rU(qa,"a2");if(!aA(ny))continue;if(ny.length!=8)continue;if(ny.search(/[^0-9]/gi)>=0)continue;if(ny<gi.vV)continue;return true;}}return false;}};gi.eI=null;gi.Ey=function(){var rr=gi.eI.selectNodes(eval("String.fromCharCode({0})".format([114,111,111,116,47,108,105,99,101,110,115,101].join(","))));var Ei=eval("String.fromCharCode({0})".format([107,101,121].join(",")));for(var i=0;i<rr.length;i++)gi.DU(aL(rr[i],Ei));};gi.DE=function(){var vdt1=eval(eval("String.fromCharCode({0})".format(EI.join(","))));var ma=eval(eval("String.fromCharCode({0})".format(EE.join(","))));var jM=eval(eval("String.fromCharCode({0})".format(ED.join(","))))+1;if(jM<10)jM="0"+jM;var jW=eval(eval("String.fromCharCode({0})".format(Ep.join(","))));if(jW<10)jW="0"+jW;return "{0}{1}{2}".format(ma,jM,jW);};gi.vV=gi.DE();function atP(sender,e){nZ();};function aqO(){divTabPanel1.innerHTML='';};function Go(){divTabPanel2Top.innerHTML='';divTabPanel2Chart.innerHTML='';rM='';};function nU(FU){var ih="<GetResourceString xmlns='http://entsoftsol.com/'>"+"<resourceName>{0}</resourceName>".format(FU)+"</GetResourceString>";var ii=gI.XmlFormatString.format(ih);var aQ=hq();aQ.open("POST",sd+"Resources/Resource.asmx",false);aQ.setRequestHeader("SOAPAction","http://entsoftsol.com/GetResourceString");aQ.setRequestHeader("Content-Type","text/xml");aQ.setRequestHeader("Accept-Encoding","gzip, deflate");aQ.send(ii);var V=aQ.responseXML;var dJ=aL(V,"//GetResourceStringResult","");return dJ;};function yT(){aE.Show(false);if(rq.isEmpty())rq=nU(ra[1]);var dN="<div style='padding-top:10px; font-size: 9pt;	font-weight: bold;'>{0}</div>{1}".format(pf(rq,appName,256),nS);if(gX==null){gX=P.ShowModal("",dN,function(popupWindowId,params){gX=null;return;},"width:650; height:480; hasTitleBar:no; zIndex:12000;"+(rT>0?" autoHide:{0};".format(Kb(rT)):""));}};function wF(qF){if(!aA(qF))qF=wd;var es=gi.wq(qF);if(!es)sK();return es;};function qP(gQ){if(!aA(gQ))gQ=eC;var es= !ww||gi.wq(gQ);if(!es)sK();return es;};function sK(){tu();if(rh.isEmpty())rh=nU(ra[2]);var dN="<div style='padding-top:10px; font-size: 9pt;	font-weight: bold;'>{0}</div>{1}".format(pf(rh,appName,256),nS);if(gX==null){gX=P.ShowModal("",dN,function(popupWindowId,params){gX=null;aE.Show(false);return;},"width:650; height:480; hasTitleBar:no; zIndex:12000;");}aE.Show(false);};function tu(){aqO();Go();};function hz(o){if(o.tagName.toLowerCase()=="img")o=(eg.browser=="IE"?o.parentElement:o.parentNode);if(o.tagName.toLowerCase()=="td"&&o.className=="tbbutton")return o;return null;};function kq(evnt,img){if(!evnt)evnt=window.event;var o=hz(evnt.srcElement);if(o==null)return;if(eU(o)&& !ta(o))o.style.backgroundImage=img;};function rz(evnt){kq(evnt,'url(../App_Share/Themes/{0}/Images/hover.png)'.format(bT));};function rB(evnt){if(!evnt)evnt=window.event;var o=hz(evnt.srcElement);if(o==null)return;var ej="none";if(ib(o))ej='url(../App_Share/Themes/{0}/Images/down.gif)'.format(bT);o.style.backgroundImage=ej;};function ry(evnt){kq(evnt,'url(../App_Share/Themes/{0}/Images/down.gif)'.format(bT));};function rO(evnt){kq(evnt,'url(../App_Share/Themes/{0}/Images/hover.png)'.format(bT));};function eU(item){return item.getAttribute('enabled')=="True";};function ib(item){return item.getAttribute('down')=="True";};function ta(item){return item.getAttribute('hidden')=="True";};function Ci(item,enabled){o=hz(item);if(o==null)return;o.enabled=enabled?"True":"False";var oImg=o.children[0];if(oImg.filters.length==0)oImg.style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=0)";oImg.filters[0].grayscale=enabled?'0':'1';};function pJ(item,down){o=hz(item);if(o==null)return;o.setAttribute("down",down?'True':'False');var gn="none";if(ib(o))gn='url(../App_Share/Themes/{0}/Images/down.gif)'.format(bT);o.style.backgroundImage=gn;};function Eu(item){o=hz(item);if(o==null)return;o.setAttribute("down",ib(o)?"False":"True");var gn="none";if(ib(o))gn='url(../App_Share/Themes/{0}/Images/down.gif)'.format(bT);o.style.backgroundImage=gn;};function Cj(td,evnt){if(!eU(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;var dN="<div style='font-size: 7pt; text-align:right; cursor:pointer; ' onclick='Fl()'>version:&nbsp;{0}</div>{1}".format(appVersion,nS);gX=P.ShowModal("",dN,function(popupWindowId,params){try{T("txtMDXQuery").focus();}catch(e){}},"width:650; height:450; hasTitleBar:no; zIndex:12000;");};function wQ(td,evnt){if(!eU(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;var cS=escape("BI Suite Setup (<span style='font-size:7pt;'>v.{0}</span>)".format(appVersion));P.ShowModal("../App_Share/Popups/Setup.aspx?mP=dmc","",function(popupWindowId,params){return;},"title:"+cS+"; width:650; height:400; autoHeight:true; resize:left right; ");};function Jl(td,evnt){if(!eU(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;yK('toolbar');};function yK(Ng){aE.Show(true);P.ShowModal("Popups/Options.htm?mode="+Ng,"",function(popupWindowId,params){return;},"title:Options; width:450; height:610; ");};function wA(td,evnt){if(!eU(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;window.location=bM;};function Fl(){var uW=window.open(bM+"License.xml","License","scrollbars=yes,menubar=no,resizable=yes,toolbar=no,location=no,status=no");try{if(uW)uW.focus();}catch(e){}};function El(td,evnt){if(!eU(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;window.open('../rscompanion/rscompanion.aspx','_blank');};function wu(){if(gX){dc(gX.id);gX=null;}};function HR(lj){switch(lj.id){case "selXmlaServers":eC=er(lj);vg();break;case "selDatabases":fl=er(lj);LB();break;case "selMiningStructures":nz=er(lj);Ig();break;case "selMiningModels":mZ=er(lj);Sz();break;}};function nt(){this.AppVersion="";this.AutoConnect=true;this.XmlaServer="";this.DataServer="";this.Catalog="";this.MiningStructure="";this.MiningModel="";this.PredictionColumn="";this.Apply=tN;this.LoadFromXml=Cy;this.SaveToXml=DI;};function Cy(xml,isFromReportFile){var V=(typeof(xml)=='string')?iz(xml):xml;if(!aA(isFromReportFile))isFromReportFile=false;if(!isFromReportFile){this.AutoConnect=eB(V,"//DataSource/AutoConnect",true);this.XmlaServer=aL(V,"//DataSource/XmlaServer","");this.DataServer=aL(V,"//DataSource/DataServer","");this.Catalog=aL(V,"//DataSource/Catalog","");this.MiningStructure=aL(V,"//DataSource/MiningStructure","");this.MiningModel=aL(V,"//DataSource/MiningModel","");this.PredictionColumn=aL(V,"//DataSource/PredictionColumn","");}return true;};function DI(isForReportFile){if(!aA(isForReportFile))isForReportFile=false;var sTmp="";sTmp+=bB("AppVersion",appVersion);var sTmpDataSource=bB("AutoConnect",this.AutoConnect);sTmpDataSource+=eq("XmlaServer",this.XmlaServer);sTmpDataSource+=eq("DataServer",this.DataServer);sTmpDataSource+=eq("Catalog",this.Catalog);sTmpDataSource+=eq("MiningStructure",this.MiningStructure);sTmpDataSource+=eq("MiningModel",this.MiningModel);sTmpDataSource+=eq("PredictionColumn",this.PredictionColumn);sTmp+=bB("DataSource",sTmpDataSource);sTmp=bB("Options",sTmp);return sTmp;};function tN(){kp=O.AutoConnect;var yq=false;if(kp){if(eC!=O.XmlaServer)yq=true;eC=O.XmlaServer;if(fl!=O.DataServer)yq=true;fl=O.DataServer;if(ea!=O.Catalog)yq=true;ea=O.Catalog;if(nz!=O.MiningStructure)yq=true;nz=O.MiningStructure;if(mZ!=O.MiningModel)yq=true;mZ=O.MiningModel;if(nJ!=O.PredictionColumn)yq=true;nJ=O.PredictionColumn;}var aep=T("selXmlaServers");jY(aep,eC);if(yq)vg();};function nC(gx){if(!aA(gx))gx=true;var aN=new jr();if(gk=="ssrs")aN=Dt();else if(gk=="server")aN=Dn();else{aN.bValue=false;aN.sValue="Unsupported Data Storage Type: "+gk;}if(gx){if(!aN.bValue){var J=aN.sValue;if(escape(J).length<1800)P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape(J)+"&icon=stop&buttons=ok","",function(popupWindowId,params){return;},"title:Options; width:450; height:100; autoHeight:true; zIndex:11100;");else P.ShowMessageBox(J,cW.Stop,cV.OK,function(popupWindowId,params){},"title:Options; width:550; height:250; autoHeight:true; zIndex:11100; resize:all;");return aN;}else{var J="Options have been loaded.";P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape(J)+"&icon=success&buttons=ok","",function(popupWindowId,params){return;},"title:Options; width:250; height:100; autoHeight:true; autoHide:0; zIndex:11100;");return aN;}}return aN;};function oY(hA,gx){if(!aA(gx))gx=true;var aN=new jr();if(gk=="ssrs")aN=FN(hA);else if(gk=="server")aN=Gh(hA);else{aN.bValue=false;aN.sValue="Unsupported Data Storage Type: "+gk;}if(gx){if(!aN.bValue){var J=aN.sValue;if(escape(J).length<1800)P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape(J)+"&icon=stop&buttons=ok","",function(popupWindowId,params){return;},"title:Options; width:450; height:100; autoHeight:true; zIndex:11100;");else P.ShowMessageBox(J,cW.Stop,cV.OK,function(popupWindowId,params){},"title:Options; width:550; height:250; autoHeight:true; zIndex:11100; resize:all;");return aN;}else{var J="Options have been saved.";P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape(J)+"&icon=success&buttons=ok","",function(popupWindowId,params){return;},"title:Options; width:250; height:100; autoHeight:true; autoHide:0; zIndex:11100;");return aN;}}return aN;};function Dn(){var aN=new jr();var ih="<LoadOptions xmlns='http://entsoftsol.com/'><fileName>{0}</fileName></LoadOptions>".format(oc);var ii=gI.XmlFormatString.format(ih);var aQ=hq();aQ.open("POST",bM+"App_Share/Classes/Options.asmx",false);aQ.setRequestHeader("SOAPAction","http://entsoftsol.com/LoadOptions");aQ.setRequestHeader("Content-Type","text/xml");aQ.setRequestHeader("Accept-Encoding","gzip, deflate");aQ.send(ii);var V=aQ.responseXML;aN=hc(V);if(aN.bValue){var jF=aL(V,"//LoadOptionsResult");V=ly(jF);aN=hc(V);if(aN.bValue)aN.sValue=jF;}return aN;};function Gh(hA){var aN=new jr();var ih="<SaveOptions xmlns='http://entsoftsol.com/'><fileName>{0}</fileName><Data>{1}</Data></SaveOptions>".format(oc,hA);var ii=gI.XmlFormatString.format(ih);var aQ=hq();aQ.open("POST",bM+"App_Share/Classes/Options.asmx",false);aQ.setRequestHeader("SOAPAction","http://entsoftsol.com/SaveOptions");aQ.setRequestHeader("Content-Type","text/xml");aQ.setRequestHeader("Accept-Encoding","gzip, deflate");aQ.send(ii);var V=aQ.responseXML;aN=hc(V);if(aN.bValue){aN.sValue=aL(V,"//SaveOptionsResult");}return aN;};function Dt(){var qt="{0}/{1}".format(mX,oc);qt=qt.replace(/\/\//g,"/");var V=LP(gY,qt);var aN=hc(V);if(aN.bValue)aN.sValue=GZ(V.selectSingleNode("//Contents").text);return aN;};function FN(hA){var V=RC(gY,oc,Dv(hA),mX,"text/xml","true","True","");var aN=hc(V);return aN;};function LP(cT,ks){var dX='<?xml version=\'1.0\' encoding=\'utf-8\'?><SOAP-ENV:Envelope xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><GetResourceContents xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices"><Resource>'+ks+'</Resource></GetResourceContents></SOAP-ENV:Body></SOAP-ENV:Envelope>';var fp="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetResourceContents";return FP(cT,fp,dX);};function RC(cT,ks,gT,gH,pI,Dr,yL,xe){var dX='<?xml version=\'1.0\' encoding=\'utf-8\'?><SOAP-ENV:Envelope xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><CreateResource xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices"><Resource>'+ks+'</Resource><Parent>'+gH+'</Parent><Overwrite>'+Dr+'</Overwrite><Contents>'+gT+'</Contents><MimeType>'+pI+'</MimeType><Properties><Property xsi:type="tns:Property"><Name xsi:type="xsd:string">Description</Name><Value xsi:type="xsd:string">'+xe+'</Value></Property><Property xsi:type="tns:Property"><Name xsi:type="xsd:string">Hidden</Name><Value xsi:type="xsd:string">'+yL+'</Value></Property></Properties></CreateResource></SOAP-ENV:Body></SOAP-ENV:Envelope>';var fp="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateResource";return FP(cT,fp,dX);};function FP(cT,fp,dX){var aQ=hq();try{aQ.open("POST",cT,false);}catch(e){var V=gI.SetError(e.number,e.message);return V;}aQ.setRequestHeader("SOAPAction",fp);aQ.setRequestHeader("Content-Type","text/xml");aQ.setRequestHeader("Accept-Encoding","gzip, deflate");try{aQ.send(dX);}catch(e){this.ErrorMessage=e.message;if(aQ.responseXML.xml=="")return iz("<faultstring>"+String.removeAllNamespaces(e.message)+"</faultstring>");else return aQ.responseXML;}if(aQ==null||aQ.readyState!=4)return;var V=aQ.responseXML;return V;};function hc(V){var aN=new jr();if(V==null){aN.bValue=false;aN.nValue= -1;aN.sValue="Unknown error";return aN;}else if(V.parseError.errorCode!=0){aE.Show(false);aN.bValue=false;aN.nValue= -2;var cQ=new eP();cQ.aC("<table border='0'>");cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>ErrorCode:</td><td>{0}</td></tr>".format(V.parseError.errorCode));if(aA(V.parseError.line))cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>Line:</td><td>{0}</td></tr>".format(V.parseError.line));if(aA(V.parseError.linepos))cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>LinePos:</td><td>{0}</td></tr>".format(V.parseError.linepos));if(aA(V.parseError.url)&&V.parseError.url.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>URL:</td><td>{0}</td></tr>".format(V.parseError.url));if(aA(V.parseError.reason)&&V.parseError.reason.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>Reason:</td><td>{0}</td></tr>".format(V.parseError.reason));cQ.aC("</table>");aN.sValue=cQ.toString();return aN;}else if(V.xml.isEmpty()){aE.Show(false);aN.bValue=false;aN.nValue= -3;aN.sValue="XML is Empty";return aN;}else if(V.selectSingleNode("//faultstring")){aE.Show(false);aN.bValue=false;aN.nValue= -4;var wP=aL(V,"//faultcode");var wS=aL(V,"//faultstring");var vr=aL(V,"//detail/ErrorCode");var vx=aL(V,"//detail/HttpStatus");var vS=aL(V,"//detail/Message");var cQ=new eP();cQ.aC("<table border='0'>");if(wP.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>FaultCode:</td><td>{0}</td></tr>".format(wP));if(wS.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>FaultString:</td><td>{0}</td></tr>".format(wS));if(vr.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>ErrorCode:</td><td>{0}</td></tr>".format(vr));if(vx.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>HttpStatus:</td><td>{0}</td></tr>".format(vx));if(vS.isNotEmpty())cQ.aC("<tr><td style='text-align:right;vertical-align:top;'>DetailMessage:</td><td>{0}</td></tr>".format(vS));cQ.aC("</table>");aN.sValue=cQ.toString();return aN;}return aN;};function zE(mJ,rn){if(!aA(rn))rn=true;try{if(mJ.isEmpty())return;var jw=mJ.split('/');if(jw[0].isEmpty())jw.splice(0,1);if(mJ.isEmpty())return;var ip=jw[jw.length-1];jw.splice(jw.length-1,1);var hG=jw.join("/");if(!hG.startsWith("/"))hG="/"+hG;if(hG.endsWith("/"))hG=hG.substr(0,hG.length-1);var aU=new cI();var V=aU.FindItems(gY,ip,hG,"Folder");var cU=false;try{var L=V.selectNodes("//Items/CatalogItem/Path");for(var i=0;i<L.length;i++){cU=(cU||L[i].text.endsWith(mJ));if(cU){mJ=L[i].text;break;}}}catch(e){}if(!cU&&rn){var V=aU.CreateFolder(gY,ip,hG,"False");}}catch(e){}}
