﻿window.onerror=EC;function EC(message,url,line){try{var J="<b>An error has occurred.</b><br/>Line: {0}<br/>Error: {1}".format(line,message);O.ShowMessageBox(J,bz.Stop,bA.OK,function(popupWindowId,params){return;},"title:BI Companion; width:350; height:250; autoHeight:true; zIndex:11100; resize:all;");}catch(e){}return true;};var AY="",DE="",appName="";aO="",appVersion="";var gW="",qD="",fq="";var Do=new ad();Do.btnCallback=null;var iB=true,wk=true,dc="",pR=new Array(),dP="",cE="",me="",lx="",mo="",mZ="";var aAx=false;var eP="",oQ="",fJ="",AT="",mG="",ls="";var lI="DMOptions.dmo";var dq=null;var nS="",uu="";var P=new lY();var AV=String.fromCharCode(64),oR=[];var nY=false,oY=0,DemoModeMaxXmlaRequests=0;var oS="";var uh=true;var tG=true;var Dv=1,yD= -1,tj=window.location.protocol+"//"+window.location.host.replace(/(\w*):?(\w*)/gi,'$1');var ur=true;var tR=uh|ur;var ps="";var ZZ=null;var nt=false,de=3,dg=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 qF=true,tC="3",tN=null,my='<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="vm();" style="cursor:pointer;" alt="" />'+'<area id="Close" shape="rect" coords="0,0,650,450" onclick="vm();" style="cursor:pointer;" alt="" />'+'</map>'+'</div>',fH=null;function Vv(){return aO;};function XP(){return nY;};function Fm(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;uu=nS;if((cN.browser!="IE")||(parseInt(cN.version)<6)){ad.Show(false);var J=escape("<b>This application requires Microsoft Internet Explorer 6.0 or above.</b>");O.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 pk="";for(var i=0;i<tblToolbar.rows[0].cells.length;i++){var fe=tblToolbar.rows[0].cells[i];var DO=(fe.getAttribute("button")!=null);var Eb=(fe.getAttribute("separator")!=null);if(DO&&(fe.style.display!="none"))pk="button";else if(Eb){fe.style.display=(pk=="button")?"block":"none";if(fe.style.display!="none")pk="separator";}}tblToolbar.rows[0].style.display="";}if(!qE){ad.Show(false);try{document.body.removeChild(document.forms["form1"]);}catch(e){}if(mC){var bE=escape("BI Suite Setup (<span style='font-size:7pt;'>v.{0}</span>)".format(appVersion));O.ShowModal("../App_Share/Popups/Setup.aspx","",function(popupWindowId,params){return;},"title:"+bE+"; 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>");O.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=sY("../License.xml");if(mC){T("tbbSetup").style.display="";}for(var i=0;i<=3;i++)oR[i]=AV+i;if(nY)T("spnAppName").innerHTML+=nN(ml("_3"),appName,256);if(oY>0)setInterval(xf,gV.MinToMs(oY));if(uh)setInterval(uX,gV.MinToMs(Dv));eV.dq=sY(eval("String.fromCharCode({0})".format(AF.join(","))));eV.AR();kn(form1.selXmlaServers,pR);jg(form1.selXmlaServers,dc);var an=lE(false);if(an.bValue)nS=an.sValue;P.LoadFromXml(nS,false);P.Apply();hD();ad.Show(false);};function Fr(evnt){hD();};function hD(){GF();wI();lN();};function GF(){var aM=T("divVSplitter");var he=T("divLeftPanel");var oU=T("divTopPanel");if(aM.offsetLeft>0){he.style.display="";he.style.top=(oU.clientHeight-1)+"px";he.style.width=(aM.offsetLeft)+"px";he.style.height=(document.body.clientHeight-he.offsetTop)+"px";var De=100;var oh=aM.offsetLeft-30;if(oh<De)oh=De;T("selXmlaServers").style.width=oh;T("selDatabases").style.width=oh;T("selMiningStructures").style.width=oh;T("selMiningModels").style.width=oh;T("selPredictions").style.width=oh;}else{he.style.display="none";}};function wI(){var aM=T("divVSplitter");var he=T("divLeftPanel");var oU=T("divTopPanel");aM.style.left=((he.style.display=="none")?0:he.offsetWidth)+"px";aM.style.top=(oU.offsetHeight-1)+"px";aM.style.height=(document.body.clientHeight-aM.offsetTop)+"px";};function lN(){var left,top,width,height;var aM=T("divVSplitter");var oU=T("divTopPanel");var wp=T("divRightPanel");wp.style.left=(aM.offsetLeft+aM.offsetWidth)+"px";wp.style.top=(oU.offsetHeight-1)+"px";wp.style.width=(document.body.clientWidth-(aM.offsetLeft+aM.offsetWidth))+"px";wp.style.height=(document.body.clientHeight-wp.offsetTop)+"px";var xi=T("divTabPanel");xi.style.left="5px";xi.style.top="5px";xi.style.width=parseInt(wp.style.width)-10;xi.style.height=parseInt(wp.style.height)-10;var QG=T("divTabPanel_header");QG.style.width=parseInt(xi.style.width);var zP=T("divTabPanel_body");zP.style.width=parseInt(xi.style.width);zP.style.height=parseInt(xi.style.height)-(QG.offsetTop+QG.offsetHeight);if(bT.get_activeTabIndex()==0){divTabPanel1.style.width=parseInt(zP.style.width)-20;divTabPanel1.style.height=parseInt(zP.style.height)-20;}if(bT.get_activeTabIndex()==1){divTabPanel2Chart.style.width=parseInt(zP.style.width)-15;divTabPanel2Chart.style.height=parseInt(zP.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(Et!=chartWidth||Er!=chartHeight){Et=chartWidth;Er=chartHeight;yb(false,Et,Er);}}};function EQ(evnt,splitterId,splitterMaskId,resizeFn){var evntClientX=evnt.clientX*(1/dg[de]);var evntClientY=evnt.clientY*(1/dg[de]);window.splitter=T(splitterId);window.splitterMask=T(splitterMaskId);window.splitterMask.style.display="";window.resizeSplitterFn=resizeFn;splitter.dragging=true;splitter.parentOffsetX=kO(splitter.parentNode)+evntClientX-kO(splitter);document.onmousemove=function(evnt){if(!evnt)evnt=window.event;EP(evnt)};document.onmouseup=function(evnt){if(!evnt)evnt=window.event;EF(evnt)};document.body.ondrag=function(){return!splitter.dragging};document.body.onselectstart=function(){return!splitter.dragging};return false;};function EP(evnt){var evntClientX=evnt.clientX*(1/dg[de]);var evntClientY=evnt.clientY*(1/dg[de]);var rightSectionMinWidth=200;var aM=window.splitter;x=evntClientX-aM.parentOffsetX;if(x<=30)x=0;else if(x>=aM.parentNode.offsetWidth-aM.offsetWidth-rightSectionMinWidth)x=aM.parentNode.offsetWidth-aM.offsetWidth-rightSectionMinWidth;aM.style.left=x+"px";return false;};function EF(evnt){document.onmousemove=null;document.onmouseup=null;var aM=window.splitter;var splitterMask=window.splitterMask;var resizeFn=window.resizeSplitterFn;aM.style.left=(aM.offsetLeft<=30)?"0px":aM.offsetLeft+"px";aM.dragging=false;window.ra_element=null;resizeFn();window.splitterMask.style.display="none";};function Ff(splitterId,leftSectionId,resizeFn){var aM=T(splitterId);var leftSection=T(leftSectionId);var isOpening=(aM.offsetLeft==0);aM.style.left=isOpening?parseInt(leftSection.style.width):0;aM.style.left=(aM.offsetLeft<=30)?"0px":aM.offsetLeft+"px";resizeFn();};var AF=[46,46,47,76,105,99,101,110,115,101,46,120,109,108];var AL=[110,101,119,32,68,97,116,101,40,41,59];var AH=[118,100,116,49,46,103,101,116,89,101,97,114,40,41,59];var Bc=[118,100,116,49,46,103,101,116,77,111,110,116,104,40,41,59];var AU=[118,100,116,49,46,103,101,116,68,97,116,101,40,41,59];var Bb=[104,116,116,112,58,47,47,108,111,99,97,108,104,111,115,116];var Ba=eval("String.fromCharCode({0})".format(Bb.join(",")));function tV(ia,jd){if(!aa(ia))ia=10;if(!aa(jd))jd=20;return eD(ia+((jd-ia)*Math.random()),20);};var tl=tV();var eV={uo:"",lZ:new Array(),AZ:function(DX){this.lZ[this.lZ.length]=DX;},sZ:function(kr){if(!tR)return true;if(tR){if(this.AB++ <tl)return true;this.AB=0;tl=tV();var tM=eval("String.fromCharCode({0})".format([114,111,111,116,47].join(",")));kr=kr.toLowerCase();var DA=appName.replace(" ","");for(var i=0;i<this.lZ.length;i++){if(!tG)kr=Ba;var aX=nN(this.lZ[i],kr,256);var V=kk(aX);if(!V||V.xml.isEmpty())continue;if(tG){var fB=al(V,tM+"ep","");if(!aa(fB))continue;fB=fB.toLowerCase();if(fB!=kr)continue;}var pO=V.selectSingleNode(tM+DA);if(!pO)continue;if(qS(pO,"a1").charCodeAt(0)!=116)continue;var lW=qS(pO,"a2");if(!aa(lW))continue;if(lW.length!=8)continue;if(lW.search(/[^0-9]/gi)>=0)continue;if(lW<eV.uo)continue;return true;}}return false;}};eV.dq=null;eV.AR=function(){var pN=eV.dq.selectNodes(eval("String.fromCharCode({0})".format([114,111,111,116,47,108,105,99,101,110,115,101].join(","))));var Ec=eval("String.fromCharCode({0})".format([107,101,121].join(",")));for(var i=0;i<pN.length;i++)eV.AZ(al(pN[i],Ec));};eV.Bh=function(){var vdt1=eval(eval("String.fromCharCode({0})".format(AL.join(","))));var kJ=eval(eval("String.fromCharCode({0})".format(AH.join(","))));var iv=eval(eval("String.fromCharCode({0})".format(Bc.join(","))))+1;if(iv<10)iv="0"+iv;var iJ=eval(eval("String.fromCharCode({0})".format(AU.join(","))));if(iJ<10)iJ="0"+iJ;return "{0}{1}{2}".format(kJ,iv,iJ);};eV.uo=eV.Bh();function agp(sender,e){lN();};function adQ(){divTabPanel1.innerHTML='';};function EI(){divTabPanel2Top.innerHTML='';divTabPanel2Chart.innerHTML='';qG='';};function ml(Bz){var gL="<GetResourceString xmlns='http://entsoftsol.com/'>"+"<resourceName>{0}</resourceName>".format(Bz)+"</GetResourceString>";var gO=fo.XmlFormatString.format(gL);var aq=fX();aq.open("POST",qD+"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(gO);var V=aq.responseXML;var cd=al(V,"//GetResourceStringResult","");return cd;};function xf(){ad.Show(false);if(oS.isEmpty())oS=ml(oR[1]);var cr="<div style='padding-top:10px; font-size: 9pt;	font-weight: bold;'>{0}</div>{1}".format(nN(oS,appName,256),my);if(fH==null){fH=O.ShowModal("",cr,function(popupWindowId,params){fH=null;return;},"width:650; height:480; hasTitleBar:no; zIndex:12000;"+(qb>0?" autoHide:{0};".format(Jj(qb)):""));}};function uX(pQ){if(!aa(pQ))pQ=tj;var cS=eV.sZ(pQ);if(!cS)qr();return cS;};function pP(fB){if(!aa(fB))fB=dc;var cS= !ur||eV.sZ(fB);if(!cS)qr();return cS;};function qr(){sh();if(ps.isEmpty())ps=ml(oR[2]);var cr="<div style='padding-top:10px; font-size: 9pt;	font-weight: bold;'>{0}</div>{1}".format(nN(ps,appName,256),my);if(fH==null){fH=O.ShowModal("",cr,function(popupWindowId,params){fH=null;ad.Show(false);return;},"width:650; height:480; hasTitleBar:no; zIndex:12000;");}ad.Show(false);};function sh(){adQ();EI();};function gg(o){if(o.tagName.toLowerCase()=="img")o=(cN.browser=="IE"?o.parentElement:o.parentNode);if(o.tagName.toLowerCase()=="td"&&o.className=="tbbutton")return o;return null;};function jb(evnt,img){if(!evnt)evnt=window.event;var o=gg(evnt.srcElement);if(o==null)return;if(dC(o)&& !rR(o))o.style.backgroundImage=img;};function qy(evnt){jb(evnt,'url(../App_Share/Themes/{0}/Images/hover.png)'.format(aV));};function qA(evnt){if(!evnt)evnt=window.event;var o=gg(evnt.srcElement);if(o==null)return;var cO="none";if(gN(o))cO='url(../App_Share/Themes/{0}/Images/down.gif)'.format(aV);o.style.backgroundImage=cO;};function qI(evnt){jb(evnt,'url(../App_Share/Themes/{0}/Images/down.gif)'.format(aV));};function qV(evnt){jb(evnt,'url(../App_Share/Themes/{0}/Images/hover.png)'.format(aV));};function dC(item){return item.getAttribute('enabled')=="True";};function gN(item){return item.getAttribute('down')=="True";};function rR(item){return item.getAttribute('hidden')=="True";};function zN(item,enabled){o=gg(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 nI(item,down){o=gg(item);if(o==null)return;o.setAttribute("down",down?'True':'False');var eS="none";if(gN(o))eS='url(../App_Share/Themes/{0}/Images/down.gif)'.format(aV);o.style.backgroundImage=eS;};function EK(item){o=gg(item);if(o==null)return;o.setAttribute("down",gN(o)?"False":"True");var eS="none";if(gN(o))eS='url(../App_Share/Themes/{0}/Images/down.gif)'.format(aV);o.style.backgroundImage=eS;};function yX(td,evnt){if(!dC(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;var cr="<div style='font-size: 7pt; text-align:right; cursor:pointer; ' onclick='AX()'>version:&nbsp;{0}</div>{1}".format(appVersion,my);fH=O.ShowModal("",cr,function(popupWindowId,params){try{T("txtMDXQuery").focus();}catch(e){}},"width:650; height:450; hasTitleBar:no; zIndex:12000;");};function tf(td,evnt){if(!dC(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;var bE=escape("BI Suite Setup (<span style='font-size:7pt;'>v.{0}</span>)".format(appVersion));O.ShowModal("../App_Share/Popups/Setup.aspx?lq=dmc","",function(popupWindowId,params){return;},"title:"+bE+"; width:650; height:400; autoHeight:true; resize:left right; ");};function Fx(td,evnt){if(!dC(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;xH('toolbar');};function xH(Le){ad.Show(true);O.ShowModal("Popups/Options.htm?mode="+Le,"",function(popupWindowId,params){return;},"title:Options; width:450; height:610; ");};function uV(td,evnt){if(!dC(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;window.location=aO;};function AX(){var uC=window.open(aO+"License.xml","License","scrollbars=yes,menubar=no,resizable=yes,toolbar=no,location=no,status=no");try{if(uC)uC.focus();}catch(e){}};function Fd(td,evnt){if(!dC(td))return;if(!evnt)evnt=window.event;evnt.cancelBubble=true;window.open('../rscompanion/rscompanion.aspx','_blank');};function vm(){if(fH){bJ(fH.id);fH=null;}};function GI(jS){switch(jS.id){case "selXmlaServers":dc=cR(jS);vs();break;case "selDatabases":dP=cR(jS);NM();break;case "selMiningStructures":me=cR(jS);Gz();break;case "selMiningModels":lx=cR(jS);Nu();break;}};function lY(){this.AppVersion="";this.AutoConnect=true;this.XmlaServer="";this.DataServer="";this.Catalog="";this.MiningStructure="";this.MiningModel="";this.PredictionColumn="";this.Apply=rF;this.LoadFromXml=Fa;this.SaveToXml=ED;};function Fa(xml,isFromReportFile){var V=(typeof(xml)=='string')?gY(xml):xml;if(!aa(isFromReportFile))isFromReportFile=false;if(!isFromReportFile){this.AutoConnect=dy(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 ED(isForReportFile){if(!aa(isForReportFile))isForReportFile=false;var sTmp="";sTmp+=aE("AppVersion",appVersion);var sTmpDataSource=aE("AutoConnect",this.AutoConnect);sTmpDataSource+=cP("XmlaServer",this.XmlaServer);sTmpDataSource+=cP("DataServer",this.DataServer);sTmpDataSource+=cP("Catalog",this.Catalog);sTmpDataSource+=cP("MiningStructure",this.MiningStructure);sTmpDataSource+=cP("MiningModel",this.MiningModel);sTmpDataSource+=cP("PredictionColumn",this.PredictionColumn);sTmp+=aE("DataSource",sTmpDataSource);sTmp=aE("Options",sTmp);return sTmp;};function rF(){iB=P.AutoConnect;var vM=false;if(iB){if(dc!=P.XmlaServer)vM=true;dc=P.XmlaServer;if(dP!=P.DataServer)vM=true;dP=P.DataServer;if(cE!=P.Catalog)vM=true;cE=P.Catalog;if(me!=P.MiningStructure)vM=true;me=P.MiningStructure;if(lx!=P.MiningModel)vM=true;lx=P.MiningModel;if(mo!=P.PredictionColumn)vM=true;mo=P.PredictionColumn;}var akN=T("selXmlaServers");jg(akN,dc);if(vM)vs();};function lE(fd){if(!aa(fd))fd=true;var an=new hV();if(eP=="ssrs")an=Fo();else if(eP=="server")an=Fp();else{an.bValue=false;an.sValue="Unsupported Data Storage Type: "+eP;}if(fd){if(!an.bValue){var J=an.sValue;if(escape(J).length<1800)O.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 O.ShowMessageBox(J,bz.Stop,bA.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.";O.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 nT(gb,fd){if(!aa(fd))fd=true;var an=new hV();if(eP=="ssrs")an=EG(gb);else if(eP=="server")an=EJ(gb);else{an.bValue=false;an.sValue="Unsupported Data Storage Type: "+eP;}if(fd){if(!an.bValue){var J=an.sValue;if(escape(J).length<1800)O.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 O.ShowMessageBox(J,bz.Stop,bA.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.";O.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 Fp(){var an=new hV();var gL="<LoadOptions xmlns='http://entsoftsol.com/'><fileName>{0}</fileName></LoadOptions>".format(lI);var gO=fo.XmlFormatString.format(gL);var aq=fX();aq.open("POST",aO+"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(gO);var V=aq.responseXML;an=fQ(V);if(an.bValue){var hY=al(V,"//LoadOptionsResult");V=kk(hY);an=fQ(V);if(an.bValue)an.sValue=hY;}return an;};function EJ(gb){var an=new hV();var gL="<SaveOptions xmlns='http://entsoftsol.com/'><fileName>{0}</fileName><Data>{1}</Data></SaveOptions>".format(lI,gb);var gO=fo.XmlFormatString.format(gL);var aq=fX();aq.open("POST",aO+"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(gO);var V=aq.responseXML;an=fQ(V);if(an.bValue){an.sValue=al(V,"//SaveOptionsResult");}return an;};function Fo(){var oG="{0}/{1}".format(ls,lI);oG=oG.replace(/\/\//g,"/");var V=PB(fJ,oG);var an=fQ(V);if(an.bValue)an.sValue=EH(V.selectSingleNode("//Contents").text);return an;};function EG(gb){var V=NZ(fJ,lI,Ft(gb),ls,"text/xml","true","True","");var an=fQ(V);return an;};function PB(by,iz){var cC='<?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>'+iz+'</Resource></GetResourceContents></SOAP-ENV:Body></SOAP-ENV:Envelope>';var dY="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetResourceContents";return ER(by,dY,cC);};function NZ(by,iz,fK,fv,nK,CU,vK,ws){var cC='<?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>'+iz+'</Resource><Parent>'+fv+'</Parent><Overwrite>'+CU+'</Overwrite><Contents>'+fK+'</Contents><MimeType>'+nK+'</MimeType><Properties><Property xsi:type="tns:Property"><Name xsi:type="xsd:string">Description</Name><Value xsi:type="xsd:string">'+ws+'</Value></Property><Property xsi:type="tns:Property"><Name xsi:type="xsd:string">Hidden</Name><Value xsi:type="xsd:string">'+vK+'</Value></Property></Properties></CreateResource></SOAP-ENV:Body></SOAP-ENV:Envelope>';var dY="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateResource";return ER(by,dY,cC);};function ER(by,dY,cC){var aq=fX();try{aq.open("POST",by,false);}catch(e){var V=fo.SetError(e.number,e.message);return V;}aq.setRequestHeader("SOAPAction",dY);aq.setRequestHeader("Content-Type","text/xml");aq.setRequestHeader("Accept-Encoding","gzip, deflate");try{aq.send(cC);}catch(e){this.ErrorMessage=e.message;if(aq.responseXML.xml=="")return gY("<faultstring>"+String.removeAllNamespaces(e.message)+"</faultstring>");else return aq.responseXML;}if(aq==null||aq.readyState!=4)return;var V=aq.responseXML;return V;};function fQ(V){var an=new hV();if(V==null){an.bValue=false;an.nValue= -1;an.sValue="Unknown error";return an;}else if(V.parseError.errorCode!=0){ad.Show(false);an.bValue=false;an.nValue= -2;var bw=new dB();bw.ae("<table border='0'>");bw.ae("<tr><td style='text-align:right;vertical-align:top;'>ErrorCode:</td><td>{0}</td></tr>".format(V.parseError.errorCode));if(aa(V.parseError.line))bw.ae("<tr><td style='text-align:right;vertical-align:top;'>Line:</td><td>{0}</td></tr>".format(V.parseError.line));if(aa(V.parseError.linepos))bw.ae("<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())bw.ae("<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())bw.ae("<tr><td style='text-align:right;vertical-align:top;'>Reason:</td><td>{0}</td></tr>".format(V.parseError.reason));bw.ae("</table>");an.sValue=bw.toString();return an;}else if(V.xml.isEmpty()){ad.Show(false);an.bValue=false;an.nValue= -3;an.sValue="XML is Empty";return an;}else if(V.selectSingleNode("//faultstring")){ad.Show(false);an.bValue=false;an.nValue= -4;var tw=al(V,"//faultcode");var sT=al(V,"//faultstring");var sV=al(V,"//detail/ErrorCode");var tX=al(V,"//detail/HttpStatus");var tS=al(V,"//detail/Message");var bw=new dB();bw.ae("<table border='0'>");if(tw.isNotEmpty())bw.ae("<tr><td style='text-align:right;vertical-align:top;'>FaultCode:</td><td>{0}</td></tr>".format(tw));if(sT.isNotEmpty())bw.ae("<tr><td style='text-align:right;vertical-align:top;'>FaultString:</td><td>{0}</td></tr>".format(sT));if(sV.isNotEmpty())bw.ae("<tr><td style='text-align:right;vertical-align:top;'>ErrorCode:</td><td>{0}</td></tr>".format(sV));if(tX.isNotEmpty())bw.ae("<tr><td style='text-align:right;vertical-align:top;'>HttpStatus:</td><td>{0}</td></tr>".format(tX));if(tS.isNotEmpty())bw.ae("<tr><td style='text-align:right;vertical-align:top;'>DetailMessage:</td><td>{0}</td></tr>".format(tS));bw.ae("</table>");an.sValue=bw.toString();return an;}return an;};function zp(la,pj){if(!aa(pj))pj=true;try{if(la.isEmpty())return;var hU=la.split('/');if(hU[0].isEmpty())hU.splice(0,1);if(la.isEmpty())return;var gQ=hU[hU.length-1];hU.splice(hU.length-1,1);var gn=hU.join("/");if(!gn.startsWith("/"))gn="/"+gn;if(gn.endsWith("/"))gn=gn.substr(0,gn.length-1);var av=new bn();var V=av.FindItems(fJ,gQ,gn,"Folder");var bB=false;try{var L=V.selectNodes("//Items/CatalogItem/Path");for(var i=0;i<L.length;i++){bB=(bB||L[i].text.endsWith(la));if(bB){la=L[i].text;break;}}}catch(e){}if(!bB&&pj){var V=av.CreateFolder(fJ,gQ,gn,"False");}}catch(e){}}