// Namespace implementation
var com = function() {
    return {
        js: {},
        
        namespace: function( sNameSpace ) {
            if (!sNameSpace || !sNameSpace.length) {
                return null;
            }

            var levels = sNameSpace.split(".");
            var currentNS = com;
            for (var i=(levels[0] == "com") ? 1 : 0; i<levels.length; ++i) {
                currentNS[levels[i]] = currentNS[levels[i]] || {};
                currentNS = currentNS[levels[i]];
            }

            return currentNS;
        }
    };
} ();
   
// Reflection Class
Reflection = function() {
}

Reflection.prototype.isArray = function(obj) {
  var className = this.getClassName(obj);
  if (className.toLowerCase()=="array") return true;
  return false;
}

Reflection.prototype.getModifier = function(memberName) {
  // if member name begins with "_" or "m_" or "private" then member is private.
  if ((memberName.substr(0,1) == '_') || (memberName.substr(0,2) == "m_") || (memberName.toLowerCase().indexOf("private") > -1))
    return "private";
  else
    return "public";
}

Reflection.prototype.getConstructor = function(obj) {
  return obj.constructor;
}

Reflection.prototype.getClassName = function(obj) {
  return this.getMethodName(this.getConstructor(obj));
}

Reflection.prototype.getMethodName = function(fn) {
  try {
   var fnName = fn.toString();
   fnName = fnName.substring(fnName.indexOf("function")+8, fnName.indexOf('(')).replace(/ /g,'');
   return fnName;
  } catch (e) {
   return "unknownType";
  }
}

Reflection.prototype.getMethods = function(obj, protection) {
  var fns=[];
  switch (protection) {
   case "private":
    for (var elm in obj) {
     if (this.getModifier(elm)=="private") if (typeof(obj[elm])=="function") fns[fns.length]=obj[elm];
    }
   break;
   case "public":
    for (var elm in obj) {
     if (this.getModifier(elm)=="public") if (typeof(obj[elm])=="function") fns[fns.length]=obj[elm];
    }
   break;
   default:
    alert("Unknown protection level: "+protection);
   break;  
  }
  return fns;
}

Reflection.prototype.getMethod = function(obj, name) {
  for (var elm in obj) {
   if ((elm==name) && (typeof(obj[elm])=="function")) return obj[elm];
  }
  return null;
}

Reflection.prototype.getParameterNames = function(fn) {
  var fnStripped = fn.toString().replace(/\t*| */g,'');
  fnStripped = fnStripped.substr(fnStripped.indexOf("(")+1);
  fnStripped = fnStripped.substring(0,fnStripped.indexOf(')'));
  return fnStripped.split(',');
}

Reflection.prototype.getFieldValues = function(obj,protection) {
  var flds=[];
  switch (protection) {
   case "private":
    for (var elm in obj) if (this.getModifier(elm)=="private") if (typeof(obj[elm])!="function") flds[flds.length]=obj[elm];
   break;
   case "public":
    for (var elm in obj) if (this.getModifier(elm)=="public") if (typeof(obj[elm])!="function") flds[flds.length]=obj[elm];
   break;
   default:
    alert("Unknown protection level: "+protection);
   break;  
  }
  return flds;
}

Reflection.prototype.getFieldNames = function(obj, protection) {
  var flds=[];
  switch (protection) {
   case "private":
    for (var elm in obj) if (this.getModifier(elm)=="private") if (typeof(obj[elm])!="function") flds[flds.length]=elm;
   break;
   case "public":
    for (var elm in obj) if (this.getModifier(elm)=="public") if (typeof(obj[elm])!="function") flds[flds.length]=elm;
   break;
   default:
    alert("Unknown protection level: "+protection);
   break;  
  }
  return flds;
}

// Conversion Factory Class.
XmlObjectConversionFactory = function() {
  this.reflectionFactory = new Reflection();
}

