var relationStrength = new Array();
relationStrength["convolution"] = 2;
relationStrength["transformation"] = 2;
relationStrength["linear transformation"] = 3;
relationStrength["special case"] = 4;
relationStrength["conditioning"] = 5;
relationStrength["central limit theorem"] = 3;
relationStrength["conditional distribution"] = 5;
relationStrength["parameter limit"] = 6;
relationStrength["inverse stochastic process"] = 4;
relationStrength["location-scale transformation"] = 3;
relationStrength["scale transformation"] = 2;
relationStrength["nonlinear transformation"] = 3;
relationStrength["mixture and transformation"] = 2;
relationStrength["limiting distribution"] = 3;
relationStrength["limiting conditional distribution"] = 4;
relationStrength["limiting distribution"] = 2;
relationStrength["location-scale transformation"] = 3;
relationStrength["tbd"] = 3;
relationStrength["mixture"] = 4;
relationStrength["limiting distribution with respect to parameter"] = 5;
relationStrength["inverse stochastic process"] = 4;
relationStrength["stochastic process"] = 3;
relationStrength["compound poisson transformation"] = 2;
var group = new Array();
group["continuous"] = 2;
group["discrete"] = 3;
/*************** Ajax request seperated for IE and others **************/
function createAjaxRequest(){
var xmlHttp;
try{
// use the ActiveX control for IE5.x and IE6.
xmlHttp = new ActiveXObject('MSXML2.XMLHTTP.3.0');
}catch (e){
try{
xmlHttp = new ActiveXObject('Msxml2.XMLHTTP'); // Internet Explorer 6+
}catch(e){
try{
xmlHttp = new ActiveXObject('Microsoft.XMLHTTP'); // Internet Explorer 5.5
}catch(e2){
try{
xmlHttp = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
}catch(e3){
xmlHttp = false;
}
}
}
}
return xmlHttp;
}
/***** Logging ******/
var globalDebugFlag = false;
function log(message){
if(!globalDebugFlag)
return;
if(!log.window_ || log.window_.closed){
var win = window.open("", "Logger", "width=400,height=200,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no,toolbar=no");
if (!win) return;
var doc = win.document;
doc.write("
Debug Log" +
"");
doc.close();
log.window_ = win;
}
var logLine = log.window_.document.createElement("div");
logLine.appendChild(log.window_.document.createTextNode(message));
log.window_.document.body.appendChild(logLine);
}
/****** Get URL parameters ******/
function getURLParameters(){
var sURL = window.document.URL.toString();
if (sURL.indexOf("?") > 0){
var arrParams = sURL.split("?");
urlParamString = arrParams[1];
var arrURLParams = arrParams[1].split("&");
for (var i=0;i: "+
trim(currLevel2Prop.childNodes[0].nodeValue);
}else{
nameText = nameText+ ', '+trim(currLevel2Prop.childNodes[0].nodeValue);
}
}else if(currLevel2Prop.nodeName == 'type'){
if(typeText == ''){
typeText = ''+trim(currLevel2Prop.nodeName)+": "+
trim(currLevel2Prop.childNodes[0].nodeValue);
}else{
typeText = typeText+ ', '+trim(currLevel2Prop.childNodes[0].nodeValue);
}
typeFlag = true;
}else{
if(nameFlag){
html.push(''+nameText+'
');
html.push("");
}
nameFlag = false;
if(typeFlag){
html.push(''+typeText+'
');
html.push("");
}
typeFlag = false;
html.push(''+trim(currLevel2Prop.nodeName)+": "+
trim(currLevel2Prop.childNodes[0].nodeValue)+'
');
html.push("");
}
} else k_corr++;
currLevel2Prop=currLevel2Prop.nextSibling;
} catch (err) {
html.push("Empty tag" + currLevel2Prop.nodeValue + "
");
}
}
if(typeFlag){ //handling the border case when type occurs last
html.push(''+typeText+'
');
html.push("");
}
}
}
catch(e){
console.log(e.message);
}
return new Array(html.join(''), referenceName);
}
/*************** Function to traverse the XML during initialization and search **************/
function traverseXML(searchFlag, text, XML_Objects, nodes, edges, references, nodesArray, referenceArray, connectivity){
var currentNodeIndex=0;
var currentEdgeIndex=0;
var currentReferencesIndex=0;
if(searchFlag){
//remove extra white spaces first
var originalText = text.split(" ");
var splitText = text.toLowerCase().split(" ");
var newText = '';
for(var splitArray =0; splitArray 1)
totalExtraNodes = toNodes.length-1;
else if(fromNodes.length > 1)
totalExtraNodes = fromNodes.length-1;
for(var temp =0; temp1){
for(var extraNodes=0; extraNodes1){
for(var extraNodes=0; extraNodes 0){
for(var extraNodes =0; extraNodes 0){
edges[currentEdgeIndex].extra = totalEdges+","+totalExtraNodes;
extraNodeIterator++;
}
totalEdges = totalEdges+ totalExtraNodes;
}
currentEdgeIndex++;
} else j_corr++;
currLevel1Prop=currLevel1Prop.nextSibling;
}
// end for relations
}
//
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Need a new way of parsing Distributome.bib and generating Array of Reference Objects
//
/***** OLD: This is the old way of managing references using Distributome.XML
else if (Level1Prop[i] && Level1Prop[i].nodeName == 'reference' & !searchFlag) { // for references, citations
for (var j=0;j