var selectType = "";
var aQueryString = "";
var aField = "";
var aClass = "";
var aFid = "";

//Functions for making attribute queries and zooming to highlighted features

//Input  : tName
//Action : Using the tName to define the values of the following variables
//         1. ActiveLayer
//         2. ActiveLayerType
//         3. ActiveLayerIndex
//         4. ActiveLayerID
//	   5. selectType = ActiveLayerType
//         6. tField
//Output : None
function setActiveFClass(aName,refClass)
{
  if (aName != "")
  {
     ActiveLayer = aName;
     for (i=0; i<layerCount;i++)
     {
	 if (LayerName[i] == ActiveLayer)
	 {
	     ActiveLayerType = LayerType[i];
	     ActiveLayerIndex = i;		 
	     ActiveLayerID= LayerID[i];
	     selectType = ActiveLayerType;
	     LayerVisible[i] = 1;
	     LayerIDField[i] = "#ID#";
	     //alert(LayerName[i] + "," + ActiveLayerIndex)
	  } 
     }
     aField = "FID";
     aClass = refClass;
     /*alert("ActiveLayer =" + ActiveLayer + "ActiveLayerType =" + ActiveLayerType + 
	     "ActiveLayerIndex =" + ActiveLayerIndex + "ActiveLayerID =" + ActiveLayerID +
             "aField =" + refField);*/ 
  }
 		   
}




//Query results

function ZoomTo(Id)
{
  var idx = top.map.MapFrame.selectFids[parseInt(Id)];
  top.map.MapFrame.showHighlight(idx);
}
   


