//File Name: master_symp.js. Created On: 6/29/05
/**
	Function to get the Language of current manual
*/
function master_symp_getManualLanguage()
{
  var dom = createDOMDocument();
  dom.async = false;
  dom.load("../data/manualInfo.xml");
  if (dom.documentElement == null)
  {
    dom.load("../../data/manualInfo.xml");
  }
  if (dom.documentElement == null)
  {
    alert("ManualInfo file could not be found!");
  }
  return dom.documentElement.selectNodes("/ManualInfo/lang").item(0).text;
}

function masterTable(code, name) {
  this.code = code;
  this.name = name;
}

masterSymp = new Array();
loadSymptomCodes();
/**
	Function to populate masterSymp array with symptom code and name from master_symp.xml file.
*/
function loadSymptomCodes()
{
  var manualLang = master_symp_getManualLanguage();
  var langTable = new Object();
  var dom = createDOMDocument();
  dom.async = false;
  var msgFile = "../data/master_symp.xml";
  dom.load("../data/master_symp.xml");
  if (dom.documentElement == null)
  {
    dom.load("../../data/master_symp.xml");
    alert("../../data/master_symp.xml");
  }
  if (dom.documentElement == null)
  {
    dom.load("../../Common/data/languages/" + manualLang + "/master_symp.xml");
    alert("../../Common/data/languages/" + manualLang + "/master_symp.xml");
  }
  if (dom.documentElement == null)
  {
    alert("Symptom code file could not be found!");
  }
  var condition="/table/row";
  var nodeList = dom.documentElement.selectNodes(condition);
  for(var i=0;i<nodeList.length;i++)
  {
    var key = nodeList.item(i).attributes.item(0).text;
    var value = nodeList.item(i).attributes.item(1).text;
    masterSymp[i]= new masterTable(key, value);
  }
}

