function JikoTahatsuData() {
	this.listCount = 0;
	this.dataYear = 0;
	this.no = null;
	this.placeName = null;
	this.yearFrom = null;
	this.yearTo = null;
	this.pointX = null;
	this.pointY = null;
	this.accidentCount = null;
	this.init = function(xml) {
		this.no = new Array();
		this.placeName = new Array();
		this.yearFrom = new Array();
		this.yearTo = new Array();
		this.pointX = new Array();
		this.pointY = new Array();
		this.accidentCount = new Array();
		for (var i = 0; i < 10; i++) {
			this.accidentCount[i] = new Array();
		}

		var headerList = xml.getElementsByTagName('requestinfo');
		for (var i = 0; i < headerList[0].childNodes.length; i++) {
			var child = headerList[0].childNodes[i];
			if (!child.tagName) {
				continue;
			}
			if (child.tagName == 'data_year') {
				if(child.firstChild) {
					this.dataYear = child.firstChild.nodeValue;
				}
			}
		}

		this.listCount = xml.getElementsByTagName('datainfo').length;
		var dataList = xml.getElementsByTagName('datainfo');

		for (i = 0; i < this.listCount; i++) {
			this.no[i] = dataList[i].getAttribute('no');
			this.yearFrom[i] = dataList[i].getAttribute('year_from');
			this.yearTo[i] = dataList[i].getAttribute('year_to');
			
			for (j = 0; j < dataList[i].childNodes.length; j++) {
				var child = dataList[i].childNodes[j];
				if (!child.tagName) {
					continue;
				}
				
				if (child.tagName == 'place_name') {
					if(child.firstChild) {
						this.placeName[i] = child.firstChild.nodeValue;
					}
				}
				if (child.tagName == 'point') {
					if(child.firstChild) {
						this.pointX[i] = child.getAttribute('x');
						this.pointY[i] = child.getAttribute('y');
					}
				}
				if (child.tagName == 'accident') {
					for (k = 0; k < child.childNodes.length; k++) {
						var child2 = child.childNodes[k];
						if (!child2.tagName) {
							continue;
						}
						if (child2.tagName == 'count') {
							var index = parseInt(child2.getAttribute('id'));
							this.accidentCount[i][index] = child2.firstChild.nodeValue;
						}
					}
				}
			}
		}

	}
	
	this.getListCount = function() {
		return this.listCount;
	}

	this.getDataYear = function() {
		return this.dataYear;
	}
	this.getNo = function() {
		return this.no;
	}
	this.getPlaceName = function() {
		return this.placeName;
	}
	this.getYearFrom = function() {
		return this.yearFrom;
	}
	this.getYearTo = function() {
		return this.yearTo;
	}
	this.getPointX = function() {
		return this.pointX;
	}
	this.getPointY = function() {
		return this.pointY;
	}
	this.getAccidentCount = function() {
		return this.accidentCount;
	}
}