XmlObjectConversionFactory.prototype.getObjectArray = function(xmlData, objectClassType, tagName) {
  var nodes = xmlData.getElementsByTagName(tagName);
  var results = new Array(nodes.length);
  for(var i = 0; i < nodes.length; i++) {
    if (objectClassType != null)
      results[i] = new objectClassType(nodes[i]);
    else
      results[i] = nodes[i].firstChild.nodeValue;
  }
  
  return results;
}

XmlObjectConversionFactory.prototype.getObject = function(xmlData, objectClassType, tagName) {
  var nodes = xmlData.getElementsByTagName(tagName);
  var result = null;
  if( nodes.length > 0) {
    result = new objectClassType(nodes[0]);
  }
  
  return result;
}

XmlObjectConversionFactory.prototype.convertArrayObjectToXml = function(objArray) {
  var xmlStringArray = new Array();
  xmlStringArray.push("<ARRAY_OF" + objArray[0]._className + ">");
  for (var i = 0; i < objArray.length; i++) {
    xmlStringArray.push(this.convertObjectToXml(objArray[i]));
  }
  xmlStringArray.push("<\/ARRAY_OF" + objArray[0]._className + ">");
  return xmlStringArray.join("");
}

XmlObjectConversionFactory.prototype.convertObjectToXml = function(obj) {
  var xmlStringArray = new Array();
  var fieldNames = this.reflectionFactory.getFieldNames(obj, "public");
  xmlStringArray.push("<" + obj._className + ">");
  for (var i = 0; i < fieldNames.length; i++) {
    var fieldValue = obj[fieldNames[i]];
    if ((fieldValue != null) && (fieldValue != "")) {
      xmlStringArray.push("<" + fieldNames[i] + ">");
      xmlStringArray.push(fieldValue);
      xmlStringArray.push("<\/" + fieldNames[i] + ">");
    }
  }
  xmlStringArray.push("<\/" + obj._className + ">");
  return xmlStringArray.join("");
}


XmlObjectConversionFactory.prototype.toXml = function(obj) {
  var xmlStringArray = new Array();
  if (obj != null) {
    xmlStringArray.push("<?xml version=\"1.0\" encoding=\"iso-8859-9\" ?> ");
    if (this.reflectionFactory.isArray(obj)) {
      if (obj.length > 0) {
        xmlStringArray.push(this.convertArrayObjectToXml(obj));
      }
    }
    else {
      xmlStringArray.push(this.convertObjectToXml(obj));
    }
  }
  
  return xmlStringArray.join("");
}

XmlObjectConversionFactory.prototype.toTable = function(obj, pageMessages) {
  var table = document.createElement("table");
  table.border="1";
  var tbody = document.createElement("tbody");
  if (obj != null) {
    if (this.reflectionFactory.isArray(obj)) {
      if (obj.length > 0) {
        var fieldNames = this.reflectionFactory.getFieldNames(obj[0], "public");
        var row = this.createTableHeaderRow(fieldNames, pageMessages);
        tbody.appendChild(row);
        for (var i = 0; i < obj.length; i++) {
          var fieldValues = this.reflectionFactory.getFieldValues(obj[i], "public");
          row = this.createTableDataRow(fieldValues);
          tbody.appendChild(row);
        }
      }
      else {
        tbody.appendChild(this.createNoRecordFoundRow(pageMessages));
      }
    }
    else {
      var fieldNames = this.reflectionFactory.getFieldNames(obj, "public");
      var row = this.createTableHeaderRow(fieldNames, pageMessages);
      tbody.appendChild(row);
      var fieldValues = this.reflectionFactory.getFieldValues(obj, "public");
      row = this.createTableDataRow(fieldValues);
      tbody.appendChild(row);
    }
  }
  else {
    tbody.appendChild(this.createNoRecordFoundRow(pageMessages));
  }

  table.appendChild(tbody);
  
  return table;
}

