/**
  * RETS object
  */
var rets = {
	delimiter:	"\t",
	
	xml: {
		columns:	"COLUMNS",
		data:		"DATA",
		count:		"COUNT",
		delim:		"DELIMITER",
		rets:		"RETS"
	},
	
	columns: {
		listagentid:	{
			id:		15,
			text:	"Listing Agent User ID"
		},
		salesagentid:	{
			id:		16,
			text:	"Sales Agent User ID"
		},
		county:	{
			id:		17,
			text:	"County"
		},
		coordinates:	{
			id:		25,
			text:	"Map Coordinates"
		},
		totalbeds:	{
			id:		30,
			text:	"Bedrooms"
		},
		listagentname:	{
			id:		33,
			text:	"Listing Agent Name"
		},
		manualgeoflag:	{
			id:		40,
			text:	"Manual Geo Flag"
		},
		geocodehittype:	{
			id:		41,
			text:	"Geocode Hit Type"
		},
		zipcode:	{
			id:		42,
			text:	"Postal Code"
		},
		yearbuilt:	{
			id:		51,
			text:	"Year Built"
		},
		virtualtourlink:	{
			id:		57,
			text:	"Virtual Tour"
		},
		listpricepersquarefeet:	{
			id:		58,
			text:	"List Price per Square Feet"
		},
		agentwebpage:	{
			id:		71,
			text:	"Agent Web Page"
		},
		agentemail:	{
			id:		72,
			text:	"Agent Email"
		},
		agentfax:	{
			id:		73,
			text:	"Agent Fax"
		},
		agentcellphone:	{
			id:		75,
			text:	"Agent Mobile Phone"
		},
		lisentereddate:	{
			id:		98,
			text:	"Listing Entered Date"
		},
		daysonmarket:	{
			id:		101,
			text:	"Days on Market"
		},
		directions:	{
			id:		105,
			text:	"Directions"
		},
		garages:	{
			id:		138,
			text:	"Garages"
		},
		geocode:	{
			id:		140,
			text:	"Geocode"
		},
		photocount:	{
			id:		147,
			text:	"Photo Count"
		},
		listoffice:	{
			id:		158,
			text:	"Listing Office"
		},
		listofficeid:	{
			id:		159,
			text:	"Listing Office ID"
		},
		listprice:	{
			id:		161,
			text:	"List Price"
		},
		listingid: {
			id:		169,
			text:	"Listing ID"
		},
		numphotos:	{
			id:		181,
			text:	"Number of Photos"
		},
		photo:	{
			id:		198,
			text:	"Photo"
		},
		type:	{
			id:		205,
			text:	"Type"
		},
		liststatus:	{
			id:		243,
			text:	"Listing Status"
		},
		streetname:	{
			id:		245,
			text:	"Street Name"
		},
		streetnumber:	{
			id:		246,
			text:	"Street Number"
		},
		style:	{
			id:		247,
			text:	"Style"
		},
		fireplaces:	{
			id:		255,
			text:	"Fireplaces"
		},
		webposting:	{
			id:		273,
			text:	"Web Posting"
		},
		city:	{
			id:		1109,
			text:	"City"
		},
		listagentoffice:	{
			id:		1111,
			text:	"Listing Agent Office"
		},
		squarefeet:	{
			id:		1123,
			text:	"Square Footage"
		},
		totalbaths:	{
			id:		1129,
			text:	"Bathrooms"
		},
		state:	{
			id:		1147,
			text:	"State"
		}
	},
	/* Get column text by id
	 */
	getColumnText: function(id){
		for(var i in rets.columns){
			if(rets.columns[i].id == id)
				return rets.columns[i].text;
		}
		return util.NULL;
	},
	
	/* Get column value by id
	*/
	getObjectData: function(o, id){
		return o[id];
	}
}
