//FileName: manualinfo.js, Created On: 6/17/05. Function to populate MANUAL_INFO array from manualInfo.xml file
var MANUAL_INFO = getManualInfo("../data/manualInfo.xml");

function manual(manualId,modelNumber,model,vehicleNumber,vehicle,productCode,market,area,country,marketName,areaName,countryName,lang,pubYear,dispYear,directory,vin) {
  this.manualId		= manualId;
  this.modelNumber	= modelNumber;
  this.model		= model;
  this.vehicleNumber	= vehicleNumber;
  this.vehicle		= vehicle;
  this.productCode	= productCode;
  this.market           = market;
  this.area		= area;
  this.country          = country;
  this.marketName       = marketName;
  this.areaName		= areaName;
  this.countryName      = countryName;
  this.lang		= lang;
  this.pubYear		= pubYear;
  this.dispYear		= dispYear;
  this.directory	= directory;
  this.vin              = vin;
}

function getManualInfo(fileName)
{
  var dom = new ActiveXObject("MSXML.DOMDocument");
  dom.async = false;
  dom.load(fileName);
  var manualId = dom.documentElement.selectNodes("/ManualInfo/manualId").item(0).text;
  var modelNumber = dom.documentElement.selectNodes("/ManualInfo/modelNumber").item(0).text;
  var model = dom.documentElement.selectNodes("/ManualInfo/model").item(0).text;
  var vehicleNumber = dom.documentElement.selectNodes("/ManualInfo/vehicleNumber").item(0).text;
  var vehicle = dom.documentElement.selectNodes("/ManualInfo/vehicle").item(0).text;
  var productCode = dom.documentElement.selectNodes("/ManualInfo/productCode").item(0).text;
  var market = dom.documentElement.selectNodes("/ManualInfo/market").item(0).text;
  var area = dom.documentElement.selectNodes("/ManualInfo/area").item(0).text;
  var country = dom.documentElement.selectNodes("/ManualInfo/country").item(0).text;
  var marketName = dom.documentElement.selectNodes("/ManualInfo/marketName").item(0).text;
  var areaName = dom.documentElement.selectNodes("/ManualInfo/areaName").item(0).text;
  var countryName = dom.documentElement.selectNodes("/ManualInfo/countryName").item(0).text;
  var lang = dom.documentElement.selectNodes("/ManualInfo/lang").item(0).text;
  var pubYear = dom.documentElement.selectNodes("/ManualInfo/pubYear").item(0).text;
  var dispYear = dom.documentElement.selectNodes("/ManualInfo/dispYear").item(0).text;
  var directory = dom.documentElement.selectNodes("/ManualInfo/directory").item(0).text;
  var vin = dom.documentElement.selectNodes("/ManualInfo/vin").item(0).text;
  return new manual(manualId,modelNumber,model,vehicleNumber,vehicle,productCode,market,area,country,marketName,areaName,countryName,lang,pubYear,dispYear,directory,vin);
}

