// JavaScript Document

function IHistory()
{
	this.AXL = new Array(); 		// String of AXL
	this.imageUrls = new Array() 	// Sting of URLS
	this.envelopes = new Array() 	// Sting of envelopes
	this.currentIndex = -1;
	this.maxHistory = 20;
	
}

function cloneObject(obj) {
    for (i in obj) {
		
        this[i] = obj[i];
    }
	
	return this;
}

function IAttributeQuery() {
	this.featureLimit = 25;		//integer
	this.subFields;				//string (seperate by space)
	this.layerId;				//integer
	this.where;					//string
	this.selectFeatures; 		// boolean
}

function IPoint() {
	this.x;	 	//spatial X
	this.y;		//spatial Y
}

function IFullExtent() {
	this.minx;		//integer
	this.maxx;		//integer
	this.miny;		//integer
	this.maxy;		//integer
}

//read only. (contains the current Envelope of the map)
function IEnvelope() {
	this.minx ;	//integer
	this.maxx ;	//integer
	this.miny ;	//integer
	this.maxy ;	//integer
}


//should be used when needed to make a new Envelope.
function tempEnvelope() {
	this.minx ;	//integer
	this.maxx ;	//integer
	this.miny ;	//integer
	this.maxy ;	//integer
}





function IPolygonRenderer() {
	this.usefill = true;
	this.fillcolor = "91,182,220";
	this.filltype = "solid";
	this.filltransparency = 0.5;
	this.boundarycolor ="255,255,255";
	this.boundarywidth = 2;
	this.boundarytype = "solid"; //"solid | dash | dot | dash_dot | dash_dot_dot"  [solid]

}
//defines the properties  for the point to be added on the map
function IPointRenderer() {
	this.color; 		// ="0,0,0 - 255,255,255"  [0,0,0] 
	this.outline;		// ="0,0,0 - 255,255,255" 
	this.type;			// ="circle | triangle | square | cross | star"  [circle] 
	this.width;			// ="1 - NNN"  [3] 
	this.antialiasing;	// ="true | false"  [false] 
	this.overlap;		// ="true | false"  [true] 
	this.transparency;	// ="0.0 - 1.0"  [1.0] 
}



//Define to make a selection on a Map. (not tested yet)  (added to IMap Object)
function ISpatialSelection() {
	this.layerId
	this.selectionEnvelope;
	this.selectionProperties = IPolygonRenderer;
}

//adds a polygon around the where value = foobar (tested on parcels) (added to IMap Object)
function IQuerySelection() {
	this.layerId
	this.where;
	this.selectionProperties = IPolygonRenderer
}
//adds a point on the where value = foobar (added to IMap Object)
function IPointSelection() {
	this.layerId
	this.where;
	this.selectionProperties = IPointRenderer
}


function ISearch() {
	this.layerId;
	this.subSearch;
}

function ISubSearch() {
	this.firstField;
	this.secondField;
	this.firstFieldLength;
	this.secondFieldLength;
	this.firstFieldSuggest = false;
	this.secondFieldSuggest = false; 
}

//NOT YET BUILT IN.
function ISearchTitle() {
	this.title;
	this.tip;
}

//Read and Set object for getting info on the active layer.
function IActiveLayer() {
	this.displayName;
	this.id;
	this.type;
	this.visible;
}


//defines the mail merge information
function IMailMerge() {
	this.layerId;		//the layer ID that will be buffered (usually Parcel layer)
	this.state = "New York";
	this.fields; 	//use a | delimiter.
	this.headings; 	//use a | delimiter. (* paralell with .fileds)

	
	//read only. (what we are buffering around.)
	this.objectId;
}


//to make a buffer..
function IBuffer() { 
	this.getValuesFromlayerId;
	this.distance;
	this.units = 'feet';
	this.where;
	
	
	this.bufferLayerId;
	
	//color
	this.fillcolor="100,100,100" 
	this.filltype="solid" 
	this.filltransparency="0.5"
}




function IZoomTo() {

	this.layerId;
	this.fieldName
	this.fieldValue;
	
}