XmlObjectConversionFactory.prototype.createNoRecordFoundRow = function(pageMessages) {
  var row = document.createElement("tr");

  var cell = document.createElement("td");
  var text = document.createTextNode(pageMessages["no_record_found"]);
  cell.appendChild(text);
  row.appendChild(cell);
  
  return row;
}

XmlObjectConversionFactory.prototype.createTableDataRow = function(fieldValues) {
  var row = document.createElement("tr");
  for (var i = 0; i < fieldValues.length; i++) {
    cell = document.createElement("td");
    text = document.createTextNode(fieldValues[i]);
    cell.appendChild(text);
    row.appendChild(cell);
  }
  
  return row;
}

XmlObjectConversionFactory.prototype.createTableHeaderRow = function(fieldNames, pageMessages) { 
  var row = document.createElement("tr");
  for (var i = 0; i < fieldNames.length; i++) {
    cell = document.createElement("td");
    text = document.createTextNode(pageMessages[fieldNames[i]]);
    cell.appendChild(text);
    row.appendChild(cell);
  }
  
  return row;
}

var converterFactory = new XmlObjectConversionFactory();
var commonNamespace = com.namespace("com.infotech.services.entity.common");
var loggingNamespace = com.namespace("com.infotech.services.entity.logging");
var autoReportManagerNamespace = com.namespace("com.infotech.services.business.AutoReportManager");
/* 
LightDataMobile Class Definition.
*/
commonNamespace.LightDataMobile = function(lightDataMobileNode) {
  this._mobileId = lightDataMobileNode.getElementsByTagName("mobile_id")[0].firstChild.nodeValue;
  this._alias = lightDataMobileNode.getElementsByTagName("alias")[0].firstChild.nodeValue;
  return this;
}

commonNamespace.LightDataMobile.prototype.getMobileId = function() {
  return this._mobileId;
}

commonNamespace.LightDataMobile.prototype.setMobileId = function(mobileId) {
  this._mobileId = mobileId;
}

commonNamespace.LightDataMobile.prototype.getAlias = function() {
  return this._alias;
}

commonNamespace.LightDataMobile.prototype.setAlias = function(alias) {
  this._alias = alias;
}

/*
DataEventType Class Definition
*/
commonNamespace.DataEventType = function(dataEventTypeNode) {
  this._eventCode = dataEventTypeNode.getElementsByTagName("event_code")[0].firstChild.nodeValue;
  this._eventDescription = dataEventTypeNode.getElementsByTagName("event_description")[0].firstChild.nodeValue;
  
  return this;
}

commonNamespace.DataEventType.prototype.getEventCode = function() {
  return this._eventCode;
}

commonNamespace.DataEventType.prototype.setEventCode = function(eventCode) {
  this._eventCode = eventCode;
}

commonNamespace.DataEventType.prototype.getEventDescription = function() {
  return this._eventDescription;
}

commonNamespace.DataEventType.prototype.setEventDescription = function(eventDescription) {
  this._eventDescription = eventDescription;
}

/*
DataMobileTelemetry Class Definition
*/
commonNamespace.DataMobileTelemetry = function (dataMobileTelemetryNode) {
  this._ioParamName = dataMobileTelemetryNode.getElementsByTagName("io_param_name")[0].firstChild.nodeValue;
  this._ioParamSeq = dataMobileTelemetryNode.getElementsByTagName("io_param_seq")[0].firstChild.nodeValue;
  this._ioLabel = dataMobileTelemetryNode.getElementsByTagName("io_label")[0].firstChild.nodeValue;
  
  return this;
}

commonNamespace.DataMobileTelemetry.prototype.getIoParamName = function() {
  return this._ioParamName;
}

commonNamespace.DataMobileTelemetry.prototype.setIoParamName = function(ioParamName) {
  this._ioParamName = ioParamName;
}

commonNamespace.DataMobileTelemetry.prototype.getIoParamSeq = function() {
  return this._ioParamSeq;
}

commonNamespace.DataMobileTelemetry.prototype.setIoParamSeq = function(ioParamSeq) {
  this._ioParamSeq = ioParamSeq;
}

