var Ao=window.createPopup();apr();var wo=new Array();var Mj=new Array();var wJ=new Array();var nF=null;var Tn=false;var vl=100;var vL=30;var Jx=11;var MC=10;var abS=10;var si='__dmtree_node';var JJ='__dmtree_text';var Mn='__dmtree_btn';var ahr='__dmtree_bar';var hC="",lI="",iG="",fO="",hb="",uq="",Qw="2px",QW="OldLace",Nt="Tree",axS=500,h=38,awZ=65,azo=20,Tm=120,aBA=null,ayV="0",azr=50,azm=1,aBz="black",aBy="ShortDash",ayo=true,ayi=0,awY=0.75,azl=1,azL=new Array(),axe=0,afU="",dz=Array(),aEw=new Array();var UW="<DIV style='border:1px solid black; font-size:70%; background:Beige'>";var UZ="</DIV>";var fR="",hT=null,ld=0;var afD="Beige";var afm="Black";var afV="OnMouseOverEvent";var aia="1";var ahX="Black";var afq="Visible";var Lg=253;var Li=245;var Lq=230;var KH=255;var JS=255;var Ke=255;var pV=3;var PH=Lg,valueRangeMinG=Li,valueRangeMinB=Lq;var BV=KH,BS=JS,BP=Ke;var Gj=new Array();var HC=new Array();var avq=new Array("Gray","Red","LightGreen","Yellow","Blue","Crimson");var Iu="";var ni=new Array();var zJ=new Array();var uV=new Array();var hI=new Array();var Jz=new Array(),Wy=new Array(),GU=1;var NT=0;var Nv=0;var ux=0;var acp=0;var acm=0;var Og=0.0;var aco=0.0;var Oh=0.0;var acn=0.0;function OnLoad(){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];{}{hC=form1.XmlaServer.value,lI=form1.Server.value,iG=form1.selDatabases.value,fO=form1.Model.value.replace("'","''"),uq=form1.PredictionTree.value,hb=form1.ModelType.value,Qw="2px",QW="OldLace",Nt="Tree";acH(hC,iG,fO,uq,hb);}if(parent.OnFrameLoaded){parent.OnFrameLoaded(window,iFrameIndex);parent.ExecuteComplete(window,iFrameIndex);}};function acH(xI,ati,aeP,ain,Ni){ni=new Array();zJ=new Array();uV=new Array();hI=new Array();Jz=new Array();if(!anH(Ni)){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape(Ni+" mining model is not yet supported.")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}hC=xI;iG=ati;fO=aeP;uA="";uq=ain;hb=Ni;arB();aqw();Tn=true;};function axp(){if(lI==""){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("XMLA Server not set")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}};function axg(){if(lI==""){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("XMLA Server not set")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}};function aqw(){if(lI==""){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("XMLA Server not set")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}Go();switch(hb){case "Microsoft_Naive_Bayes":divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Naive Bayes</div><br><br><span>Attribute:</span>&nbsp;&nbsp;<select name="PredictionColumn" onchange="javascript:Vz()" language="javascript" style="width:166pt;"></select><table id="Histogram" border="0"></table><br><span style="LEFT:95px;">Value 1</span>&nbsp;&nbsp;<select name="Value1" onchange="javascript:SB()" language="javascript" style="width:60pt;"></select>&nbsp;&nbsp;<span>Value 2</span>&nbsp;&nbsp;<select name="Value2" onchange="javascript:SB()" language="javascript" style="width:60pt;LEFT:95px;"></select>&nbsp;&nbsp;<br><br>&nbsp;&nbsp;<table id = "Details" rules="all" border="1"></table>';anT();break;case "Microsoft_Sequence_Clustering":divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Sequence Clustering</div><br><br><span style="LEFT:100px;">First Cluster:</span>&nbsp;&nbsp;<select name="Cluster1" onchange="javascript:ER()" language="javascript" style="width:236pt;"></select>&nbsp;&nbsp;<span>Second Cluster:</span>&nbsp;&nbsp;<select name="Cluster2" onchange="javascript:ER()" language="javascript" style="width:236pt;LEFT:100px;"></select>&nbsp;&nbsp;<br><br>&nbsp;&nbsp;<table id = "Details" rules="all" border="1"></table>';divTabPanel2Top.innerHTML='<span class="nowrap">Minimum Link Strength:&nbsp;<select id="LinkStrength" onchange="javascript:VN()" language="javascript" style="width:40pt;"></select>&nbsp;&nbsp;</span>'+'<span class="nowrap">Shading Variable:&nbsp;<select id="Variable" onchange="javascript:XB()" style="width:180pt;LEFT:100px;"></select>&nbsp;&nbsp;</span>'+'<span class="nowrap">State:&nbsp;<select name="State" onchange="javascript:XA()" style="width:180pt;LEFT:100px;"></select></span>';Wz();break;case "Microsoft_Clustering":divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Clustering</div><br><br><span style="LEFT:100px;">First Cluster:</span>&nbsp;&nbsp;<select name="Cluster1" onchange="javascript:ER()" language="javascript" style="width:236pt;"></select>&nbsp;&nbsp;<span>Second Cluster:</span>&nbsp;&nbsp;<select name="Cluster2" onchange="javascript:ER()" language="javascript" style="width:236pt;LEFT:100px;"></select>&nbsp;&nbsp;<br><br>&nbsp;&nbsp;<table id = "Details" rules="all" border="1"></table>&nbsp;&nbsp;';divTabPanel2Top.innerHTML='<span class="nowrap">Minimum Link Strength:&nbsp;<select id="LinkStrength" onchange="javascript:VN()" language="javascript" style="width:40pt;"></select>&nbsp;&nbsp;</span>'+'<span class="nowrap">Shading Variable:&nbsp;<select id="Variable" onchange="javascript:XB()" style="width:180pt;LEFT:100px;"></select>&nbsp;&nbsp;</span>'+'<span class="nowrap">State:&nbsp;<select id="State" onchange="javascript:XA()" style="width:180pt;LEFT:100px;"></select></span>';Wz();break;case "Microsoft_Decision_Trees":divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Decision Trees</div><br/><br/><div id="oWrapper" ><input type="button" id="ZoomIn" class="button" value="Zoom In" onclick="apN(\'\')" /><input type="button" id="ZoomOut" class="button" value="Zoom Out" onclick="apM(\'\')" />&nbsp;&nbsp;Shading: <select name="_attrValues" id="_attrValues" onchange="aoZ(\'\')" ></select><hr width=100%><DIV ID="kj" style="position:absolute; border-width:0px;left:1px;width:1200px;top:100px;height:900px;background-color:White;border-color:White;" />';apv();break;case "Microsoft_Neural_Network":divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Neural Network</div><br><br><span>Output Attribute:</span>&nbsp;&nbsp;<select name="PredictionColumn" onchange="javascript:Nl()" language="javascript" style="width:175pt;"></select><br><br>&nbsp;&nbsp;<span style="LEFT:95px;">Value 1</span>&nbsp;&nbsp;<select name="Value1" onchange="javascript:CK()" language="javascript" style="width:60pt;"></select>&nbsp;&nbsp;<span>Value 2</span>&nbsp;&nbsp;<select name="Value2" onchange="javascript:CK()" language="javascript" style="width:60pt;LEFT:95px;"></select>&nbsp;&nbsp;<br><br>&nbsp;&nbsp;<table id="Filter" name = "Filter" rules="all" border="1"><tr><th style="background-color:#CADDEC;font-weight:bold;">Use</th><th style="background-color:#CADDEC;font-weight:bold;">Attribute</th><th style="background-color:#CADDEC;font-weight:bold;width:100px;">Value</th></tr></table><br><br>&nbsp;&nbsp;<table id = "Details" name = "Details" rules="all" border="1"></table>';anS();break;case "Microsoft_Association_Rules":divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Association Rules</div><br><br>&nbsp;&nbsp;<span style="LEFT:95px;">Mininum Itemset Size</span>&nbsp;&nbsp;<select name="ItemsetSize" onchange="javascript:BL()" language="javascript" style="width:60pt;"></select>&nbsp;&nbsp;<br><br>&nbsp;&nbsp;<span style="LEFT:95px;">Mininum Support</span>&nbsp;&nbsp;<input name="Support" onchange="javascript:BL()" type="text" value="0" maxlength="10" id="tbMaxRows" style="width:30px;"  align="right"/>&nbsp;&nbsp;<span id="Label3" style="font-size:8pt;">(Minimum: </span><span id="lbMinSupport" style="font-size:8pt;"></span><span id="Label3" style="font-size:8pt;">; Maximum: </span><span id="lbMaxSupport" style="font-size:8pt;"></span><span>)</span><br><br>&nbsp;&nbsp;<span style="LEFT:95px;">Minimum Probability:</span>&nbsp;&nbsp;<input name="Probability" onchange="javascript:BL()" type="text" value="" maxlength="10" id="Probability" style="width:90px;"  align="right"/>&nbsp;&nbsp;<span id="Label3" style="font-size:8pt;">(Minimum: </span><span id="lbMinProbability" style="font-size:8pt;"></span><span id="Label3" style="font-size:8pt;">; Maximum: </span><span id="lbMaxProbability" style="font-size:8pt;"></span><span>)</span><br><br>&nbsp;&nbsp;<span style="LEFT:95px;">Minimum Importance:</span>&nbsp;&nbsp;<input name="Importance" onchange="javascript:BL()" type="text" value="" maxlength="10" id="Importance" style="width:90px;"  align="right"/>&nbsp;&nbsp;<span id="Label3" style="font-size:8pt;">(Minimum: </span><span id="lbMinImportance" style="font-size:8pt;"></span><span id="Label3" style="font-size:8pt;">; Maximum: </span><span id="lbMaxImportance" style="font-size:8pt;"></span><span>)</span><br><br>&nbsp;&nbsp;<span style="LEFT:95px;">Show Only Itemsets Containing:</span>&nbsp;&nbsp;<input name="ItemsetFilter" onchange="javascript:BL()" type="text" value="" maxlength="10" id="ItemsetFilter" style="width:90px;"  align="right"/><br><br>&nbsp;&nbsp;<table id = "Details" name = "Details" rules="all" border="1"></table><br><br>&nbsp;&nbsp;<table id = "Rules" name = "Rules" rules="all" border="1"></table>';apx();break;}};function apx(){aE.Show(true);var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.GetStatistics('"+fO+"')";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=aso;aU.iZ(dB,null,dZ);};function aso(bE){aE.Show(true);if(bE.parsed==false){return false;}nF=bE;aD=bE.selectNodes("//root/row");if(aD.length==0)return;NT=sq(aD[0],'MAX_PAGE_SIZE');Nv=sq(aD[0],'MIN_SUPPORT');ux=sq(aD[0],'MAX_SUPPORT');acp=sq(aD[0],'MIN_ITEMSET_SIZE');acm=sq(aD[0],'MAX_ITEMSET_SIZE');Og=gN(aD[0],'MIN_RULE_PROBABILITY').toString().substring(5,0);aco=gN(aD[0],'MAX_RULE_PROBABILITY').toString().substring(5,0);Oh=gN(aD[0],'MIN_RULE_LIFT').toString().substring(5,0);acn=gN(aD[0],'MAX_RULE_LIFT').toString().substring(5,0);lbMinSupport.innerText=Nv.toString();lbMaxSupport.innerText=ux.toString();lbMinProbability.innerText=Og;lbMaxProbability.innerText=aco;lbMinImportance.innerText=Oh;lbMaxImportance.innerText=acn;form1.Support.value=Nv.toString();form1.Probability.value=Og;form1.Importance.value=Oh;var ro=form1.ItemsetSize;for(var i=acp;i<=acm;i++){var label=i.toString();var value=i.toString();ro[ro.length]=new Option(label,value);}aE.Show(false);if(ro.length>0){ro.selectedIndex=ro.length-1;BL();}};function BL(){aE.Show(true);var ro=form1.ItemsetSize;var ahR=ro.options[ro.selectedIndex].value;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.GetItemsets(";dB+="'"+fO+"', ";dB+="0, ";dB+=(NT-1).toString()+",";dB+="5,";dB+=form1.ItemsetSize(form1.ItemsetSize.selectedIndex).value+",";dB+=form1.Support.value+",";dB+="'"+form1.ItemsetFilter.value+"',True)";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asc;aU.iZ(dB,null,dZ);};function asc(bE){aE.Show(false);aD=bE.selectNodes("//root/row[NODE_CAPTION!='']");var aG="<table id = \"Details\" name = \"Details\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">Itemset</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Support</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Size</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Importance</th></tr>";for(var i=0;i<aD.length;i++){var c1=aL(aD[i],'NODE_CAPTION').replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var c2=aL(aD[i],'NODE_SUPPORT').replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var c3=aL(aD[i],'NODE_SIZE').replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var c4=gN(aD[i],'NODE_LIFT').toString().substring(5,0);aG+="<tr><td>"+c1+"</td><td align=\"right\">"+c2+"</td><td align=\"right\">"+c3+"</td><td align=\"right\">"+c4+"</td></tr>";}Details.outerHTML=aG+"</table>";apS();};function apS(){aE.Show(true);var ro=form1.ItemsetSize;var ahR=ro.options[ro.selectedIndex].value;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.GetRules(";dB+="'"+fO+"', ";dB+="0, ";dB+=(NT-1).toString()+",";dB+="5,";dB+=form1.Probability.value.toString()+",";dB+=form1.Importance.value+",";dB+="'"+form1.ItemsetFilter.value+"',True)";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=ast;aU.iZ(dB,null,dZ);};function ast(bE){aD=bE.selectNodes("//root/row[NODE_CAPTION!='']");var aG="<table id = \"Rules\" name = \"Rules\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">Rule</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Support</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Size</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Probability</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Importance</th></tr>";for(var i=0;i<aD.length;i++){var c1=aL(aD[i],'NODE_CAPTION').replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var c2=aL(aD[i],'NODE_SUPPORT').replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var c3=aL(aD[i],'NODE_SIZE').replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var c4=(100*gN(aD[i],'NODE_PROBABILITY')).toString().substring(5,0)+"%";var c5=gN(aD[i],'NODE_LIFT');aG+="<tr><td>"+c1+"</td><td align=\"right\">"+c2+"</td><td align=\"right\">"+c3+"</td><td align=\"right\">"+c4+"</td>";var fE=100*c5;if(fE<0)fE= -fE;if(c5<0){aG+="<td align=\"left\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";aG+="width:"+fE.toString()+"px; ";if(c5<0)aG+="background-color:Red; \" class=\"GradientRedBackwards\">";else aG+="background-color:Navy; \" class=\"GradientNavyBackwards\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+c5.toString().substring(5,0)+"</DIV>";aG+="</DIV></td></tr>";}else{aG+="<td align=\"left\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";aG+="width:"+fE.toString()+"px; ";if(c5<0)aG+="background-color:Red; \" class=\"GradientRed\">";else aG+="background-color:Navy; \" class=\"GradientNavy\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+c5.toString().substring(5,0)+"</DIV>";aG+="</DIV></td></tr>";}}Rules.outerHTML=aG+"</table>";aE.Show(false);};function anS(){aE.Show(true);var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=Nl;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.NeuralNet.GetAttributeValues('"+fO+"')";aU.iZ(dB,null,dZ);};function awU(bE){aE.Show(false);if(bE.parsed==false){return false;}var U=form1.PredictionColumn;nF=bE;m_oPredictionColumns=bE.selectNodes("//root/row[Role='3']");if(m_oPredictionColumns.length==0){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("No prediction attributes found.")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}var Vt="";for(var i=0;i<m_oPredictionColumns.length;i++){var lY=aL(m_oPredictionColumns[i],'Attribute');if(lY!=Vt){Vt=lY;U[U.length]=new Option(lY,lY);}}aE.Show(false);if(U.length>0){U.selectedIndex=0;ld=U.selectedIndex;Nl();}};function Nl(bE){aE.Show(false);var U=form1.selPredictions;if(U.length==0)return;ld=U.selectedIndex;if(bE.parsed==false){return false;}var eV=form1.Value1;var eZ=form1.Value2;nF=bE;aD=bE.selectNodes("//root/row[Role='3']");if(aD.length==0)aD=bE.selectNodes("//root/row[Role='2']");var RJ=U[U.selectedIndex].text;form1.PredictionColumn[form1.PredictionColumn.length]=new Option(RJ,RJ);for(var i=0;i<aD.length;i++){var lY=aL(aD[i],'Attribute');if(RJ==lY){var value=aL(aD[i],'Value');eV[eV.length]=new Option(value,value);eZ[eZ.length]=new Option(value,value);}}aD=bE.selectNodes("//root/row[Role='1']");var aG="<table id = \"Filter\" name = \"Filter\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">Filter</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Attribute</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Value</th><th style=\"background-color:#CADDEC;font-weight:bold;width:70px;\">Type</th></tr>";var Am="";var vt=1;for(var i=0;i<aD.length;i++){var lY=aL(aD[i],'Attribute');if(Am!=lY){Am=lY;aG+="<tr><td style=\"width: 32px\"><INPUT type=\"checkbox\" name=chkFilter"+vt.toString()+" id=chkFilter"+vt.toString()+" onclick = \"CK()\"></td>";aG+="<td style=\"width: 200px\">"+lY+"</td><td style=\"width: 140px\"><select name=\"o"+lY.replace(" ","").replace(" ","").replace(" ","").replace(" ","").replace("&","").replace("<","").replace(">","")+"\" onchange = \"aoe("+vt.toString()+")\"></select></td></td><td style=\"width: 70px\">"+aL(aD[i],'Type')+"</td></tr>";vt++;}}aG+="</table>";Filter.outerHTML=aG;var zd=null;Am="";for(var i=0;i<aD.length;i++){var lY=aL(aD[i],'Attribute');if(Am!=lY){Am=lY;zd=eval("form1.o"+lY.replace(" ","").replace(" ","").replace(" ","").replace(" ","").replace("&","").replace("<","").replace(">",""));}if(zd){var value=aL(aD[i],'Value');Wy[lY+":"+value]=aL(aD[i],'Type');if(value==lT)zd[zd.length]=new Option(lT,value);else zd[zd.length]=new Option(value,value);}}var sv=0;var wl=0;if(eV.length>0){for(var i=0;i<eV.options.length;i++){if(eV.options[i].value!=lT){sv=i;break;}}for(var i=0;i<eZ.options.length;i++){if(eZ.options[i].value!=lT&&i!=sv){wl=i;break;}}eV.selectedIndex=sv;eZ.selectedIndex=wl;CK();}};function CK(){aE.Show(false);var Qa="1";var Qe="1";var eV=form1.Value1;var eZ=form1.Value2;var mI=eV.options[eV.selectedIndex].value;var nc=eZ.options[eZ.selectedIndex].value;if(mI==nc){Details.outerHTML="<table id = \"Details\" name = \"Details\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">Attributes</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Values</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Favors "+mI+"</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Favors "+nc+"</th></tr></table>";P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("Please, select two different Values.")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.NeuralNet.GetAttributeScores('"+fO+"','<NewDataSet><xs:schema id=\"NewDataSet\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\"><xs:element name=\"NewDataSet\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\">";dB+="<xs:complexType><xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\"><xs:element name=\"Table1\"><xs:complexType><xs:sequence><xs:element name=\"InputName\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"InputValue\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"InputValueType\" type=\"xs:string\" minOccurs=\"0\" /></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema>";for(var i=1;i<Filter.rows.length;i++){if(Filter.rows[i].cells[0].firstChild.status==true){dB+="<Table1><InputName>"+Filter.rows[i].cells[1].innerText.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")+"</InputName><InputValue>"+Filter.rows[i].cells[2].firstChild.value.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")+"</InputValue><InputValueType>"+Filter.rows[i].cells[3].innerText+"</InputValueType></Table1>";}}dB+="</NewDataSet>',";dB+="'"+form1.selPredictions.value+"', ";dB+="'"+mI.replace("'","''")+"', ";dB+=Qa+", ";dB+="'"+nc.replace("'","''")+"', ";dB+=Qe+", 0.0000005)";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=ask;aU.iZ(dB,null,dZ);};function ask(bE){var eV=form1.Value1;var eZ=form1.Value2;var mI=eV.options[eV.selectedIndex].value.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var nc=eZ.options[eZ.selectedIndex].value.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var rP=bE.selectNodes("//root/row");var TK=true;var Nz=new Array();aD=new Array();while(TK){for(var i=0;i<rP.length;i++){var kw=aL(rP[i],'Attributes');var hR=aL(rP[i],'Values');if(hR=="")hR=lT;kw=kw;hR=hR;if(Nz[kw+":"+hR]!=0){var currentScore=gN(rP[i],'Scores');if(currentScore<0)currentScore= -currentScore;var highest=i;var highestKey=kw+":"+hR;for(var j=0;j<rP.length;j++){var leftText2=aL(rP[j],'Attributes');var rightText2=aL(rP[j],'Values');if(rightText2=="")rightText2=lT;leftText2=leftText2;rightText2=rightText2;if(Nz[leftText2+":"+rightText2]!=0){var currentScore2=gN(rP[j],'Scores');if(currentScore2<0)currentScore2= -currentScore2;if(currentScore<currentScore2){currentScore=currentScore2;highest=j;highestKey=leftText2+":"+rightText2;}}}Nz[highestKey]=0;aD[aD.length]=rP[highest];}}if(aD.length>=rP.length)TK=false;}var aG="<table id = \"Details\" name = \"Details\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">Attributes</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Values</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Favors "+mI+"</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Favors "+nc+"</th></tr>";Details.outerHTML=aG+"</table>";for(var i=0;i<aD.length;i++){var kw=aL(aD[i],'Attributes');var hR=aL(aD[i],'Values');if(hR=="")hR="<"+lT+">";kw=kw.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");hR=hR.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var fE=gN(aD[i],'Scores');var lG=UW;lG+="Score:   ";var Kv=(gN(aD[i],'Scores'));if(Kv<0)Kv= -Kv;lG+=Kv.toString().substring(5,0);lG+="<br>Attribute:   "+kw+"<br><br>";if(aD[i].childNodes.length>6){lG+="<table align=center border=1>"+" <thead>"+"    <td>Probability</td>"+"    <td align=center style='font-size:70%;'><B>Value = "+mI+"</B></td>"+"    <td align=center style='font-size:70%;'><B>Value = "+nc+"</B></td>"+" </thead>"+" <tr>"+"    <td align='left' style='font-size:70%;' >"+kw+" = "+hR+"</td>"+"    <td align='center' style='font-size:70%;' >"+(100*gN(aD[i],'NodeProbability1')).toString().substring(5,0)+"%</td>"+"    <td align='center' style='font-size:70%;' >"+(100*gN(aD[i],'NodeProbability2')).toString().substring(5,0)+"%</td>"+" </tr>"+" <tr>"+"    <td align='left' style='font-size:70%;' >"+kw+" <> "+hR+"</td>"+"    <td align='center' style='font-size:70%;' >"+(100*gN(aD[i],'MarginalProbability1')).toString().substring(5,0)+"%</td>"+"    <td align='center' style='font-size:70%;' >"+(100*gN(aD[i],'MarginalProbability2')).toString().substring(5,0)+"%</td>"+" </tr>"+" <tr>"+"    <td align='left' style='font-size:70%;' >Lift</td>"+"    <td align='center' style='font-size:70%;' >"+((gN(aD[i],'NodeProbability1'))/(gN(aD[i],'MarginalProbability1'))).toString().substring(4,0)+"</td>"+"    <td align='center' style='font-size:70%;' >"+((gN(aD[i],'NodeProbability2'))/(gN(aD[i],'MarginalProbability2'))).toString().substring(4,0)+"</td>"+" </tr>"+"</table>";lG+="<br>";}lG+=UZ;fE= -fE;aG+="<tr><td>"+kw+"</td><td align=\"right\">"+hR+"</td>";if(fE<0){aG+="<td align=\"right\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";if(fE<0)fE= -fE;aG+="width:"+fE.toString()+"px; ";aG+="background-color:Navy; \" class=\"GradientNavyBackwards\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+lG+"</DIV>";aG+="</DIV></td><td>&nbsp;</td>";}else{aG+="<td>&nbsp;</td><td align=\"left\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";if(fE<0)fE= -fE;aG+="width:"+fE.toString()+"px; ";aG+="background-color:Navy; \" class=\"GradientNavy\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+lG+"</DIV>";aG+="</DIV></td>";}}Details.outerHTML=aG+"</table>";aE.Show(false);};function aoe(KG){aE.Show(false);if(Tn==true)Filter.rows[KG].cells[3].innerText=Wy[Filter.rows[KG].cells[1].innerText+":"+Filter.rows[KG].cells[2].firstChild.value];if(Filter.rows[KG].cells[0].firstChild.status==true)CK();};function apv(){aE.Show(true);var dB="select NODE_UNIQUE_NAME from ["+fO+"].Content where node_type = 2 and attribute_name='"+uq+"'";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=anX;aU.iZ(dB,"Native",dZ);};function anX(bE){if(bE.parsed==false){aE.Show(false);return false;}nF=bE;fR=bE.selectSingleNode("//root/row/NODE_UNIQUE_NAME").text;var dB="select [PARENT_UNIQUE_NAME], NODE_UNIQUE_NAME, MSOLAP_NODE_SHORT_CAPTION, NODE_SUPPORT, ATTRIBUTE_NAME, NODE_DISTRIBUTION from ["+fO+"].Content where node_unique_name = '"+fR+"'";var dZ="",aU=new Xmla;aU.RU="SchemaData";dz[dz.length]=aU;aU.hN=anz;aU.iZ(dB,"Native",dZ);};var yg="";var acj;function anz(bE){yg="";aE.Show(false);if(bE.parsed==false){aE.Show(false);return false;}nF=bE;aD=bE.selectNodes("//root/row");for(var i=0;i<aD.length;i++){acj=aD[i];hI[hI.length]=aL(aD[i],"MSOLAP_NODE_SHORT_CAPTION");hI[hI.length]=null;var sR=parseInt(gN(aD[i],"NODE_SUPPORT"));hI[hI.length]=sR;GU=sR;var hL=sR/GU;var lo=Math.round(BV-hL*(BV-PH)-hL*150);var lb=Math.round(BS-hL*(BS-valueRangeMinG)-hL*150);var lk=Math.round(BP-hL*(BP-valueRangeMinB)-hL*150);var cP="";var eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;var qG;if((30*lo+59*lb+11*lk)>(50*255)){qG="#000000";}else{qG="#ffffff";}hI[hI.length]="#"+cP;hI[hI.length]=qG;var lZ=aD[i].selectNodes('NODE_DISTRIBUTION');for(var j=0;j<lZ.length;j++){if(Gj.length<lZ.length){Gj[Gj.length]=aL(lZ[j],"ATTRIBUTE_VALUE");HC[HC.length]=avq[j];}var Dp=100.0*gN(lZ[j],'PROBABILITY');ni[ni.length]=parseInt(Dp);zJ[zJ.length]=Dp.toString().substring(5,0)+"%";uV[uV.length]=parseInt(gN(lZ[j],'SUPPORT'));}Jz[aL(aD[i],"NODE_UNIQUE_NAME")]=0;}var dB="select [PARENT_UNIQUE_NAME], NODE_UNIQUE_NAME, MSOLAP_NODE_SHORT_CAPTION, NODE_SUPPORT, ATTRIBUTE_NAME, NODE_DISTRIBUTION from ["+fO+"].Content where IsDescendant('"+fR+"')  order by node_unique_name";var dZ="",aU=new Xmla;aU.RU="SchemaData";dz[dz.length]=aU;aU.hN=anw;aU.iZ(dB,"Native",dZ);};function WA(EP){var aD=nF.selectNodes("//root/row[PARENT_UNIQUE_NAME='"+aL(EP,"NODE_UNIQUE_NAME")+"']");yg+="<category label='"+aL(EP,"MSOLAP_NODE_SHORT_CAPTION").replace(/'/g,"").replace(/'/g,"''").replace(/&/g,"and").replace(/</g,"&#8249;").replace(/>/g,"&#8250;")+"'";var sR=parseInt(gN(EP,"NODE_SUPPORT"));yg+=" hoverText='"+aL(EP,"MSOLAP_NODE_SHORT_CAPTION").replace(/'/g,"").replace(/'/g,"''").replace(/&/g,"and").replace(/</g,"&#8249;").replace(/>/g,"&#8250;")+"\nSupport: "+sR.toString()+" out of "+GU.toString()+" cases\n";var hL=sR/GU;var lo=Math.round(BV-hL*(BV-PH)-hL*150);var lb=Math.round(BS-hL*(BS-valueRangeMinG)-hL*150);var lk=Math.round(BP-hL*(BP-valueRangeMinB)-hL*150);var cP="";var eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;var lZ=EP.selectNodes('NODE_DISTRIBUTION');for(var j=0;j<lZ.length;j++){yg+=aL(lZ[j],"ATTRIBUTE_NAME").replace(/'/g,"").replace(/&/g,"and").replace(/</g,"&#8249;").replace(/>/g,"&#8250;")+"="+aL(lZ[j],"ATTRIBUTE_VALUE")+"; Support="+parseInt(gN(lZ[j],"SUPPORT"))+"; Probability="+parseInt(100.0*gN(lZ[j],'PROBABILITY')).toString().substring(5,0)+"%25; Variance="+gN(lZ[j],'VARIANCE').toString().substring(5,0)+";\n";}yg+="' fillColor='"+cP+"'>";for(var i=0;i<aD.length;i++){WA(aD[i]);}yg+="</category>";};function anw(bE){aE.Show(false);var bRootNode=true;var nID=1;if(bE.parsed==false){aE.Show(false);return false;}nF=bE;aD=bE.selectNodes("//root/row");for(var i=0;i<aD.length;i++){hI[hI.length]=aL(aD[i],"MSOLAP_NODE_SHORT_CAPTION");hI[hI.length]=Jz[aL(aD[i],"PARENT_UNIQUE_NAME")];var sR=parseInt(gN(aD[i],"NODE_SUPPORT"));hI[hI.length]=sR;var hL=sR/GU;var lo=Math.round(BV-hL*(BV-PH)-hL*150);var lb=Math.round(BS-hL*(BS-valueRangeMinG)-hL*150);var lk=Math.round(BP-hL*(BP-valueRangeMinB)-hL*150);var cP="";var eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;var qG;if((30*lo+59*lb+11*lk)>(50*255)){qG="#000000";}else{qG="#ffffff";}hI[hI.length]="#"+cP;hI[hI.length]=qG;var lZ=aD[i].selectNodes('NODE_DISTRIBUTION');for(var j=0;j<lZ.length;j++){var Dp=100.0*gN(lZ[j],'PROBABILITY');ni[ni.length]=parseInt(Dp);zJ[zJ.length]=Dp.toString().substring(5,0)+"%";uV[uV.length]=parseInt(gN(lZ[j],'SUPPORT'));}Jz[aL(aD[i],"NODE_UNIQUE_NAME")]=nID;nID++;}hT=aoX(hI);aoV("");WA(acj);Wh=0;Iu="<chart palette='2' piefillAlpha='34' pieBorderThickness='3' hoverFillColor='FDCEDA' pieBorderColor='FFFFFF' baseFontSize='9' useHoverColor='1' showLabels='0' caption='Decision Tree Pie' >"+yg+"<styles><definition><style name='myHTMLFont' type='font' isHTML='1' /><style name='captionFont' type='font' size='16' /></definition><application><apply toObject='TOOLTIP' styles='myHTMLFont' /><apply toObject='CAPTION' styles='captionFont' /></application></styles></chart>";IJ=new Array(),Au=new Array();qE=1;sX="MultiLevelPie";abX(qE);aE.Show(false);};function Wz(){aE.Show(true);var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusters('"+fO+"')";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asA;aU.iZ(dB,null,dZ);};function asA(bE){aE.Show(false);if(bE.parsed==false){return false;}var eV=form1.Cluster1;var eZ=form1.Cluster2;nF=bE;aD=bE.selectNodes("//root/row");for(var i=0;i<aD.length;i++){var label=aL(aD[i],'ClusterName');var value=sq(aD[i],'ClusterUniqueNodeID');eV[eV.length]=new Option(label,value);eZ[eZ.length]=new Option(label,value);}var sv=0;var wl=0;if(eV.length>0){for(var i=0;i<eZ.options.length;i++){if(i!=sv){wl=i;break;}}eV.selectedIndex=sv;eZ.selectedIndex=wl;eV[eV.length]=new Option("Complement of "+eZ.options[eZ.selectedIndex].text,"");eZ[eZ.length]=new Option("Complement of "+eV.options[eV.selectedIndex].text,"");ER();}};function ER(){aE.Show(false);var eV=form1.Cluster1;var eZ=form1.Cluster2;var FB=form1.LinkStrength;var oT=form1.Variable;var os=form1.State;os.enabled=false;oT[oT.length]=new Option("Population","Population");var dZ="",aU=new Xmla;dz[dz.length]=aU;var uw="CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterProfiles('"+fO+"', 2147483647, 0)";var V=aU.iZ(uw,"Native",dZ);var aD=V.selectNodes("//root/row/AttributeName");var BB="";for(var i=0;i<aD.length;i++){var ZA=aD[i].text;if(BB!=ZA){BB=ZA;oT[oT.length]=new Option(BB,BB);}}for(var i=0.0;i<=1.0;i+=0.05){FB[FB.length]=new Option((parseInt(i*100)).toString()+"%",i);}if(eZ.options[eZ.selectedIndex].text.substring(14,0)!="Complement of "){for(var i=0;i<eV.options.length;i++){if(eV.options[i].text.substring(14,0)=="Complement of "){eV[i].text="Complement of "+eZ.options[eZ.selectedIndex].text;break;}}}if(eV.options[eV.selectedIndex].text.substring(14,0)!="Complement of "){for(var i=0;i<eZ.options.length;i++){if(eZ.options[i].text.substring(14,0)=="Complement of "){eZ[i].text="Complement of "+eV.options[eV.selectedIndex].text;break;}}}if(eV.options[eV.selectedIndex].text.substring(14,0)=="Complement of "&&eZ.options[eZ.selectedIndex].text.substring(14,0)=="Complement of "){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("Both clusters cannot be complements of the other one")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}var mI=eV.options[eV.selectedIndex].value;var nc=eZ.options[eZ.selectedIndex].value;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterDiscrimination(";dB+="'"+fO+"', ";dB+="'"+mI.replace(/''/g,"''")+"', ";dB+="'"+nc.replace(/''/g,"''")+"', 0)";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asp;aU.iZ(dB,null,dZ);};function asp(bE){aE.Show(false);var eV=form1.Cluster1;var eZ=form1.Cluster2;var mI=eV.options[eV.selectedIndex].text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");var nc=eZ.options[eZ.selectedIndex].text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");aD=bE.selectNodes("//root/row");var aG="<table id = \"Details\" name = \"Details\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;width:140px;\">Attributes</th><th style=\"background-color:#CADDEC;font-weight:bold;width:165px;\">Values</th><th style=\"background-color:#CADDEC;font-weight:bold;width:240px;\">Favors "+mI+"</th><th style=\"background-color:#CADDEC;font-weight:bold;width:240px;\">Favors "+nc+"</th></tr>";for(var i=0;i<aD.length;i++){var kw=aL(aD[i],'Attributes');var hR=aL(aD[i],'Values');if(hR=="")hR="<"+lT+">";kw=kw.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");hR=hR.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");var fE=gN(aD[i],'Score');fE= -fE;aG+="<tr><td>"+kw+"</td><td align=\"right\">"+hR+"</td>";if(fE<0){aG+="<td align=\"right\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";if(fE<0)fE= -fE;aG+="width:"+fE.toString()+"px; ";aG+="background-color:Navy; \" class=\"GradientNavyBackwards\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">Probability: "+fE.toString().substring(0,5)+"%</DIV>";aG+="</DIV></td><td>&nbsp;</td>";}else{aG+="<td>&nbsp;</td><td align=\"left\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px;";if(fE<0)fE= -fE;aG+="width:"+fE.toString()+"px; ";aG+="background-color:Navy; \" class=\"GradientNavy\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+fE.toString().substring(0,5)+"</DIV>";aG+="</DIV></td>";}aG+="</tr>";}Details.outerHTML=aG+"</table>";Jj();};function ayE(bV){return bV.replace(/&/g,'&amp').replace(/'/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');};var lx;var gU;function Jj(){var TZ=false;if(!gU){TZ=true;lx=new Array();gU=new Array();}var FB=form1.LinkStrength;var agD=parseFloat(FB.options[FB.selectedIndex].value);var dZ="",aU=new Xmla;dz[dz.length]=aU;var uw="SELECT NODE_UNIQUE_NAME, NODE_DESCRIPTION FROM ["+fO+"].CONTENT WHERE NODE_TYPE = 5";var xmlDoc2=aU.iZ(uw,"Native",dZ);var oh=xmlDoc2.selectNodes("//root/row");var wb="<chart palette='2' xAxisMinValue='0' xAxisMaxValue='100' yAxisMinValue='0' yAxisMaxValue='100' is3D='1' showFormBtn='0' viewMode='0'><dataset seriesName='DS1'>";var x=y=0;x=y=parseInt(Math.sqrt(oh.length));var qL=parseInt((Gi-60)/(x-1));var nB=parseInt((GH-30)/(y-1));var Ws=parseInt(nB/2);var j=m=0;var lo,lb,lk;var eb;var qQ=0x0;var xc=0x74;var qT=0xD0;var xj=0xD8;var qZ=0xF0;var xY=0xFF;qQ=KH;xc=Lg;qT=JS;xj=Li;qZ=Ke;xY=Lq;uw="CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetNodeGraph('"+fO+"',0)";var V=aU.iZ(uw,"Native",dZ);ij=V.selectNodes("//root/row");var zC=0;var ux=0.0;var oT=form1.Variable;if(oT.value=="Population")for(var i=0;i<ij.length;i++){if(ij[i].selectSingleNode('Type').text=="1"){if(ux<parseFloat(ij[i].selectSingleNode('Score').text))ux=parseFloat(ij[i].selectSingleNode('Score').text);zC+=parseInt(parseFloat(ij[i].selectSingleNode('Score').text));}}else for(var eY in gU){if(ux<gU[eY][1])ux=gU[eY][1];zC+=gU[eY][1];}for(var i=0;i<oh.length;i++){if(TZ==true){lx[oh[i].selectSingleNode('NODE_UNIQUE_NAME').text]=1.0;gU[oh[i].selectSingleNode('NODE_UNIQUE_NAME').text]=new Array(0.0,0);}var aK=parseInt(parseFloat(oh[i].selectSingleNode('NODE_UNIQUE_NAME').text));var kb=oh[i].selectSingleNode("NODE_DESCRIPTION").text.replace(/'/g,"''").replace(/&/g,"and").replace(/</g,"&#8249;").replace(/>/g,"&#8250;");var cP="72D4FE";var jp=0;if(oT.value=="Population"){var t=V.selectSingleNode("//root/row[Type=1 and N1='"+oh[i].selectSingleNode('NODE_UNIQUE_NAME').text+"']/Score").text;var nNodePopulation=0.0;if(t){jp=parseInt(parseFloat(t));if(ux>0){nNodePopulation=parseFloat(t)/ux;if(nNodePopulation){var lo=Math.round(qQ+4*nNodePopulation*(xc-qQ)-nNodePopulation*50);var lb=Math.round(qT+4*nNodePopulation*(xj-qT)-nNodePopulation*50);var lk=Math.round(qZ+4*nNodePopulation*(xY-qZ)-nNodePopulation*50);cP="";eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;}}}}else{jp=gU[oh[i].selectSingleNode('NODE_UNIQUE_NAME').text];if(!jp)jp=gU["0"+oh[i].selectSingleNode('NODE_UNIQUE_NAME').text];if(!jp)jp=gU["00"+oh[i].selectSingleNode('NODE_UNIQUE_NAME').text];if(!jp)jp=gU["000"+oh[i].selectSingleNode('NODE_UNIQUE_NAME').text];if(!jp)jp=gU["0000"+oh[i].selectSingleNode('NODE_UNIQUE_NAME').text];if(!jp){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("Support Information is not available.")+"&icon=stop&buttons=ok","",null,"title:Error; width:250; height:100; autoHeight:true; zIndex:11100;");return;}jp=jp[1];nNodePopulation=gU[oh[i].selectSingleNode('NODE_UNIQUE_NAME').text][0];if(nNodePopulation){var lo=Math.round(qQ+4*nNodePopulation*(xc-qQ)-nNodePopulation*50);var lb=Math.round(qT+4*nNodePopulation*(xj-qT)-nNodePopulation*50);var lk=Math.round(qZ+4*nNodePopulation*(xY-qZ)-nNodePopulation*50);cP="";eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;}else{cP="FFFFFF";}}if(j%2==0)wb+="<set x='"+(m*nB+40)+"' y='"+(j*qL+40)+"' width='60' height='40' name='Cluster "+aK.toString()+"' color='"+cP+"' id='"+aK.toString()+"' toolText='Support: "+jp.toString()+" out of "+zC.toString()+" cases,\n"+kb+"'/>";else{if(m==0)wb+="<set x='"+(m*nB+40+Ws)+"' y='"+(j*qL+40)+"' width='60' height='40' name='Cluster "+aK.toString()+"' color='"+cP+"' id='"+aK.toString()+"' toolText='Support: "+jp.toString()+" out of "+zC.toString()+" cases,\n"+kb+"'/>";else if(m==y-1)wb+="<set x='"+(m*nB+40-Ws)+"' y='"+(j*qL+40)+"' width='60' height='40' name='Cluster "+aK.toString()+"' color='"+cP+"' id='"+aK.toString()+"' toolText='Support: "+jp.toString()+" out of "+zC.toString()+" cases,\n"+kb+"'/>";else wb+="<set x='"+(m*nB+40)+"' y='"+(j*qL+40)+"' width='60' height='40' name='Cluster "+aK.toString()+"' color='"+cP+"' id='"+aK.toString()+"' toolText='Support: "+jp.toString()+" out of "+zC.toString()+" cases,\n"+kb+"'/>";}if(m==y-1){m=0;j++;}else m++;}qQ=KH;xc=Lg;qT=JS;xj=Li;qZ=Ke;xY=Lq;wb+="</dataset><connectors color='000000' stdThickness='5'>";for(var i=0;i<ij.length;i++){if(ij[i].selectSingleNode('Type').text=="2"){var nScore=(parseFloat(ij[i].selectSingleNode('Score').text)/100+1.0);if(nScore>=agD){var nN1=parseInt(parseFloat(ij[i].selectSingleNode('N1').text));var nN2=parseInt(parseFloat(ij[i].selectSingleNode('N2').text));var lo=Math.round(qQ+4*nScore*(xc-qQ)-nScore*50);var lb=Math.round(qT+4*nScore*(xj-qT)-nScore*50);var lk=Math.round(qZ+4*nScore*(xY-qZ)-nScore*50);cP="";eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;wb+="<connector strength='"+nScore.toString().substring(0,5)+"' from='"+nN1+"' to='"+nN2+"' color='"+cP+"' arrowAtStart='0' arrowAtEnd='0' label='"+(100*nScore).toString().substring(0,5)+"%25'/>";}}}wb+='</connectors></chart>';Wh=0;Iu=wb;IJ=new Array(),Au=new Array();qE=1;sX="DragNode";abX(qE);};function VN(){Jj();};function XB(){for(var eY in gU){lx[eY]= -1;gU[eY]=new Array(0.0,0);}var oT=form1.Variable;var os=form1.State;if(oT.value=="Population"){os.length=0;os.enabled=false;}else{os.length=0;os.enabled=true;var dZ="",aU=new Xmla;dz[dz.length]=aU;var uw="CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterProfiles('"+fO+"', 2147483647, 0)";var V=aU.iZ(uw,"Native",dZ);var aD=V.selectNodes("//root/row[AttributeName='"+oT.value+"']");var BB="";for(var i=0;i<aD.length;i++){switch(aL(aD[i],'AttributeValueType')){case "2":break;case "3":if(aL(aD[i],'ValueTag')=='Mean'){var sP=0.0;for(var k=0;k<aD[i].childNodes.length;k++){if(lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){var value=parseFloat(aD[i].childNodes[k].text);if(sP<value)sP=value;lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]=value;gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][0]=value;}}if(sP!=0)for(var eY in gU){gU[eY][0]=gU[eY][0]/sP;}}else if(aL(aD[i],'ValueTag')=='Support'){for(var k=0;k<aD[i].childNodes.length;k++){if(lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][0]=parseFloat(aD[i].childNodes[k].text);gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][1]=parseInt(parseFloat(aD[i].childNodes[k].text));}}}break;case "4":case "5":if(aL(aD[i],'ValueTag')=='Probability'){var dy=aL(aD[i],'AttributeValue');os[os.length]=new Option(dy,dy);if(os.value==aL(aD[i],'AttributeValue'))for(var k=0;k<aD[i].childNodes.length;k++){if(lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][0]=parseFloat(aD[i].childNodes[k].text);gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]=new Array(parseFloat(aD[i].childNodes[k].text),0);}}}else if(aL(aD[i],'ValueTag')=='Support'){if(os.value==aL(aD[i],'AttributeValue'))for(var k=0;k<aD[i].childNodes.length;k++){if(gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][1]=parseInt(parseFloat(aD[i].childNodes[k].text));}}}break;}}}Jj();};function XA(){for(var eY in lx){lx[eY]= -1;gU[eY]=new Array(0.0,0);}var oT=form1.Variable;var os=form1.State;if(oT.value=="Population"){return;}else{var dZ="",aU=new Xmla;dz[dz.length]=aU;var uw="CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterProfiles('"+fO+"', 2147483647, 0)";var V=aU.iZ(uw,"Native",dZ);var aD=V.selectNodes("//root/row[AttributeName='"+oT.value+"']");var BB="";for(var i=0;i<aD.length;i++){switch(aL(aD[i],'AttributeValueType')){case "2":break;case "3":if(aL(aD[i],'ValueTag')=='Mean'){var sP=0.0;for(var k=0;k<aD[i].childNodes.length;k++){if(lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){var bL=parseFloat(aD[i].childNodes[k].text);if(sP<bL)sP=bL;lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]=bL;gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][0]=bL;}}if(sP!=0)for(var eY in gU){gU[eY][0]=gU[eY][0]/sP;}}else if(aL(aD[i],'ValueTag')=='Support'){for(var k=0;k<aD[i].childNodes.length;k++){if(lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][0]=parseFloat(aD[i].childNodes[k].text);gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][1]=parseInt(parseFloat(aD[i].childNodes[k].text));}}}break;case "4":case "5":if(aL(aD[i],'ValueTag')=='Probability'){if(os.value==aL(aD[i],'AttributeValue'))for(var k=0;k<aD[i].childNodes.length;k++){if(lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){lx[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][0]=parseFloat(aD[i].childNodes[k].text);gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]=new Array(parseFloat(aD[i].childNodes[k].text),0);}}}else if(aL(aD[i],'ValueTag')=='Support'){if(os.value==aL(aD[i],'AttributeValue'))for(var k=0;k<aD[i].childNodes.length;k++){if(gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")]){gU[aD[i].childNodes[k].nodeName.replace("_x0030_","0")][1]=parseInt(parseFloat(aD[i].childNodes[k].text));}}}break;}}}Jj();};function anT(){aE.Show(true);var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=arZ;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.NaiveBayes.GetPredictableAttributes('"+fO+"')";aU.iZ(dB,null,dZ);};function arZ(bE){aE.Show(false);if(bE.parsed==false){return false;}var U=form1.PredictionColumn;nF=bE;m_oPredictionColumns=bE.selectNodes("//root/row");for(var i=0;i<m_oPredictionColumns.length;i++){var auZ=aL(m_oPredictionColumns[i],'ATTRIBUTE_NAME');var agc=aL(m_oPredictionColumns[i],'NODE_UNIQUE_NAME');U[U.length]=new Option(auZ,agc);}if(U.length>0){U.selectedIndex=0;Vz();}};function Vz(){aE.Show(true);var sAttribute=form1.PredictionColumn.options[form1.PredictionColumn.selectedIndex].value;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.NaiveBayes.GetAttributeHistogram('"+fO+"', '"+sAttribute+"')";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asa;aU.iZ(dB,null,dZ);};function asa(bE){aE.Show(false);if(bE.parsed==false){return false;}var eV=form1.Value1;var eZ=form1.Value2;nF=bE;aD=bE.selectNodes("//root/row");var aG="<table id=\"Histogram\" name=\"Historgram\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">&nbsp;&nbsp;&nbsp;&nbsp;Value&nbsp;&nbsp;&nbsp;&nbsp;</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Support</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Relative %</th></tr>";var DN=0;for(var i=0;i<aD.length;i++){var jp=sq(aD[i],'SUPPORT');DN+=jp;}if(DN==0)DN=1;for(var i=0;i<aD.length;i++){var value=aL(aD[i],'VALUE');if(value==""){value="&lt;"+lT+"&gt;";eV[eV.length]=new Option("<"+lT+">",lT);eZ[eZ.length]=new Option("<"+lT+">",lT);}else{eV[eV.length]=new Option(value,value);eZ[eZ.length]=new Option(value,value);}var jp=sq(aD[i],'SUPPORT');aG+="<tr><td style=\"height: 31px\">"+value+"</td><td title=\""+value+"\" align=\"right\"> &nbsp;"+jp+"</td><td title=\""+((100*jp)/DN).toString().substring(0,5)+"%\" align=\"right\"><DIV STYLE=\"font-size:0%; border:none; height:10px;left:5px;width:"+(100*jp)/DN+"px;background-color:Navy;\" class=\"GradientNavy\"></DIV></td></tr>";}Histogram.outerHTML=aG+"</table>";var sv=0;var wl=0;if(eV.length>0){for(var i=0;i<eV.options.length;i++){if(eV.options[i].value!=lT){sv=i;break;}}for(var i=0;i<eZ.options.length;i++){if(eZ.options[i].value!=lT&&i!=sv){wl=i;break;}}eV.selectedIndex=sv;eZ.selectedIndex=wl;SB();}};function SB(){aE.Show(true);var Qa="1";var Qe="1";var eV=form1.Value1;var eZ=form1.Value2;var mI=eV.options[eV.selectedIndex].value;var nc=eZ.options[eZ.selectedIndex].value;var dB="CALL System.Microsoft.AnalysisServices.System.DataMining.NaiveBayes.GetAttributeDiscrimination(";dB+="'"+fO+"', ";dB+="'"+form1.PredictionColumn.options[form1.PredictionColumn.selectedIndex].value+"', ";dB+="'"+mI.replace(/''/g,"''")+"', ";dB+=Qa+", ";dB+="'"+nc.replace(/''/g,"''")+"', ";dB+=Qe+", 0.0)";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=arX;aU.iZ(dB,null,dZ);};function arX(bE){aE.Show(false);var eV=form1.Value1;var eZ=form1.Value2;var mI=eV.options[eV.selectedIndex].value.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var nc=eZ.options[eZ.selectedIndex].value.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");aD=bE.selectNodes("//root/row");var aG="<table id = \"Details\" name = \"Details\" rules=\"all\" border=\"1\"><tr><th style=\"background-color:#CADDEC;font-weight:bold;\">Attributes</th><th style=\"background-color:#CADDEC;font-weight:bold;\">Values</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Favors "+mI+"</th><th style=\"background-color:#CADDEC;font-weight:bold;width:100px;\">Favors "+nc+"</th></tr>";for(var i=0;i<aD.length;i++){var kw=aL(aD[i],'Attributes');var hR=aL(aD[i],'Values');if(hR=="")hR="<"+lT+">";kw=kw.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");hR=hR.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;");var fE=gN(aD[i],'Score');var lG=UW;lG+="Score:   ";lG+=sq(aD[i],'Score');lG+="<br>Attribute:   "+kw+"<br><br>";if(aD[i].childNodes.length>6){lG+="<table align=center border=1>"+" <thead>"+"    <td>&nbsp;</td>"+"    <td align=center style='font-size:70%;'><B>"+mI+"</B></td>"+"    <td align=center style='font-size:70%;'><B>"+nc+"</B></td>"+" </thead>"+" <tr>"+"    <td align='left' style='font-size:70%;' >"+hR+"</td>"+"    <td align='center' style='font-size:70%;' >"+aL(aD[i],'InState1')+"</td>"+"    <td align='center' style='font-size:70%;' >"+aL(aD[i],'InState2')+"</td>"+" </tr>"+" <tr>"+"    <td align='left' style='font-size:70%;' >NOT "+hR+"</td>"+"    <td align='center' style='font-size:70%;' >"+aL(aD[i],'OutState1')+"</td>"+"    <td align='center' style='font-size:70%;' >"+aL(aD[i],'OutState2')+"</td>"+" </tr>"+"</table>";lG+="<br>";}lG+=UZ;fE= -fE;aG+="<tr><td>"+kw+"</td><td align=\"right\">"+hR+"</td>";if(fE<0){aG+="<td align=\"right\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";if(fE<0)fE= -fE;aG+="width:"+fE.toString()+"px; ";aG+="background-color:Navy; \" class=\"GradientNavy\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+lG+"</DIV>";aG+="</DIV></td><td>&nbsp;</td>";}else{aG+="<td>&nbsp;</td><td align=\"left\"><DIV onmouseover=\"vN()\" onmouseout=\"vT()\" STYLE=\"font-size:0%; border:none; height:10px; left:5px; ";if(fE<0)fE= -fE;aG+="width:"+fE.toString()+"px; ";aG+="background-color:Navy; \" class=\"GradientNavy\">";aG+="<DIV STYLE=\"visibility:hidden; overflow:hidden; position:absolute; left:0; right:0; width:1; height:1\">"+lG+"</DIV>";aG+="</DIV></td>";}}Details.outerHTML=aG+"</table>";};function anH(fK){return(fK=="Microsoft_Decision_Trees"||fK=="Microsoft_Clustering"||fK=="Microsoft_Sequence_Clustering"||fK=="Microsoft_Naive_Bayes"||fK=="Microsoft_Neural_Network"||fK=="Microsoft_Association_Rules")};function arB(){if(hb=="Microsoft_Decision_Trees"||hb=="Microsoft_Clustering"||hb=="Microsoft_Sequence_Clustering"||hb=="Microsoft_Naive_Bayes"||hb=="Microsoft_Neural_Network"||hb=="Microsoft_Association_Rules"){Tm=120;}else{Tm=180;}};function gN(V,yQ){var aV=V.selectSingleNode(yQ);if(aV){return parseFloat(aV.text);}return 0.0;};function sq(V,yQ){var aV=V.selectSingleNode(yQ);if(aV){return parseInt(aV.text)}return 0;};function apr(){if(document.namespaces["vml"]==null){document.namespaces.add("vml","urn:schemas-microsoft-com:vml");}ssFound=false;for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets(i).title=="..\DMDefault.css")ssFound=true;}if(!ssFound){retSS=document.createStyleSheet();retSS.addRule("vml\\:*","behavior: url(#default#VML);");retSS.title="DMDefault.css";}};function aoX(hI){mj=new Array();zz=5;for(var i=0;i<hI.length/zz;i++){mj[i]=new Object();mj[i].description=hI[zz*i];mj[i].parentIndex=hI[zz*i+1];mj[i].support=hI[zz*i+2];mj[i].backgroundColor=hI[zz*i+3];mj[i].textColor=hI[zz*i+4];mj[i].children=new Array();mj[i].expanded=true;if(mj[i].parentIndex==null){mj[i].left=0;mj[i].top=0;}else{var parent=mj[mj[i].parentIndex];mj[i].left=parent.left+vl;mj[i].top=parent.top+vL*parent.children.length;parent.children[parent.children.length]=i;}}return mj};function TW(fX,Fu,dS,dM){var oi=hT[Fu];if(!oi.expanded||oi.children.length==0){oi.left=dS;oi.top=dM;FX=document.all[fX+si+Fu].clientHeight+abS;return FX;}var avl=dS+document.all[fX+si+Fu].clientWidth+vl;var IY=dM;var ayx=0;for(var i=0;i<hT[Fu].children.length;i++){var asH=oi.children[i];var avj=TW(fX,asH,avl,IY);IY+=avj+abS;}oi.top=(IY+dM)/2-document.all[fX+si+Fu].clientHeight/2;oi.left=dS;FX=(IY-dM);return FX;};function JA(adm){var FX=new Number(adm.substr(0,adm.length-2));return FX;};function aoW(fX,hu){var fx=new Number(),fy=new Number(),tx=new Number(),ty=new Number();if(hT[hu].parentIndex==null)return;if(!hT[hT[hu].parentIndex].expanded)return;var Wo=document.all[fX+si+hu];var OZ=document.all[fX+si+hT[hu].parentIndex];fx=JA(Wo.style.left);fy=JA(Wo.style.top)+vL/2;tx=JA(OZ.style.left)+OZ.clientWidth+Jx+4;ty=JA(OZ.style.top)+vL/2;var l=document.createElement("vml:line");l.strokeweight=aia;l.strokecolor=ahX;l.from=fx+"px, "+fy+"px";l.to=tx+"px, "+ty+"px";document.all["kj"].insertBefore(l);};function SZ(fX){var ayX=0;arLines=new Array();for(var i=0;i<document.all["kj"].children.length;i++)if(document.all["kj"].children[i].tagName=="line")arLines[arLines.length]=document.all["kj"].children[i];for(var i=0;i<arLines.length;i++)arLines[i].removeNode(true);TW(fX,0,0,0);for(var i=0;i<hT.length;i++){document.all[fX+si+i].style.left=hT[i].left;document.all[fX+si+i].style.top=hT[i].top;}for(var i=0;i<hT.length;i++){aoW(fX,i);}};function aoU(fX){var i;var U=document.all["_attrValues"];if(U==null){return;}var fu=document.createElement("OPTION");fu.text="[Total Support]";fu.value="-1";fu.selected=true;U.add(fu);var acX=Gj;for(var i=0;i<acX.length;i++){var fu=document.createElement("OPTION");fu.text=acX[i];fu.value=""+i;fu.selected=false;U.add(fu);}};function aoV(fX){var i=0;for(var i=0;i<hT.length;i++){var aV=document.createElement("DIV");var jK=document.createElement("DIV");var sY=document.createElement("DIV");aV.id=fX+si+i;aV.style.position="absolute";aV.style.left=hT[i].left;aV.style.top=hT[i].top;aV.style.width=vl;aV.style.height=vL+MC+4;aV.style.visibility="visible";aV.style.borderColor="black";aV.style.borderWidth=1;aV.style.borderStyle="solid";aV.style.backgroundColor=hT[i].backgroundColor;jK.id=fX+JJ+i;jK.style.position="absolute";jK.style.fontSize="75%";jK.style.left=1;jK.style.top=1;jK.style.width=vl-2;jK.style.height=vL-2;jK.style.cursor="hand";if(eval("afV")=="onclick"){jK.onclick=SP;}else jK.onmouseover=SP;jK.treeID=fX;jK.onmouseout=aoS;jK.style.visibility="inherit";jK.style.textOverflow="ellipsis";jK.style.overflow="hidden";jK.style.color=hT[i].textColor;jK.innerHTML="<P align='center'>"+hT[i].description+"</P>";if(hT[i].children.length>0){var kS=document.createElement("IMG");kS.id=fX+Mn+i;kS.style.position="absolute";kS.style.left=vl;kS.style.top=(vL-Jx)/2;kS.style.width=Jx;kS.style.height=Jx;kS.style.borderColor="black";kS.style.borderWidth=1;kS.style.borderStyle="none";kS.style.visibility="inherit";kS.src="../App_Share/Images/minus.gif";kS.onclick=aoY;kS.treeID=fX;kS.style.fontSize="8px";kS.style.fontFamily="Verdana";kS.align="center";kS.style.align="center";kS.style.cursor="hand";aV.insertBefore(kS);}sY.id=fX+ahr+i;sY.style.position="absolute";sY.style.left=2;sY.style.top=vL;sY.style.width=vl-4;sY.style.height=MC-2;sY.style.visibility="inherit";TU=new Number(0);for(j=0;j<pV;j++){nB=ni[i*pV+j]*(vl-4)/100;sa=document.createElement("DIV");sa.style.backgroundColor=HC[j];sa.style.fontSize="0pt";sa.style.width=nB;sa.style.height=MC-2;sa.style.border="none";sa.style.position="absolute";sa.style.top=0;sa.style.left=TU;sa.style.visibility="inherit";TU+=nB;sY.insertBefore(sa);}aV.insertBefore(jK);aV.insertBefore(sY);document.all["kj"].insertBefore(aV);}SZ(fX);document.all["oWrapper"].style.overflow=afq;document.all["kj"].style.zoom="1.0";aoU(fX);};function Qu(fX,hu,Ln){hT[hu].expanded=Ln;zL=document.all[fX+Mn+hu];if(zL!=null){if(Ln)zL.src="../App_Share/Images/minus.gif";else zL.src="../App_Share/Images/plus.gif";}for(var i=0;i<hT[hu].children.length;i++){Wv=hT[hu].children[i];Vk=document.all[fX+si+Wv];if(Ln){Vk.style.visibility="visible";}else{Vk.style.visibility="hidden";Qu(fX,Wv,Ln);}}};function aoY(){zL=window.event.srcElement;var fX=zL.treeID;var Index=zL.id.substr(fX.length+Mn.length);if(hT[Index].expanded==true){hT[Index].expanded=false;Qu(fX,Index,false);}else{hT[Index].expanded=true;Qu(fX,Index,true);}SZ(fX);};function aoS(){Ao.hide();};function SP(){xE=window.event.srcElement.parentElement;if(xE==null)return;if(xE.id.indexOf(JJ)<0)return;var fX=xE.treeID;var Index=xE.id.substr(fX.length+JJ.length);Ao.document.body.innerHTML=aoT(fX,Index);var popupBody=Ao.document.body;Ao.show(0,0,400,0);var QH=popupBody.scrollHeight;Ao.hide();Ao.show(vl,vL,400,QH,event.srcElement);};function aoT(fX,hu){var oi=hT[hu];var ji;if(oi==null)return "";var afJ=afD;var Jr=afm;var sD;var uk;ji="<DIV STYLE='color:"+Jr+"; background:"+afJ+"; border:1px solid black; font-size:70%;'>";ji+="<CENTER><B>"+oi.description+"</B></CENTER><br>";ji+="<SPAN'> &nbsp;Total Cases: "+oi.support+"</SPAN><br>";ji+="<TABLE align='center' width=95% border=1><TR align = 'center'>";sD="<TD style='color:"+Jr+";' >";uk="</TD>";ji+=sD+"Value"+uk;ji+=sD+"Cases"+uk;ji+=sD+"Probability"+uk;sD="<TD width='110' style='color:"+Jr+";' >";ji+=sD+"Histogram"+uk;ji+="</TR>";for(var i=0;i<pV;i++){ji+="<TR>";sD="<TD STYLE='font-size:70%; color:"+Jr+";'>";uk="</TD>";ji+=sD+Gj[i]+uk;ji+=sD+uV[hu*pV+i]+uk;ji+=sD+zJ[hu*pV+i]+uk;ji+="<TD STYLE='font-size:70%'>";ji+="<DIV STYLE=\"font-size:0%; border:none; height:10;left:5;";ji+="width:"+ni[hu*pV+i]+";";ji+="background:\'"+HC[i]+"';";ji+="\"></DIV>";ji+="</TD>";ji+="</TR>\r\n";}ji+="</TABLE>";ji+="</DIV>";return ji;};function apN(fX){var PZ=document.all["kj"].style.zoom;document.all["kj"].style.zoom=PZ*1.25;};function apM(fX){var PZ=document.all["kj"].style.zoom;document.all["kj"].style.zoom=PZ*0.8;};function aoZ(fX){var U=document.all["_attrValues"];if(U==null){return;}var j=0;var i=0;var tc=eval(U.value);var jG=0;var kn=0;if(uV.length==0)return;if(tc<0){jG=0;kn=0;for(j=0;j<pV;j++){kn=kn+uV[j];}}else{jG=ni[tc];kn=ni[tc];for(var i=1;i<hT.length;i++){if(jG>ni[i*pV+tc]){jG=ni[i*pV+tc];}if(kn<ni[i*pV+tc]){kn=ni[i*pV+tc];}}}var qQ=KH;var xc=Lg;var qT=JS;var xj=Li;var qZ=Ke;var xY=Lq;for(var i=0;i<hT.length;i++){var aV=document.all[fX+si+i];var jK=document.all[fX+JJ+i];if(aV==null)continue;if(jK==null)continue;var hL=1.0;var RG=0;var oi=hT[i];if(tc<0)RG=oi.support;else RG=ni[i*pV+tc];if(kn==0)hL=0;else hL=RG/kn;var lo,lb,lk;var eb;var lo=Math.round(qQ+hL*(xc-qQ)-hL*150);var lb=Math.round(qT+hL*(xj-qT)-hL*150);var lk=Math.round(qZ+hL*(xY-qZ)-hL*150);var cP="#";eb=lo.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lb.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;eb=lk.toString(16);if(eb.length<2)cP=cP+"0";cP=cP+eb;var qG;if((30*lo+59*lb+11*lk)>(50*255)){qG="#000000";}else{qG="#ffffff";}aV.style.backgroundColor=cP;jK.style.color=qG;}};function getNewColor(R,G,B){};function azy(str){var left=0;for(var i=0;i<str.length;i++){if(str.substr(i,1)!=' '){left=i;break;}}var right=0;for(var i=str.length-1;i>=0;i--){if(str.substr(i,1)!=' '){right=i;break;}}var s=str.substr(0,right);return str.substr(left,s.length-left+1);};function apR(){var iG=form1.selDatabases.value.replace("'","''"),fO=form1.selMiningModels.value.replace("'","''"),uq=form1.selPredictions.value.replace("'","''"),hb=ys[fO];if(hb!="Microsoft_Decision_Trees"&&hb!="Microsoft_Clustering"){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("Only MS Decision Trees and MS Clustering can be exported to Local Cubes.")+"&icon=warning&buttons=ok","",function(popupWindowId,params){return;},"title:Export To Local Cube; width:550; height:100; autoHeight:true; zIndex:11100;");}else{var bV=escape("Please, enter the full name of the file:");var bL=escape("c:\\"+iG.replaceAll(" ","")+"_"+fO.replaceAll(" ","")+".cub");P.ShowModal("../App_Share/Popups/MessagePrompt.aspx?text="+bV+"&value="+bL+"&buttons=okcancel","",function(popupWindowId,params){try{var arr=params.split("-|-");var buttonId=arr[0],value=arr[1];oD=value;if(buttonId=="button1"){var J="";if(J.isEmpty()&&oD.isEmpty())J="Please enter a name.";if(J.isNotEmpty()){P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+J+"&icon=stop&buttons=ok","",function(popupWindowId,params){},"title:Error; width:550; height:200; autoHeight:true; zIndex:11100;");return false;}aE.Show(true);window.setTimeout("QY()",10);}return;}catch(e){aE.Show(false);}},"title:Local Cube Name; width:550; height:100; autoHeight:true; resize:left right;");}};function QY(){var ho=new ActiveXObject("ADODB.Connection");var xI=er(form1.selXmlaServers);ho.ConnectionString="Provider=MSOLAP;Data Source="+xI.replace("'","''")+";Initial Catalog="+form1.selDatabases.value.replace("'","''")+";";try{ho.Open();ho.Execute("EXPORT MINING MODEL ["+form1.selMiningModels.value.replace("'","''")+"] TO '"+oD+"'");}catch(e){aE.Show(false);P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape(e.description)+"&icon=stop&buttons=ok","",function(popupWindowId,params){},"title:Error; width:550; height:200; autoHeight:true; zIndex:11100;");return;}aE.Show(false);P.ShowModal("../App_Share/Popups/MessageBox.aspx?text="+escape("The Local Cube file: '"+oD+"' has been created.")+"&icon=success&buttons=ok","",function(popupWindowId,params){},"title:Information; width:550; height:200; autoHeight:true; zIndex:11100;");};function ase(){if(dA)dA.set_activeTabIndex(0);if(form1.selMiningModels.length<1)return;aE.Show(true);divTabPanel1.innerHTML='<div id="idReportName" class="ReportTitle" >Lift Chart</div><br><br><span style="LEFT:100px;"><b>Data Source:</b></span>&nbsp;&nbsp;<select name="ddlMiningDataSources" id="ddlMiningDataSources" onchange="javascript:Uq()" language="javascript" style="width:236pt;"></select>&nbsp;&nbsp;<span><b>Input Table:</b></span>&nbsp;&nbsp;<select name="ddlInputTables" id="ddlInputTable" onchange="javascript:Ui()" language="javascript" style="width:236pt;LEFT:100px;"></select><br /><br /><table id = "idValuesGrid" rules="all" border="1"><tr><th style="width:40px;background-color:#CADDEC;">Selected</th><th style="width:180px;background-color:#CADDEC;">Mining Structure Column</th><th style="width:220px;background-color:#CADDEC;">Input Table Column</th></tr></thead><bU id="idTbody"></bU></table><br/><br/><input id="btnLiftChart" type="button" class="button" value="Generate Lift Chart" onclick="apA();" />';Go();aoJ();};function aoJ(){if(form1.selMiningStructures.value==""||form1.selDatabases.value=="")return;var dU="DMSCHEMA_MINING_STRUCTURE_COLUMNS",hE="<STRUCTURE_NAME>"+form1.selMiningStructures.value+"</STRUCTURE_NAME><STRUCTURE_CATALOG>"+form1.selDatabases.value+"</STRUCTURE_CATALOG>",dD="<DataSourceInfo>"+lI+"</DataSourceInfo><Catalog>"+form1.selDatabases.value+"</Catalog><Format>Tabular</Format><SspropInitAppName>DM Companion</SspropInitAppName><Content>SchemaData</Content>",aU=new Xmla();dz[dz.length]=aU;aU.hN=asd;bE=aU.oS(dU,hE,dD);};function asd(bE){wo=new Array();Mj=new Array();var aD=bE.selectNodes("//root/row");var s="";var bU=idValuesGrid.tBodies[0];for(var i=0;i<aD.length;i++){var c=oQ(aD[i],"COLUMN_NAME ");wo[wo.length]=c;Mj[c]=oQ(aD[i],"CONTENT_TYPE ");auF(bU,c);}var dU="DISCOVER_XML_METADATA",hE="<DatabaseID>"+form1.selDatabases.value+"</DatabaseID><ObjectExpansion>ExpandObject</ObjectExpansion>",dD="",aU=new Xmla();dz[dz.length]=aU;aU.hN=arY;aU.oS(dU,hE,dD);};function arY(bE){form1.ddlInputTables.length=0;U=form1.ddlMiningDataSources;U.length=0;aD=bE.selectNodes("//root/row/xars:METADATA/Database/DataSources/DataSource");for(var i=0;i<aD.length;i++)U[U.length]=new Option(oQ(aD[i],"Name"),oQ(aD[i],"ID"));if(U.length>0)U.selectedIndex=0;Uq();};function Uq(){if(!form1.ddlMiningDataSources.value||form1.ddlMiningDataSources.value.trim()=="")return;var fm="Tabular",aU=new Xmla;var dB="CALL SystemOpenSchema(["+form1.ddlMiningDataSources.value+"], 'DBSCHEMA_TABLES')";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asx;aU.iZ(dB,fm,dZ);};function asx(bE){U=form1.ddlInputTables;U.length=0;var aD=bE.selectNodes("//root/row");for(var i=0;i<aD.length;i++){var abw=oQ(aD[i],"TABLE_TYPE");if(abw!="SYSTEM TABLE"&&abw!="SYSTEM VIEW"){var s="["+oQ(aD[i],"TABLE_SCHEMA")+"].["+oQ(aD[i],"TABLE_NAME")+"]";U[U.length]=new Option(s,s);}}if(U.length>0)U.selectedIndex=0;Ui();};function Ui(){if(!form1.ddlInputTables.value||form1.ddlInputTables.value.trim()=="")return;aE.Show(true);var dD="Native",aU=new Xmla;var vParts=form1.ddlInputTables.value.split('].[');var dB="CALL SystemOpenSchema(["+form1.ddlMiningDataSources.value+"], 'DBSCHEMA_COLUMNS',  , '"+vParts[0]+"]', '["+vParts[1]+"')";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asy;aU.iZ(dB,dD,dZ);};function asy(bE){wJ=new Array();var bU=idValuesGrid.tBodies[0];if(!bU){aE.Show(false);return;}var aD=bE.selectNodes("//root/row");for(var i=0;i<aD.length;i++)if(oQ(aD[i],"COLUMN_NAME ")!="Education"&&oQ(aD[i],"COLUMN_NAME ")!="Occupation")wJ[wJ.length]=oQ(aD[i],"COLUMN_NAME ");for(var i=0;i<wo.length;i++){var EZ=bU.rows[i+1].cells[0].firstChild;var bV=bU.rows[i+1].cells[1].firstChild.value;var gz=bU.rows[i+1].cells[2].firstChild;if(gz&&bV&&EZ){gz.length=0;var LC=0;gz[gz.length]=new Option("","");for(var j=0;j<wJ.length;j++){gz[gz.length]=new Option(wJ[j],wJ[j]);if(LC==0&&(wJ[j])==bV.value||wJ[j]==bV.replaceAll(" ","")){LC=gz.length-1;EZ.checked=true;}}gz.selectedIndex=LC;}}aE.Show(false);};function apA(){var CI="",Hs="";var bU=idValuesGrid.tBodies[0];if(!bU)return;aE.Show(true);var dB='CALL System.Microsoft.AnalysisServices.System.DataMining.AllOther.GenerateLiftTableUsingDatasource(\'<NewDataSet><xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="Table1"><xs:complexType><xs:sequence><xs:element name="ModelName" type="xs:string" minOccurs="0" /><xs:element name="PredictColumnName" type="xs:string" minOccurs="0" /><xs:element name="PredictColumnType" type="xs:string" minOccurs="0" /><xs:element name="PredictValue" type="xs:string" minOccurs="0" /><xs:element name="PredictMin" type="xs:string" minOccurs="0" /><xs:element name="PredictMax" type="xs:string" minOccurs="0" /><xs:element name="Query" type="xs:string" minOccurs="0" /></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema>\n';var oI=form1.selPredictions.value;for(var i=0;i<form1.selMiningModels.length;i++){{CI="";for(var k=0;k<wo.length;k++){var EZ=bU.rows[k+1].cells[0].firstChild.checked;var bV=bU.rows[k+1].cells[1].firstChild.value;var gz=bU.rows[k+1].cells[2].firstChild.value;if(gz&&bV&&EZ){if(EZ){if(!(form1.selMiningModels[i].value=="TM Naive Bayes"&&Mj[bV]=="CONTINUOUS")){if(Hs=="")Hs+=" ["+gz+"]";else Hs+=", ["+gz+"]";if(CI=="")CI+=" ["+form1.selMiningModels[i].value+"].["+bV+"] = t.["+gz+"]";else CI+=" and ["+form1.selMiningModels[i].value+"].["+bV+"] = t.["+gz+"]";}}}}dB+="<Table1><ModelName>"+form1.selMiningModels[i].value+"</ModelName><PredictColumnName>["+oI+"]</PredictColumnName><PredictColumnType>Discrete</PredictColumnType><PredictValue /><Query>SELECT FLATTENED t.["+oI.replaceAll(" ","")+"] AS _Actual, PredictProbability(["+form1.selMiningModels[i].value+"].["+oI+"]) AS _Prob, ["+form1.selMiningModels[i].value+"].["+oI+"] AS _Predicted FROM ["+form1.selMiningModels[i].value+"] PREDICTION JOIN OPENQUERY([Adventure Works DW], ''SELECT "+Hs+" FROM "+form1.ddlInputTable.value+" '') AS t ON "+CI+"</Query></Table1>\n";}}dB+="</NewDataSet>')";var dZ="",aU=new Xmla;dz[dz.length]=aU;aU.hN=asb;aU.iZ(dB,null,dZ);};function asb(bE){sX="MSLine";Iu=apD(bE);if(dA)dA.set_activeTabIndex(1);Le();aE.Show(false);};function apD(bE){var sz="";var JH=0.0;var aBm=0.0;var adh=0.0;var PB="";var bA=0;var afW=0;aD=bE.selectNodes("//root/row");GA=new Array();for(var i=0;i<aD.length;i++){sz=aL(aD[i],'ModelName');JH=gN(aD[i],'Value');if(GA[sz]&&GA[sz]<JH)GA[sz]=JH;else GA[sz]=JH;}var dh="<chart yAxisMaxValue='100' yAxisMinValue='0' palette='3' showLegend='1' caption='Data Mining Lift Chart for Mining Structure: "+form1.selMiningStructures.value+"' xAxisName='Overall Population %' yAxisName='Target Population[1] %' showValues='0'>";dh+="<categories>";var Oq="<dataset seriesName='Ideal Model'>";var QF="<dataset seriesName='Random Guess Model'>";for(var i=0;i<101;i+=10){dh+="<category label='"+i.toString()+"' />";QF+="<set displayValue ='"+i.toString()+"%' value='"+i.toString()+"' />";}QF+="</dataset>";for(var i=0;i<101;i+=20)Oq+="<set displayValue ='"+i.toString()+"%' value='"+i.toString()+"' />";Oq+="<set value='100' name='100%'/><set value='100' name='100%'/><set value='100' name='100%'/><set value='100' name='100%'/><set value='100' name='100%'/></dataset>";dh+="</categories>";dh+=Oq;dh+=QF;var num7=1.0;for(var i=0;i<aD.length;i++){sz=aL(aD[i],'ModelName');if(PB!=sz){if(PB!="")dh+="</dataset>";afW++;PB=sz;adh=0.0;num7=1.0;dh+="<dataset seriesName='"+sz+"'><set value='0'/>";bA++;}if((i+1)%10.0==0){var WU=(arO(100.0*(gN(aD[i],'Value')/GA[sz]),2)).toString();dh+="<set displayValue ='"+WU+"%' value='"+WU+"' />";}}dh+="</dataset><trendlines><vLine startValue='10' color='000000' showOnTop='1'/></trendlines><styles><definition><style name='CanvasAnim' type='animation' param='_xScale' start='0' duration='1' /></definition><application><apply toObject='Canvas' styles='CanvasAnim' /></application></styles></chart>";return dh;};function ayH(in_rgY){var TotalAttValueCAses=0.0;var TotalCases=in_rgY.length;if(TotalCases<=1){return TotalAttValueCAses;}TotalAttValueCAses=in_rgY[0];var num3=TotalAttValueCAses+in_rgY[TotalCases-1];for(var i=1;i<TotalCases;i++){TotalAttValueCAses+=in_rgY[i];}return(TotalAttValueCAses-(0.5*num3));};function auF(bU,dy){if(!bU)return;var tr=bU.insertRow(bU.rows.length);var td=tr.insertCell(tr.cells.length);td.innerHTML='<input type="checkbox" name="rdRow" id="id_'+(bU.rows.length-1).toString()+'_0" style="width:40px;" />';td=tr.insertCell(tr.cells.length);td.innerHTML='<input id="id_'+(bU.rows.length-1).toString()+'_1" type="text" value="'+dy+'" style="width:236pt;height:100%;text-align:left" disabled/>';td=tr.insertCell(tr.cells.length);td.innerHTML='<select id="id_'+(bU.rows.length-1).toString()+'_2" type="text" value="'+dy+'" style="width:236pt;height:100%;text-align:left"/>';};function arO(xp,GN){var vX=Math.pow(10,GN);return Math.round(xp*vX)/vX;}
