//*************************************************************************
//Location object to store all of the results in a collection 
//*************************************************************************

function Location(id, name, address, city, stateProvince, postalCode, country, phone, distance, mqLL, mqMapIcon, greenopia){	

	this.base = MQA.Poi;
	this.base(mqLL, mqMapIcon);
	
	
	this.setKey(id);
	if(!(distance >= 0 )){
		distance = -1;
	}
	
	this.name = name;
	this.address = address;
	this.city = city;
	this.stateProvince = stateProvince;
	this.postalCode = postalCode;
	this.country = country;
	this.phone = phone;
	this.distance = distance;
	
	this.greenopia = greenopia;
	
	this.checkedFlag = false;
	
	this.disabled = false;
	
	this.nearby = false;

}



Location.prototype = new MQA.Poi(new MQA.LatLng(0,0));


Location.prototype.getId = function(){ return this.getValue('key')};
Location.prototype.getName = function(){ return this.name};
Location.prototype.getAddress = function(){ return this.address};
Location.prototype.getCity = function(){ return this.city};
Location.prototype.getStateProvince = function(){ return this.stateProvince};
Location.prototype.getPostalCode = function(){ return this.postalCode};
Location.prototype.getCountry = function(){ return this.country};
Location.prototype.getPhone = function(){ return this.phone};
Location.prototype.getDistance = function(){ return this.distance};

Location.prototype.getGreenopia = function(){ return this.greenopia};
Location.prototype.setGreenopia = function(green){ this.greenopia = green};

Location.prototype.getTarating = function(){ return this.tarating};
Location.prototype.setTarating = function(rating){ this.tarating = rating};

Location.prototype.getDisabled = function(){ return this.disabled};
Location.prototype.setDisabled = function(disable){ this.disabled = disable};

Location.prototype.getNearby = function(){ return this.nearby};
Location.prototype.setNearby = function(near){ this.nearby = near};