commonNamespace.DataMobileTelemetry.prototype.getIoLabel = function() {
  return this._ioLabel;
}

commonNamespace.DataMobileTelemetry.prototype.setIoLabel = function(ioLabel) {
  this._ioLabel = ioLabel;
}

/*
LightDataGroup Class Definition
*/
commonNamespace.LightDataGroup = function(lightDataGroupNode) {
  this._groupname = lightDataGroupNode.getElementsByTagName("groupname")[0].firstChild.nodeValue;
  
  return this;
}

commonNamespace.LightDataGroup.prototype.getGroupname = function() {
  return this._groupname;
}

commonNamespace.LightDataGroup.prototype.setGroupname = function(groupname) {
  this._groupname = groupname;
}

/*
CustomMarker Class Definition
*/
commonNamespace.DataMarker = function(dataMarkerNode) {
  this._url = dataMarkerNode.getElementsByTagName("url")[0].firstChild.nodeValue;
  this._name = dataMarkerNode.getElementsByTagName("name")[0].firstChild.nodeValue;
  
  return this;
}

commonNamespace.DataMarker.prototype.getUrl = function() {
  return this._url;
}

commonNamespace.DataMarker.prototype.setUrl = function(url) {
  this._url = url;
}

commonNamespace.DataMarker.prototype.getName = function() {
  return this._name;
}

commonNamespace.DataMarker.prototype.setName = function(name) {
  this._name = name;
}

/*
DataDistance Class Definition
*/
commonNamespace.DataDistance = function(dataDistanceNode) {
  this._value = dataDistanceNode.getElementsByTagName("value")[0].firstChild.nodeValue;
  
  return this;
}

commonNamespace.DataDistance.prototype.getValue = function() {
  return this._value;
}

commonNamespace.DataDistance.prototype.setValue = function(value) {
  this._value = value;
}

/*
MapInfoResult Class Definition
*/
commonNamespace.MapInfoResult = function(mapInfoResultNode) {
  var xmlData = mapInfoResultNode.getElementsByTagName("data_layer_infos");
  if(xmlData.length > 0) {
    this._dataLayerInfos = converterFactory.getObjectArray(xmlData[0], com.infotech.services.entity.common.DataLayerInfo, "data_layer_info");
  }
  else
    this._dataLayerInfos = null;

  xmlData = mapInfoResultNode.getElementsByTagName("data_mobiles");
  if(xmlData.length > 0)
    this._dataPositions = converterFactory.getObjectArray(xmlData[0], com.infotech.services.entity.common.DataPosition, "data_mobile");
  else
    this._dataPositions = null;
  
  return this;
}

commonNamespace.MapInfoResult.prototype.getDataLayerInfos = function() {
  return this._dataLayerInfos;
}

commonNamespace.MapInfoResult.prototype.setDataLayerInfos = function(dataLayerInfos) {
  this._dataLayerInfos = dataLayerInfos;
}

commonNamespace.MapInfoResult.prototype.getDataPositions = function() {
  return this._dataPositions;
}

commonNamespace.MapInfoResult.prototype.setDataPositions = function(dataPositions) {
  this._dataPositions = dataPositions;
}

/*
DataLayerInfo Class Definition
*/
commonNamespace.DataLayerInfo = function(dataLayerInfoNode) {
  var node = dataLayerInfoNode.getElementsByTagName("name")[0].firstChild;
  if(node != null)
    this._name = node.nodeValue;
  else 
    this._name = null;
  var node = dataLayerInfoNode.getElementsByTagName("value")[0].firstChild;
  if(node != null)
    this._value = node.nodeValue;
  else 
    this._value = null;
  
  return this;
}

commonNamespace.DataLayerInfo.prototype.getName = function() {
  return this._name;
}

commonNamespace.DataLayerInfo.prototype.setName = function(name) {
  this._name = name;
}

commonNamespace.DataLayerInfo.prototype.getValue = function() {
  return this._value;
}

commonNamespace.DataLayerInfo.prototype.setValue = function(value) {
  this._value = value;
}

/*
DataPosition Class Definition
*/
commonNamespace.DataPosition = function(dataPositionNode) {
  var node = dataPositionNode.getElementsByTagName("alias")[0].firstChild;
  if(node != null)
    this._alias = node.nodeValue;
  else 
    this._alias = null;
    
  node = dataPositionNode.getElementsByTagName("time")[0].firstChild;
  if(node != null)
    this._time = node.nodeValue;
  else 
    this._time = null;
    
  node = dataPositionNode.getElementsByTagName("speed")[0].firstChild;
  if(node != null)
    this._speed = node.nodeValue;
  else 
    this._speed = null;
    
  node = dataPositionNode.getElementsByTagName("position")[0].firstChild;
  if(node != null)
    this._position = node.nodeValue;
  else 
    this._position = null;

  node = dataPositionNode.getElementsByTagName("custpoint")[0].firstChild;
  if(node != null)
    this._custpoint = node.nodeValue;
  else 
    this._custpoint = null;

  return this;
}

commonNamespace.DataPosition.prototype.getAlias = function() {
  return this._alias;
}

commonNamespace.DataPosition.prototype.setAlias = function(alias) {
  this._alias = alias;
}

commonNamespace.DataPosition.prototype.getTime = function() {
  return this._time;
}

commonNamespace.DataPosition.prototype.setTime = function(time) {
  this._time = time;
}

commonNamespace.DataPosition.prototype.getSpeed = function() {
  return this._speed;
}

commonNamespace.DataPosition.prototype.setSpeed = function(speed) {
  this._speed = speed;
}

commonNamespace.DataPosition.prototype.getPosition = function() {
  return this._position;
}

commonNamespace.DataPosition.prototype.setPosition = function(position) {
  this._custpoint = position;
}

commonNamespace.DataPosition.prototype.getCustpoint = function() {
  return this._custpoint;
}

commonNamespace.DataPosition.prototype.setCustpoint = function(custpoint) {
  this._position = custpoint;
}

/* 
DataRoute Class Definition.
*/
commonNamespace.DataRoute = function(dataRouteNode) {
  this._id = dataRouteNode.getElementsByTagName("id")[0].firstChild.nodeValue;
  this._routeName = dataRouteNode.getElementsByTagName("route_name")[0].firstChild.nodeValue;
  
  return this;
}

commonNamespace.DataRoute.prototype.getId = function() {
  return this._id;
}

commonNamespace.DataRoute.prototype.setId = function(id) {
  this._id = id;
}

commonNamespace.DataRoute.prototype.getRouteName = function() {
  return this._routeName;
}

commonNamespace.DataRoute.prototype.setRouteName = function(routeName) {
  this._routeName = routeName;
}

/*
DataLogRouteUpload Object Definition.
*/
loggingNamespace.DataLogRouteUpload = function(dataLogRouteUploadNode) {
  this.rowno = "";
  this.company = "";
  this.username = "";
  this.timeStamp = "";
  this.fileName = "";
  this.routeId = "";
  this.routeName = "";
  this.explanation = "";
  this.status = 0;
  this._className = "com.infotech.services.entity.logging.DataLogRouteUpload";
  
  if (dataLogRouteUploadNode != null) {
    for (var fieldName in this) {
    if (dataLogRouteUploadNode.getElementsByTagName(fieldName)[0] != null)
      if (dataLogRouteUploadNode.getElementsByTagName(fieldName)[0].firstChild != null)
        this[fieldName] = dataLogRouteUploadNode.getElementsByTagName(fieldName)[0].firstChild.nodeValue;
    }
  }
}

/*
CompanyAutoReportConf Object Definition
*/
commonNamespace.CompanyAutoReportConf = function(dataCompanyAutoReportConfNode) {
  this.company = ""; 
  this.description = "";
  this.autoRptmail = 0; 
  this.autoRptType = 1; 
  this.companyEmail = "";
  this.companyEmail2 = "";
  this.companyEmail3 = "";
  this.companyEmail4 = "";
  this.companyEmail5 = "";
  this._className = "com.infotech.services.entity.common.CompanyAutoReportConf";
  
  if (dataCompanyAutoReportConfNode != null) {
    for (var fieldName in this) {
    if (dataCompanyAutoReportConfNode.getElementsByTagName(fieldName)[0] != null)
      if (dataCompanyAutoReportConfNode.getElementsByTagName(fieldName)[0].firstChild != null)
        this[fieldName] = dataCompanyAutoReportConfNode.getElementsByTagName(fieldName)[0].firstChild.nodeValue;
    }
  }
}

/*
AutoReportEntry Object Definition
*/
commonNamespace.AutoReportEntry = function(dataAutoReportEntryNode) {
  this.company = "";
  this.rowno = 0;
  this.autoRptmail = 0;
  this.reportName = "";
  this.reportNameEng = "";
  this.resimAdi = "";
  this.autoRptmailEnabled = 0;
  this._className = "com.infotech.services.entity.common.AutoReportEntry";
  
  if (dataAutoReportEntryNode != null) {
    for (var fieldName in this) {
    if (dataAutoReportEntryNode.getElementsByTagName(fieldName)[0] != null)
      if (dataAutoReportEntryNode.getElementsByTagName(fieldName)[0].firstChild != null)
        this[fieldName] = dataAutoReportEntryNode.getElementsByTagName(fieldName)[0].firstChild.nodeValue;
    }
  }
}

/*
UpdateResult
*/
autoReportManagerNamespace.UpdateResult = function(dataUpdateResultNode) {
  this.resultCode = "";
  this.resultDetail = "";
  this._className = "com.infotech.services.business.AutoReportManager.UpdateResult";
  if (dataUpdateResultNode != null) {
    for (var fieldName in this) {
    if (dataUpdateResultNode.getElementsByTagName(fieldName)[0] != null)
      if (dataUpdateResultNode.getElementsByTagName(fieldName)[0].firstChild != null)
        this[fieldName] = dataUpdateResultNode.getElementsByTagName(fieldName)[0].firstChild.nodeValue;
    }
  }
}

DataMobile = function(node) {
  this.mobile = "";
  this.alias = "";
  this._className = "DataMobile";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataEventCode = function(node) {
  this.event_description = "";
  this.event_code = "";
  this._className = "DataEventCode";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataMobileGroup = function(node) {
  this.groupname = "";
  this._className = "DataMobileGroup";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataCompany = function(node) {
  this.company = "";
  this._className = "DataCompany";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataMessages = function(node) {
  this.values = "";
  this._className = "DataMessages";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataUser = function(node) {
  this.username = "";
  this._className = "DataUser";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataTelemetryType = function(node) {
  this.ioParamName = "";
  this.ioParamSeq = "";
  this.ioLabel = "";
  this.mobile = "";
  this._className = "DataTelemetryType";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataMobileGroup = function(node) {
  this.username = "";
  this.groupname = "";
  this.grouporder = "";
  this._className = "DataMobileGroup";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataRecordCount = function(node) {
  this.record_count = "";
  this._className = "DataRecordCount";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

DataAddressComponent = function(node) {
  this.id = "";
  this.name = "";
  this.coords = "";  
  this.componentType = "";
  this._className = "DataAddressComponent";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}
  
MapImageInfo = function(node) {
  this.url = "";
  this._className = "MapImageInfo";
  if (node != null) {
    for (var fieldName in this) {
      if (node.getElementsByTagName(fieldName)[0] != null)
        if (node.getElementsByTagName(fieldName)[0].firstChild != null)
          this[fieldName] = factory.decodeTurkishChars(node.getElementsByTagName(fieldName)[0].firstChild.nodeValue);
    }
  }
}

