//<script> *******************************************
//-2- variable with measurement disclaimer
		var DISCLAIMER_MEASURE = "Any measurements on this map are provided as a " +
														  "quick reference and do not reflect any recorded legal " +
														  "documentation. Please contact the El Paso County " +
													  	  "Assessor Mapping Office to obtain official legal measurements.";
//END -2-
		var mHeight;
		var mWidth;
		var minx;
		var miny;
		var maxx;
		var maxy;
		var newminx;
		var newminy;
		var newmaxx;
		var newmaxy;
		var thePoint= new Array();
		var startX;
		var startY;
		var reloadTimer=0;
		var dragging, ixOffset, iyOffset, xStart, xEnd, yStart, yEnd;
// Global vars
	// horizontal offset
var hspc = 0;
	// vertical offset
var vspc = 0;
//********************************************		

function buttonClick(whichOne, newMap) {
  if (whichOne.toLowerCase()=="overviewmap") { //toggle the overview map on/off
	  theOVElement=parent.MapFrame.document.getElementById("theOVMap");
	  theOVImg=parent.MapFrame.document.images["imgOVMap"];
	  ovIsShown=(theOVElement.style.visibility.toLowerCase()=="visible");
      var onOrOff="visible";
	  if (ovIsShown) {
	      onOrOff="hidden";
	  }
	  theOVElement.style.visibility=onOrOff;
	  theOVImg.style.visibility=onOrOff;
	  parent.MapFrame.document.MapForm.ShowOVMap.value=onOrOff;
      return true;
  }
  if (whichOne.toLowerCase()=="help") { //toggle the help display
  	  theHelpElement=parent.ResultsFrame.document.getElementById("HelpDiv");
	  helpIsShown=(theHelpElement.style.visibility.toLowerCase()=="visible");
	  if (helpIsShown) {
	      clearHelp();
		  clearResults();
		  theHelpElement.style.visibility="hidden";
		  theHelpElement.style.height="100px";
	  }else{
          showHelp();
		  theHelpElement.style.visibility="visible";
		  theResultsDIV=parent.ResultsFrame.document.getElementById("ResultsDIV");
		  theMapSheetLink=parent.ResultsFrame.document.getElementById("MapSheetLink");
	      btnViewDetails=parent.ResultsFrame.document.SearchForm.ViewDetails;
          theResultsDIV.style.visibility="hidden";
	      theMapSheetLink.style.visibility="hidden";
	      btnViewDetails.style.visibility="hidden";	  
	  }
      return true;
  }
    if ((whichOne.toLowerCase()=="clearmap") || (whichOne.toLowerCase()=="zoomall")){ //clear the results display
	   	theHelpElement=parent.ResultsFrame.document.getElementById("HelpDiv");
		theResultsDIV=parent.ResultsFrame.document.getElementById("ResultsDIV");
		theMapSheetLink=parent.ResultsFrame.document.getElementById("MapSheetLink");
	    btnViewDetails=parent.ResultsFrame.document.SearchForm.ViewDetails;
		
		theHelpElement.style.visibility="hidden";
		theHelpElement.style.height="100px";
	
		clearResults();	
		clearHelp();		
        theResultsDIV.style.visibility="hidden";
		theResultsDIV.style.height="100px";
	    theMapSheetLink.style.visibility="hidden";
	    btnViewDetails.style.visibility="hidden";
	}
    if (newMap=="true") { showWaitImg(); } //if a new map is being created, turn on the "loading map" image
    parent.MapFrame.document.MapForm.DoWhat.value=whichOne;	
    setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//make sure the "Parcel Not Found" label is hidden
    theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
	theNotFoundDIV.style.visibility="hidden";	 
    parent.MapFrame.document.MapForm.submit();
    return true;
}

function setMouseCursor() {
	//set the appropriate mouse cursor for the current tool (zoom,pan,measure,info)
    theTool=parent.ToolFrame.document.MapTools.CurrentTool.value.toLowerCase();
	theMapImg=parent.MapFrame.document.images["imgMap"];
	switch (theTool) {
        //110503: changed to use default cursor styles instead of custom images	
        case "measure":
		theMapImg.style.cursor="crosshair"; //url('images/measure.cur')";
		break
	case "pan":
		theMapImg.style.cursor="pointer"; //url('images/pan.cur')";
		break
	case "zoomin":
		theMapImg.style.cursor="crosshair"; //url('images/zoomin.cur')";
		break
	case "zoomout":
		theMapImg.style.cursor="crosshair"; //url('images/zoomout.cur')";
		break
	case "info":
		theMapImg.style.cursor="crosshair"; //url('images/info.cur')";
		break
	default:
	    theMapImg.style.cursor="crosshair";
		break
	}
	return;
}

function toggleMeasurePanel(turnOn) {
   theMeasureElement=parent.MapFrame.document.getElementById("measureResult");
   theFromImg=parent.MapFrame.document.getElementById("M_FROM");
   if (turnOn=="true") {
      theMeasureElement.style.visibility="visible";
      parent.MapFrame.document.MapForm.ShowMeasure.value="visible";   
	  if (parent.MapFrame.document.MapForm.mSegment.value>0) { theFromImg.style.visibility="visible"; }	
   }else{
      theMeasureElement.style.visibility="hidden";
      parent.MapFrame.document.MapForm.ShowMeasure.value="hidden";
      theFromImg.style.visibility="hidden";	  
   }
   return true;
}
//*2-show/hide area measure panel
function toggleMeasureAreaPanel(turnOn) {
   theMeasureAreaElement=parent.MapFrame.document.getElementById("measureAreaResult");
   if (turnOn=="true") {
      theMeasureAreaElement.style.visibility="visible";
      parent.MapFrame.document.MapForm.ShowAreaMeasure.value="visible";
      //also clear the coordinate values in the hidden controls
      parent.MapFrame.document.MapForm.AreaCoordsX.value="";
	  parent.MapFrame.document.MapForm.AreaCoordsY.value="";
   }else{
      theMeasureAreaElement.style.visibility="hidden";
      parent.MapFrame.document.MapForm.ShowAreaMeasure.value="hidden";
   }
   return true;
}
		
function downTool(e) { 
//this function runs for every mouse down event on the map image
//don't respond to the mouse click if a map is in the process of loading
   if (document.images["imgMap"].style.cursor=="wait") { return; }   
   isRight=isRightClick(e);
   if (isRight) {return;}
   getMapWidth();
   getMapHeight();
   switch(parent.ToolFrame.document.MapTools.CurrentTool.value.toLowerCase())
        {
		 case 'zoomin':
		    getStartPoint(e);
			startZoomBox(e);
			return false;
			break
		  case 'zoomout':
		    startZoomBox(e);
			//doZoomOut(e);
			return false;
			break
		  case 'pan':
			startPan(e);
			return false;
			break
		  }
}

// handle all mousemove events for map image
function getMouse(e){
//don't respond to the mouse move event if a map is in the process of loading
   if (document.images["imgMap"].style.cursor=="wait") { return; }   
   isRight=isRightClick(e);
   if (isRight) {return;}
	var mouseString = "";
	window.status="";
	getImageXY(e);
	switch(parent.ToolFrame.document.MapTools.CurrentTool.value.toLowerCase()) {
	case 'zoomin':
		if ((mouseX>mWidth) || (mouseY>mHeight) || (mouseX<=0) ||(mouseY<=0)) {
			stopZoomBox (e);
		} else {
			if (zooming) {
				x2=mouseX;
				y2=mouseY;
				setClip();
			}
		}
		return false;
		break	
	case 'zoomout':
		if ( (mouseX<=15) || (mouseY<=15)) {
		    stopZoomBox (e);
		} else {
			if (zooming) {
				x2=mouseX;
				y2=mouseY;
				setClip();
			}
		}
		return false;
		break
	case 'pan':
		panMouse(e);
		return false;
		break
	}
	return true;
}
		
// handle all mouseup events for map image
function chkMouseUp(e){
//don't respond to the mouse click if a map is in the process of loading
   if (document.images["imgMap"].style.cursor=="wait") { return; }   
   isRight=isRightClick(e);
   if (isRight) {return;}
//    if (e.button > 1) {return false;} //right-button(3)=show pop-up menu
	switch(parent.ToolFrame.document.MapTools.CurrentTool.value.toLowerCase()) {
	case 'zoomin':
		stopZoomBox();
		stopZoomIn(e);
		return false;
		break		
	case 'zoomout':
		stopZoomBox();
		stopZoomOut(e);
		return false;
		break
	case 'pan':
		stopPan(e);
		return false;
		break
    case 'info':
		 //don't allow an "info" to occur beyond the scale at which parcels can be viewed
		 theScaleFactor=document.MapForm.BarIncrement.value;
		 if (theScaleFactor > 7) {
		    alert("Please zoom in (until parcels are visible on the map) before using the 'Info' tool.");
			return;
		 }
		 doID(e);
		 return false;
		 break
	case 'measure':
		//don't allow a linear measurement to occur beyond the scale at which parcels can be viewed
		 theScaleFactor=document.MapForm.BarIncrement.value;
		 if (theScaleFactor > 7) {
		    alert("Please zoom in closer (until parcels are visible on the map) before using the 'Measure' tool.");
			return;
		 }
		doMeasure(e);
		return false;
		break	
	case 'measurearea':
		//don't allow an area measurement to occur beyond the scale at which parcels can be viewed
		 theScaleFactor=document.MapForm.BarIncrement.value;
		 if (theScaleFactor > 7) {
		    alert("Please zoom in closer (until parcels are visible on the map) before using the 'Measure Area' tool.");
			return;
		 }
		doMeasureArea(e);
		return false;
		break			
	}
	
	return true;
}

function getStartPoint(e) {
 //  isNS6= (!document.all && document.getElementById) ? true : false;
   var displayX;
   var displayY;
	if (isNav) {
		displayX=e.pageX;
		displayY=e.pageY;
	} else {
		displayX=event.clientX + document.body.scrollLeft;
		displayY=event.clientY + document.body.scrollTop;
	}

	startMapPoint = getMapXY (displayX, displayY); //	getMapXY(xIn,yIn)
	startX= startMapPoint[0];
	startY= startMapPoint[1];
}

function stopZoomIn(e) {
	//get the stopping point for the zoom box (map coords)
   isNS6= (!document.all && document.getElementById) ? true : false;
   var displayX;
   var displayY;
	if (isNav) {
		displayX=e.pageX;
		displayY=e.pageY;
	} else {
		displayX=event.clientX + document.body.scrollLeft;
		displayY=event.clientY + document.body.scrollTop;
	}
    if ((displayX>mWidth) || (displayY>mHeight)) { return; }
	stopMapPoint = getMapXY (displayX, displayY); //	getMapXY(xIn,yIn)
	stopX= stopMapPoint[0];
	stopY= stopMapPoint[1];
	//find the min/max coords ...
	minx = Math.min(startX, stopX);
	maxx = Math.max(startX, stopX);
	miny = Math.min(startY, stopY);
	maxy = Math.max(startY, stopY);
//if the mouse click was a single point, zoom in 10%, otherwise zoom to the box defined
    if (((maxx-minx) < 20) && ((maxy-miny) < 20)) {
       //set the action of the form before submitting
        parent.MapFrame.document.MapForm.DoWhat.value="zoomin10";	
		parent.MapFrame.document.MapForm.IDXCoord.value=startX;
	    parent.MapFrame.document.MapForm.IDYCoord.value=startY;
	}else{
	   //record the min/max x and y
	    writeExtentVars();	
       //set the action of the form before submitting
        parent.MapFrame.document.MapForm.DoWhat.value="zoomin";
	}
    setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//make sure the "Parcel Not Found" label is hidden
    theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
	theNotFoundDIV.style.visibility="hidden";	
	parent.MapFrame.document.MapForm.submit();
//show the "processing" image until the new map is ready
    showWaitImg();
	return true;
}

function stopZoomOut(e) {
	// uses zoombox global vars: zleft, zright, ztop, zbottom
	//   uses current extent global vars: minx, maxx, miny, maxy
	//   all other variables are local 
	var xDistance, yDistance, xCenter, yCenter, mxCenter, myCenter;
	var zxCenter, zyCenter, mxShift, myShift, zWidth, zHeight;
	var xScale, yScale, aRatioC, aRatioZ, DistanceNew, mScale;
	var xShift, yShift;
	//get the current map extent
	setExtentVars(); //read min and max coords from the post form
	//calculate the size of the map
	xDistance = Math.abs(minx-maxx);  //difference in x coords (map units)
	yDistance = Math.abs(miny-maxy);  //difference in y coords (map units)
	//calculate center of extents
	xCenter = (maxx + minx)/2;  // (map units)
	yCenter = (maxy + miny)/2;  // (map units)
	// calc center of map
	mxCenter = mWidth/2;  // (pixels)
	myCenter = mHeight/2;  // (pixels)
	// calc center of zoombox in pixels
	zxCenter = (zleft + zright)/2;  // (pixels)
	zyCenter = (ztop + zbottom)/2;   // (pixels)
	// calc shift of center from zoombox to center of image
	mxShift = mxCenter - zxCenter;   // (pixels)
	myShift = myCenter - zyCenter;   // (pixels)
	zWidth = Math.abs(zright-zleft); //width of zoombox (pixels)
	zHeight = Math.abs(ztop-zbottom); //height of zoombox (pixels)
	xScale = mWidth/zWidth; // scale old extents to new extents using width
	yScale = mHeight/zHeight; // scale old extents to new extents using height
	// fit extents inside zoombox	
	//calc aspect ratios of extents and zoombox
	aRatioC = xDistance/yDistance;  // unitless
	aRatioZ = zWidth/zHeight;       // unitless
	// choose to fit zoombox to height or width
	if(aRatioZ < aRatioC) {
		DistanceNew = yScale * yDistance; // (map units)
		mScale = DistanceNew/mHeight; // scale pixels to new map units (map units/pixel)
	}else{
		DistanceNew = xScale * xDistance;  // (map units)
		mScale = DistanceNew/mWidth; // scale pixels to new map units (map units/pixel)
	}
	// pan extents to position of zoombox
	xShift = mScale * mxShift; // (map units)
	yShift = mScale * myShift; // (map units)
	// finally new extents
	minx = xCenter - (DistanceNew/2)+ xShift;  // (map units)
	maxx = xCenter + (DistanceNew/2)+ xShift;  // (map units)
	miny = yCenter - (DistanceNew/2)- yShift;  // (map units)
	maxy = yCenter + (DistanceNew/2)- yShift;  // (map units)
//if the mouse click was a single point, zoom in 10%, otherwise zoom to the box defined
    if ((zWidth < 10) && (zHeight < 10)) {
	   //get the point that was clicked (center of the zoom box)
	   var centerMapPoint;
	   centerMapPoint = getMapXY (zxCenter, zyCenter);
       mapX= centerMapPoint[0];
       mapY= centerMapPoint[1];
	   parent.MapFrame.document.MapForm.IDXCoord.value=mapX;
	   parent.MapFrame.document.MapForm.IDYCoord.value=mapY;
       //set the action of the form before submitting
        parent.MapFrame.document.MapForm.DoWhat.value="zoomout10";	
	}else{
        writeExtentVars();
       //set the action of the form before submitting: pass the page constant to the server
        parent.MapFrame.document.MapForm.DoWhat.value="zoomout";
	}
    setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//make sure the "Parcel Not Found" label is hidden
    theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
	theNotFoundDIV.style.visibility="hidden";	
	parent.MapFrame.document.MapForm.submit();
//show the "processing" image until the new map is ready
    showWaitImg();
	return true;
}

function startPan(e){
	dragging = true;
	// remember where the pan started from
    isNS6= (!document.all && document.getElementById) ? true : false;
     if (isNS6) {
       mouseX = e.clientX;
  	   mouseY = e.clientY;
     }else{
      mouseX = event.offsetX; //e.x
      mouseY = event.offsetY; //e.y
    }		
	xStart = mouseX;
	yStart = mouseY;
} 

// move map image with mouse
function panMouse(e) {
if (!dragging) {return false;}
   isNS6= (!document.all && document.getElementById) ? true : false;
   if (isNS6) {
       xEnd = e.clientX;
	   yEnd = e.clientY;
   }else{
       xEnd = event.x  //e.offsetX; 
	   yEnd = event.y  //e.offsetY;
   }	
	var xMove =xEnd-xStart; // x2-x1;
	var yMove =yEnd-yStart; // y2-y1;
	var cLeft = -xMove;
	var cTop = -yMove;
	var cRight = mWidth;
	var cBottom = mHeight;
	if (xMove>0) {
		cLeft = 0;
		cRight = mWidth - xMove;
	}
	if (yMove>0) {
		cTop = 0;
		cBottom = mHeight - yMove;
	}
	clipImgLayer("theMap",cLeft,cTop,cRight,cBottom);
	moveLayer("theMap",xMove+hspc,yMove+vspc);
	return false;
}

function clipImgLayer(name, clipleft, cliptop, clipright, clipbottom) {		
	  var layer = getLayer(name);		
	  if (isNS4) {
		    layer.clip.left   = clipleft;
		    layer.clip.top    = cliptop;
		    layer.clip.right  = clipright;
		    layer.clip.bottom = clipbottom;
	  } else {
		    layer.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';
	  }
}

// move layer to x,y
function moveLayer(name, x, y) {		
  	var layer = getLayer(name);		
  	if (isNS4)
    	layer.moveTo(x, y);
  	//if (document.all) {
	 else {
    	layer.left = x + "px";
   		layer.top  = y + "px";
  	}
}

function stopPan(e){
	var xDistance, yDistance, pixelX, xOffset, yOffset;
	// stop the dragging	
	dragging = false;
	// get current mouse coordinates
   isNS6= (!document.all && document.getElementById) ? true : false;
   if (isNS6) {
       xEnd = e.clientX;
	   yEnd = e.clientY;
   }else{
       xEnd = event.x; //e.offsetX; //e.x
	   yEnd = event.y; //e.offsetY; //e.y
   }	
	//get the current map extent
	setExtentVars(); //read min and max coords from the post form
	//calculate new current extents
	//calculate the size of the map
	xDistance = Math.abs(minx-maxx);  //difference in x coords (map units)
	yDistance = Math.abs(miny-maxy);  //difference in y coords (map units)
	// calculate a single pixel size in map units
	pixelX = xDistance / mWidth;  // note scale is NOT the same in the x and y directions
	pixelY = yDistance / mHeight;
	// get the magnitude and direction of the pan movement
	ixOffset = xEnd - xStart;
	iyOffset = yStart - yEnd;  // notice the change in positive direction of the y axis
	// convert pan offsets from pixels to map units 
	xOffset = pixelX * ixOffset;
	yOffset = pixelX * iyOffset;
	// finally calculate the new extents
	minx = minx - xOffset;
	maxx = maxx - xOffset;
	maxy = maxy - yOffset;
	miny = miny - yOffset;
	writeExtentVars();	
//set the action of the form before submitting: pass the page constant to the server
    parent.MapFrame.document.MapForm.DoWhat.value="pan";
    setMapSizeToDoc(); //call a function to resize the map image if the document has been resized	
//make sure the "Parcel Not Found" label is hidden
    theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
	theNotFoundDIV.style.visibility="hidden";
//show the "processing" image until the new map is ready
    showWaitImg();
	parent.MapFrame.document.MapForm.submit();
	return true;
}	

function doID(e) { 
//get the map point that was clicked, the active layer and the ID tolerance ...
   isNS6= (!document.all && document.getElementById) ? true : false;
   var displayX;
   var displayY;
	if (isNav) {
		displayX=e.pageX;
		displayY=e.pageY;
	} else {
		displayX=event.clientX + document.body.scrollLeft;
		displayY=event.clientY + document.body.scrollTop;
	}
	theMapPoint = getMapXY (displayX, displayY); //	getMapXY(xIn,yIn)
	pointX= theMapPoint[0];
	pointY= theMapPoint[1];
    parent.MapFrame.document.MapForm.IDXCoord.value=pointX;
    parent.MapFrame.document.MapForm.IDYCoord.value=pointY;		
    parent.MapFrame.document.MapForm.DoWhat.value="info";
    setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//clear the help (if it's there), shrink the frame
	clearHelp();
    theHelpElement.style.visibility="hidden";
	theHelpElement.style.height="100px";    
//make sure the "Parcel Not Found" label is hidden
    theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
	theNotFoundDIV.style.visibility="hidden";	
	parent.MapFrame.document.MapForm.submit();	
//show the "retrieving data" image
    showWaitImg("true");	
	return true;
}

function doMeasure(e) {
   isNS6= (!document.all && document.getElementById) ? true : false;
   var displayX;
   var displayY;
   if (isNS6) {
       displayX = e.clientX;
	   displayY = e.clientY;
   }else{
       displayX = e.offsetX;
	   displayY = e.offsetY;
   }
   theMapPoint = getMapXY (displayX, displayY);
   mapX= theMapPoint[0];
   mapY= theMapPoint[1];

   theFromImg=parent.MapFrame.document.getElementById("M_FROM");
   haveFrom=(theFromImg.style.visibility=="visible");
  
   if (!haveFrom)  {
      //1st click: put the start marker on the map ("from" point)
       parent.MapFrame.document.MapForm.mXfrom.value=mapX;
       parent.MapFrame.document.MapForm.mYfrom.value=mapY;	
	   theFromImg.style.left=(displayX - 5);
	   theFromImg.style.top=(displayY - 5);
	   theFromImg.style.visibility="visible";
	   return false;
   }else{
       //finishing a measurement segment
       parent.MapFrame.document.MapForm.mXto.value=mapX;
       parent.MapFrame.document.MapForm.mYto.value=mapY;		
	   theFromImg.style.visibility="hidden";	   
	   //set the pixel values for the marker (when the map is refreshed)
	   parent.MapFrame.document.MapForm.pixFromX.value=(displayX-5);
	   parent.MapFrame.document.MapForm.pixFromY.value=(displayY-5);
       parent.MapFrame.document.MapForm.DoWhat.value="Measure";
       setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//make sure the "Parcel Not Found" label is hidden
       theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
       theNotFoundDIV.style.visibility="hidden";	   	
	   parent.MapFrame.document.MapForm.submit();	
   //show the "retrieving data" image
       showWaitImg("true");	
	}
	return true;
}
//*2 - function to store mouse clicks that define a polygon boundary
function doMeasureArea(e) {
   isNS6= (!document.all && document.getElementById) ? true : false;
   var displayX;
   var displayY;
   if (isNS6) {
       displayX = e.clientX;
	   displayY = e.clientY;
   }else{
       displayX = e.offsetX;
	   displayY = e.offsetY;
   }
//dynamically write a DIV element into the page to show the location clicked
   theParentDIV=parent.MapFrame.document.getElementById("MEASUREAREAPOINTS");
   theVertices=theParentDIV.innerHTML;
   theVertices=theVertices+"<DIV style='left:"+(displayX-2)+"; top:"+(displayY)+"; position:absolute;'><IMG SRC='images/vertex.gif'></DIV>"
//alert(theVertices);
   //slow down adding the marker so double-clicks on the image can be captured
   window.setTimeout("addVertex(theVertices);", 300); //theParentDIV.innerHTML= theVertices;

   theMapPoint = getMapXY (displayX, displayY);
   mapX= theMapPoint[0];
   mapY= theMapPoint[1];
//get the existing vertex coords (if any)   
//manage x and y coords as separate arrays
   coordsX=parent.MapFrame.document.MapForm.AreaCoordsX.value;
   coordsY=parent.MapFrame.document.MapForm.AreaCoordsY.value;   
//see if the map already has a measure polygon
	hasPoly=parent.MapFrame.document.MapForm.HasMeasurePoly.value;
	if (hasPoly=="true") {
		coordsX="";
		coordsY="";
		parent.MapFrame.document.MapForm.HasMeasurePoly.value="false";
	}
	//--tack on the new coords (coord list format="x1|x2|xn|...")   
   if (coordsX=="") { //first pair, don't add the separating "|"
		coordsX=mapX;
		coordsY=mapY;
	}else{ //subsequent coord pairs, add the "|" to separate
		 coordsX=coordsX+"|"+mapX;
		 coordsY=coordsY+"|"+mapY;
	}
//add the new coord to the existing list of coords (hidden form control)
	parent.MapFrame.document.MapForm.AreaCoordsX.value = coordsX;
	parent.MapFrame.document.MapForm.AreaCoordsY.value = coordsY;
}
//*2 - code to add a new vertex marker when measuring area
function addVertex(theVertices) {
   theParentDIV=parent.MapFrame.document.getElementById("MEASUREAREAPOINTS");
   theParentDIV.innerHTML=theVertices;
   return;
}
//*2 - this event fires when the image is double-clicked
//     - if the measure area tool is active, submit the form to complete the measurement
function checkAreaDone() { 
//if any tool besides measure area is active, ignore the double-click
    theTool=parent.ToolFrame.document.MapTools.CurrentTool.value.toLowerCase();
	if (theTool != "measurearea") { return; }
//poly coords are stored on the form, just need to submit it ...
//indicate that the users wants an area measure ...
       parent.MapFrame.document.MapForm.DoWhat.value="MeasureArea";
       setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//make sure the "Parcel Not Found" label is hidden
       theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
       theNotFoundDIV.style.visibility="hidden";	 
//set a flag that indicates the polygon is complete       
       parent.MapFrame.document.MapForm.HasMeasurePoly.value="true";  	
	   parent.MapFrame.document.MapForm.submit();	
   //show the "retrieving data" image
       showWaitImg("true");	
	return true;
}

function getMapXY(xIn,yIn) {
	setExtentVars();
	var thePoint = new Array();
	var xDistance = Math.abs(minx-maxx);  //difference in x coords (map units)
	var iWidth = mWidth; //width of image
	var eLeft = minx; //left coord of map extent (map units)
	var yDistance = Math.abs(miny-maxy); //difference in y coords (map units)
	var iHeight = mHeight; // height of image
	var eBottom = miny; ////left coord of map extent (map units)
	mouseX = xIn;
	mouseY = iHeight - yIn;
	pixelX = xDistance / iWidth;  //map units per pixel in the x direction
	thePoint[0] = pixelX * mouseX + eLeft; //location of x coord (map units)
	pixelY = yDistance / iHeight;  //map units per pixel in the y direction
	thePoint[1] = pixelY * mouseY + eBottom;  //location of y coord (map units)
	return thePoint;
}

function setMapSizeToDoc() {
        isNS6= (!document.all && document.getElementById) ? true : false;
        if (isNS6) {
		   docW=parent.MapFrame.innerWidth;
		   docH=parent.MapFrame.innerHeight;
		}else{
		   docW=parent.MapFrame.document.body.clientWidth;
		   docH=parent.MapFrame.document.body.clientHeight;
		}
		theMapImg=parent.MapFrame.document.images["imgMap"];
		parent.MapFrame.document.MapForm.MapH.value=docH;
		parent.MapFrame.document.MapForm.MapW.value=docW;
        return true;
}

//get the Map Image width (pixels)
function getMapWidth () {
	if (! document.images["imgMap"]) {
	   mWidth=600;
	}else{
		  var mapFrameWidth = document.images["imgMap"].width;
		mWidth = mapFrameWidth;
	}
	return true;
}
//get the Map Image height (pixels)
function getMapHeight () {
	if (! document.images["imgMap"]) {
	   mHeight=400;
	}else{
		  var mapFrameHeight = document.images["imgMap"].height;
		  mHeight = mapFrameHeight;
	}
	return true;
}		
	
function setExtentVars() {
	//get the current map extent
	minx=Number(document.MapForm.NewMinX.value);
	maxx=Number(document.MapForm.NewMaxX.value);
	miny=Number(document.MapForm.NewMinY.value);
	maxy=Number(document.MapForm.NewMaxY.value);
	return true;
}

function writeExtentVars () {
   parent.MapFrame.document.MapForm.NewMinX.value=minx;
   parent.MapFrame.document.MapForm.NewMaxX.value=maxx;
   parent.MapFrame.document.MapForm.NewMinY.value=miny;	
   parent.MapFrame.document.MapForm.NewMaxY.value=maxy;
   return true;
}

function showWaitImg(isData) {
  if (isData=="true") {
      waitImg=parent.MapFrame.document.getElementById("WAITDATAIMG");
  }else{
      waitImg=parent.MapFrame.document.getElementById("WAITIMG");
  }
  waitImg.style.visibility="visible";
//also set the mouse cursor to the wait cursor ("hourglass")
// ---for the map image ...
   isNS6 = (!document.all && document.getElementById) ? true : false;
   if (!isNS6) {parent.MapFrame.document.images["imgMap"].style.cursor="wait";}
//  ---for the map tools ...
   parent.ToolFrame.document.MapTools.style.cursor="wait";
//   ---for the "zoom bar" ...
   parent.PanWestFrame.document.ZoomBar.style.cursor="wait";
  return true;
}

function hideWaitImg() {
	waitDataImg=parent.MapFrame.document.getElementById("WAITDATAIMG");
    waitImg=parent.MapFrame.document.getElementById("WAITIMG");

	waitDataImg.style.visibility="hidden";
	waitImg.style.visibility="hidden";
//call a function to set the appropriate mouse cursor for the map image
	setMouseCursor();
//reset the other cursors to their default ...
//   ---map tools ...
	parent.ToolFrame.document.MapTools.style.cursor="default";
//   ---zoom bar
    parent.PanWestFrame.document.ZoomBar.style.cursor="pointer";
	return true;
} 

function checkMeasureFrom() {
    if (parent.MapFrame.document.MapForm.pixFromX.value == "0") { return false;}
	theFromImg=parent.MapFrame.document.getElementById("M_FROM");
	theFromImg.style.left=parent.MapFrame.document.MapForm.pixFromX.value;
	theFromImg.style.top=parent.MapFrame.document.MapForm.pixFromY.value;
    theMPanelOn=parent.MapFrame.document.getElementById("measureResult").style.visibility=="visible";	
	if (theMPanelOn) {
	    theFromImg.style.visibility="visible";
    }else{
	   theFromImg.style.visibility="hidden";
	}
	checkMeasureUnits();
	return true;
}

function checkMeasureUnits() {
//see if the measure results should be shown in another unit
//first, get the required HTML controls
    theUnitCombo=parent.MapFrame.document.MapForm.cboMeasureUnits;
	theSegLabel=parent.MapFrame.document.getElementById("lblMSegment");
	theTotalLabel=parent.MapFrame.document.getElementById("lblMTotal");
//get the desired measurement unit, the segment and total legnth in meters
	theUnit=theUnitCombo.value;
        mSegmentFeet=parent.MapFrame.document.MapForm.mSegment.value;
	mTotalFeet=parent.MapFrame.document.MapForm.mTotal.value;
//create variables to contain the new values
    var mConvertTotal;
	var mConvertSegment;
//convert the measurement in feet to the desired unit, put the new value in the labels
	switch (theUnit.toLowerCase()){
	case "meters":
	    mConvertTotal=(mTotalFeet * 0.3048 );
	    mConvertSegment=(mSegmentFeet * 0.3048 );
	    break
	case "feet":
	    mConvertTotal=mTotalFeet;
        mConvertSegment=mSegmentFeet;
	    break
	case "kilometers":
	    mConvertTotal=(mTotalFeet  * 0.0003048 );
	    mConvertSegment=(mSegmentFeet * 0.0003048 );
	    break	
	case "miles":
	    mConvertTotal=(mTotalFeet / 5280);
	    mConvertSegment=(mSegmentFeet /5280);
	    break	
	}
	theTotalLabel.innerHTML=formatNumber(mConvertTotal);
	theSegLabel.innerHTML=formatNumber(mConvertSegment);
	return true;
}
//*2 - handle changes in the areal measurement units
function checkAreaMeasureUnits() {
//see if the measure results should be shown in another unit
//first, get the required HTML controls
    theUnitCombo=parent.MapFrame.document.MapForm.cboAreaUnits;
	theTotalLabel=parent.MapFrame.document.getElementById("lblAreaResult");
//get the desired measurement unit
	theUnit=theUnitCombo.value;
//get the area measure in square feet (stored in a hidden form control)	
	mTotalSQFT=parent.MapFrame.document.MapForm.mAreaSQFT.value;
	if (mTotalSQFT=="") { return; }
//create variable to contain the converted value
    var mConvertTotal;
//convert the measurement in square feet to the desired unit, put the new value in the label
	switch (theUnit.toLowerCase()){
	case "sqm":
	    mConvertTotal=(mTotalSQFT * 0.092903);
	    break
	case "sqft":
	    mConvertTotal=mTotalSQFT; //no conversion required (raw units are SQFT)
	    break
	case "hectares":
	    mConvertTotal=(mTotalSQFT * 0.0000092903);
	    break	
	case "acres":
	    mConvertTotal=(mTotalSQFT * 0.0000229568 );
	    break	
	}
	theTotalLabel.innerHTML=formatNumber(mConvertTotal);
	return true;
}

function clearMeasure() {
//this function will clear the measure results box and remove measurements (lines) from the map display
//first, get the required HTML controls
	theSegLabel=parent.MapFrame.document.getElementById("lblMSegment");
	theTotalLabel=parent.MapFrame.document.getElementById("lblMTotal");
//clear the measurement values from the labels
   theSegLabel.innerHTML="0.0";
   theTotalLabel.innerHTML="0.0";
//if the measurement is already 0, don't make a new map
   if (parent.MapFrame.document.MapForm.mSegment.value == "0") {return false;}
//reset the segment and total lengths to 0
    parent.MapFrame.document.MapForm.mSegment.value = "0";
	parent.MapFrame.document.MapForm.mTotal.value = "0";   
//now, submit a request to the server to refresh the map (remove measurement lines)
//since a new map is being created, turn on the "loading map" image
   showWaitImg(); 
   parent.MapFrame.document.MapForm.DoWhat.value="CLEARMAP";
   setMapSizeToDoc(); //call a function to resize the map image if the document has been resized
//make sure the "Parcel Not Found" label is hidden
   theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
   theNotFoundDIV.style.visibility="hidden";    
   parent.MapFrame.document.MapForm.submit();
   
   return true;	
} 

function formatNumber(theNum) {
//this function will take a number and format it with commas (123456=123,456)
   theNum=Math.round(theNum*100)/100; //round to 2 decimal places
   //get the decimal portion
   theNumString=theNum.toString();
   thePointIdx=theNumString.indexOf(".",0);
   theLen=theNumString.length;
   theDec=theNumString.substring(thePointIdx, theLen );
   theWhole=theNumString.substring(0, thePointIdx);
   //format the whole number with commas
   var numString=theWhole.split("");
   var formatNum="";
   var pos=0;
   for(var i=numString.length-1;i>=0;i--) {
      pos++;
      formatNum=numString[i]+formatNum;
	  if(pos%3==0&&i!=0-1) {
         formatNum=","+formatNum;
      }
    }
//clean up the formatted number a bit
    formatNum=formatNum.replace(/^,/, "");
    formatNum=formatNum.replace(/,$/, "");
//tack the decimal portion back on to the number
    formatNum=formatNum+theDec;
    return(formatNum);
}
function writePrintPage() {
//this function will create a printable version of the current map display (including info for the currently searched parcel)
//get the URL for the printable map image (610w x 520h)
    var printMapURL=parent.MapFrame.document.MapForm.printMapImgURL.value;
	var schedNum=parent.MapFrame.document.MapForm.SchedNum.value;
	var parcelAddr=parent.MapFrame.document.MapForm.Location.value;
	var parcelArea=parent.MapFrame.document.MapForm.Acres.value;
	var parcelZone=parent.MapFrame.document.MapForm.Zone.value;
    var ownerName=parent.MapFrame.document.MapForm.Owner.value;
    var ownerAddr=parent.MapFrame.document.MapForm.Address.value;
	 
	var Win1 = open("","PrintPage");
	Win1.document.writeln('<html><meta http-equiv="Content-Type" content="text/html;"><head>');
	Win1.document.writeln('	<title>Print Map</title>');
	Win1.document.writeln('</head>');
//--
	Win1.document.writeln('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	Win1.document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">');
	Win1.document.writeln('  <tr align="center" valign="top"> ');
	Win1.document.writeln('    <td>');
	Win1.document.writeln('      <table width="620" border="1" cellspacing="0" cellpadding="2" height="750">');
	Win1.document.writeln('        <tr align="center" valign="middle"> ');
	Win1.document.writeln('          <td>');
	Win1.document.writeln('            <table width="100%" border="1" cellspacing="4" cellpadding="0" height="750">');
	Win1.document.writeln('              <tr valign="top"> ');
	Win1.document.writeln('                <td height="120"> ');
	Win1.document.writeln('                  <p><font face="Arial, Helvetica, sans-serif" size="2"><b><font size="4">El ');
	Win1.document.writeln('                    Paso County Schedule Information</font><br>');
	Win1.document.writeln('                    Schedule Number:&nbsp;&nbsp;' + schedNum + '<br>');
	Win1.document.writeln('                    Schedule Address:&nbsp;&nbsp;' + parcelAddr + '<br>');
	Win1.document.writeln('                    Schedule Owner:&nbsp;&nbsp;' + ownerName + '<br>');
	Win1.document.writeln('                    Zoned:&nbsp;&nbsp;' + parcelZone + '<br>');
	Win1.document.writeln('                    Area:&nbsp;&nbsp;' + parcelArea + '</b></font></p>');
	Win1.document.writeln('                  <p><b><font face="Arial, Helvetica, sans-serif" size="2">Owner ');
	Win1.document.writeln('                    Mailing Address:&nbsp;&nbsp;' + ownerAddr + '</font></b></p>');
	Win1.document.writeln('                </td>');
	Win1.document.writeln('              </tr>');
	Win1.document.writeln('              <tr align="center" valign="middle"> ');
	Win1.document.writeln('                <td height="530"><IMG SRC="' + printMapURL + '" WIDTH=610 HEIGHT=520 HSPACE=0 VSPACE=0 BORDER=0 ALT=""></td>');
	Win1.document.writeln('              </tr>');
	Win1.document.writeln('              <tr> ');
	Win1.document.writeln('                <td height="100"> ');
	Win1.document.writeln('                  <table width="100%" border="0" cellspacing="0" cellpadding="0">');
	Win1.document.writeln('                    <tr> ');
	Win1.document.writeln('                      <td align="left" valign="top"><font face="Arial, Helvetica, sans-serif" size="1">COPYRIGHT ');
	Win1.document.writeln('                        2003 by the board of County Commissioners, El Paso County, ');
	Win1.document.writeln('                        Colorado. All rights reserved. No part of this document ');
	Win1.document.writeln('                        or data contained hereon may be reproduced; used to prepare ');
	Win1.document.writeln('                        derivative products; or distributed without the specific ');
	Win1.document.writeln('                        written approval of the Board of County Commissioners, ');
	Win1.document.writeln('                        El Paso County, Colorado. This document was prepared from ');
	Win1.document.writeln('                        the best data available at the time of printing. El Paso ');
	Win1.document.writeln('                        County, Colorado makes no claim as to the completeness ');
	Win1.document.writeln('                        or accuracy of the data contained hereon.');
	Win1.document.writeln('                        ' + DISCLAIMER_MEASURE + '</font></td>');
	Win1.document.writeln('                      <td width="0">&nbsp;</td>');
	Win1.document.writeln('                    </tr>');
	Win1.document.writeln('                  </table>');
	Win1.document.writeln('                </td>');
	Win1.document.writeln('              </tr>');
	Win1.document.writeln('            </table>');
	Win1.document.writeln('          </td>');
	Win1.document.writeln('        </tr>');
	Win1.document.writeln('      </table>');
	Win1.document.writeln('    </td>');
	Win1.document.writeln('  </tr>');
	Win1.document.writeln('</table>');
	Win1.document.writeln('</body></html>');
	Win1.document.close();
//--
	Win1=null;
	hideWaitImg();
}

function showHelp() {
//this function will dynamically write the help page to the results frame
  	theHelpElement=parent.ResultsFrame.document.getElementById("HelpDiv");
	strHTML="";
	strHTML = strHTML + "<table cellSpacing='0' cellPadding='0' width='100%' border='0'>";
	strHTML = strHTML + "<tr align='middle'>";
	strHTML = strHTML + "<td><b><font face='Arial, Helvetica, sans-serif' color='#ffffff' size='4'><font color='#333333' size='3'>Help</font></font></b></td>";
	strHTML = strHTML + "</tr></table>";
	strHTML = strHTML + "<b><font face='Arial, Helvetica, sans-serif' color='#ffffff' size='4'></font><font face='Arial, Helvetica, sans-serif' size='2'>";
	strHTML = strHTML + "</font></b><font face='Arial, Helvetica, sans-serif' color='#ffffff' size='2'>";
	strHTML = strHTML + "<br></font>";
	strHTML = strHTML + "<table width='100%' border='0'><tr>";
	strHTML = strHTML + "<TD vAlign='top' align='left' width='353' height='20'>";
	strHTML = strHTML + "<table cellSpacing='0' cellPadding='2' width='100%' border='0'><tr>";
	strHTML = strHTML + "<td width='353'><font face='Arial, Helvetica, sans-serif' color='#ffffff' size='2'>"; 
    strHTML = strHTML + "<IMG height='16' src='images/zoomin_1.gif' width='16'> <font color='#000000'>";
    strHTML = strHTML + "<strong>Zoom In</strong><br>";
	strHTML = strHTML + "The <em>Zoom In</em> tool allows you to zoom in to an area smaller than the ";
	strHTML = strHTML + "area currently visible on the screen. There are two ways to zoom in. Click the <em>Zoom "; 
	strHTML = strHTML + "In</em> icon and either:<br>";
    strHTML = strHTML + "1. Click and drag a box around the zoom area.<br>";
    strHTML = strHTML + "2. Click once on the map where you want to zoom in. </font>";
    strHTML = strHTML + "<p><font color='#000000'><IMG height='16' src='images/zoomout_1.gif' width='16'> <strong>Zoom"; 
    strHTML = strHTML + "Out</strong><br>";
    strHTML = strHTML + "The <em>Zoom Out</em> tool allows you to zoom out to an area larger than what ";
    strHTML = strHTML + "is currently visible on the screen. There are two ways to zoom out. Click the <em>Zoom "; 
    strHTML = strHTML + "Out</em> icon and either:<br>";
    strHTML = strHTML + "1. Click once on the map where you want to zoom out.<br>";
    strHTML = strHTML + "2. Click and drag a box around the zoom out area.<br>";
    strHTML = strHTML + "NOTE: Unlike the <em>Zoom In</em> tool, the zoom-out factor is inversely "; 
    strHTML = strHTML + "proportional to the size of the box you draw.</font></p>";
    strHTML = strHTML + "<p><p></p>";
    strHTML = strHTML + "<font color='#000000'><IMG height='16' src='images/fullextent_1.gif' width='16'> <strong>";
    strHTML = strHTML + "Zoom All</strong><br>";
    strHTML = strHTML + "The <em>Zoom to Full Extent</em> tool allows you to reset the view of the map ";
    strHTML = strHTML + "to the full extent. Click the <em>Zoom to Full Extent</em> icon to reset the "; 
    strHTML = strHTML + "full extent view of the map.</font>";
    strHTML = strHTML + "<p><font face='Arial, Helvetica, sans-serif' color='#ffffff' size='2'>";
    strHTML = strHTML + "<p><font color='#000000'><IMG height='16' src='images/pan_1.gif' width='16'> <strong>Pan</strong><br>";
    strHTML = strHTML + "The <em>Pan</em> tool allows you to recenter the map without zooming in or out."; 
    strHTML = strHTML + "To pan, click the <em>pan</em> icon, then click on the map at the point you "; 
    strHTML = strHTML + "wish to become the center.</font></p>";
    strHTML = strHTML + "<p><font color='#000000'><IMG height='16' src='images/identify_1.gif' width='16'> <strong>Info</strong><br>";
    strHTML = strHTML + "The <em>Information</em> tool allows you to identify parcels on the map. When ";
    strHTML = strHTML + "you click a parcel on the map, you will be given information about that parcel</font></p>";
    strHTML = strHTML + "<p><font color='#000000'><IMG height='16' src='images/clearhighlight_1.gif' width='16'> <strong>";
    strHTML = strHTML + "Clear Map</strong><br>";
    strHTML = strHTML + "The <em>Clear Map</em> tool allows you to remove all marks on the map such as ";
    strHTML = strHTML + "the shading on the selected parcel or dimension lines drawn by the dimenstion tool. ";
    strHTML = strHTML + "To Clear the map, click the <em>Clear Map</em> icon.</font></p>";
    strHTML = strHTML + "<p><font color='#000000'><IMG height='16' src='images/measure_1.gif' width='16'> <strong>Measure"; 
    strHTML = strHTML + "Tool</strong><br>";
    strHTML = strHTML + "The <em>Measure Tool</em> tool allows you to measure <b>linear</b> ('straight-line') distances on the map. To ";
    strHTML = strHTML + "use the <em>Measure Tool</em>, click the <em>Measure Tool</em> icon. Two text "; 
    strHTML = strHTML + "boxes (labelled 'Total' and 'Segment') will appear at the top of the screen. ";
    strHTML = strHTML + "Using your mouse, click the points that define the start and end of the line you wish to measure. Notice that each time "; 
    strHTML = strHTML + "you make a measurement on the map, the measure result is displayed as a label on the map as well as in the measure result panel. The 'Segment' distance is the length of the last segment you defined "; 
    strHTML = strHTML + "and the 'Total' distance is the combined length of <b>all</b> segments you've defined.  <BR><b>Note:</b> Changing the ";
    strHTML = strHTML + "measurement units (in the drop down list) will update the value displayed in the text boxes but not the values displayed in the segment labels.</font></p>";
    
    strHTML = strHTML + "<p><font color='#000000'><IMG height='20' src='images/measure_area_2.gif' width='30'> <strong>Measure Area"; 
    strHTML = strHTML + "Tool</strong><br>";
    strHTML = strHTML + "The <em>Measure Area Tool</em> tool allows you to measure <b>areas</b> on the map. To ";
    strHTML = strHTML + "use the <em>Measure Area Tool</em>, click the <em>Measure Area Tool</em> icon. A text "; 
    strHTML = strHTML + "box (labelled 'Total') and a list box of available measure units (acres, square feet, hectares, etc.) will appear at the top of the screen. ";
    strHTML = strHTML + "Use your mouse to define each vertex (point) for the area you wish to measure."; 
    strHTML = strHTML + "Clicking once on the map will define a new vertex (you must have at least three to define an area), "; 
    strHTML = strHTML + "while double-clicking will finish the area. When completed, the map will display the area polygon ";
    strHTML = strHTML + "and a label showing the measure result (in the units you selected). <BR><b>Note:</b> Changing the ";
    strHTML = strHTML + "measurement units (in the drop down list) will update the value displayed in the text box but not the value displayed in the polygon label.</font></p>";
   
    strHTML = strHTML + "<p><font color='#000000'><IMG height='16' src='images/overview_html2.gif' width='16'> <strong>";
    strHTML = strHTML + "Overview Map</strong><br>";
    strHTML = strHTML + "The <em>Overview Map</em> button allows you to turn the display of the overview "; 
    strHTML = strHTML + "map on or off. An overview map shows the extent of the main map (as a red ";
    strHTML = strHTML + "rectangle) in the context of the larger area. The first time the <em>Overview Map</em> ";
    strHTML = strHTML + "button is clicked, an overview map will be shown in the corner of the main map "; 
    strHTML = strHTML + "display. Each subsequent click of the button will toggle the display of the "; 
    strHTML = strHTML + "overview map. </font></p>";
    strHTML = strHTML + "<font face='Arial, Helvetica, sans-serif' color='#ffffff' size='2'><font color='#000000'>";
    strHTML = strHTML + "<IMG height='16' src='images/print_1.gif' width='16'> <strong>Print Map</strong><br>";
    strHTML = strHTML + "The print map tool will create a printable map.</font></font>";
    strHTML = strHTML + "<p>&nbsp;</p></font></font></td></tr></table></TD></tr></table>";

	theHelpElement.innerHTML=strHTML;
}

function clearHelp() {
//this function will clear the contents of the results frame
  	theHelpElement=parent.ResultsFrame.document.getElementById('HelpDiv');
	theHelpElement.innerHTML="";	
}

function clearResults() {
//this function will build an empty table to place in the results frame
    var tableString = "";
    tableString=tableString+'<table id="ResultsTable" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial, Sans-Serif" cellPadding="3"><tr>';
    tableString=tableString+'<td width="55" valign="top" align="right"><font color="#0000cc">Schedule:</font></td>';
	tableString=tableString+'<td id="SchedNum" width="215"></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td id="OwnerFld" width="55" valign="top" align="right"><font color="#0000cc">Owner:</font></td>';
	tableString=tableString+'<td id="Owner" width="215"></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td width="55" valign="top" align="right"><font color="#0000cc">Location:</font></td>';
	tableString=tableString+'<td id="Location" width="215"></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td width="55" valign="top" align="right"><font color="#0000cc">Mailing Address:</font></td>';
	tableString=tableString+'<td id="Address" width="215"></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td id="LegalFld" width="55" valign="top" align="right"><font color="#0000cc">Legal:</font></td>';
	tableString=tableString+'<td id="Legal" width="215"></td>';
//*2--New fields: "Zone" and "Acres" ...	
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td id="ZoneFld" width="55" valign="top" align="right"><font color="#0000cc">Zoned:</font></td>';
	tableString=tableString+'<td id="Zone" width="215"></td>';
	tableString=tableString+'</tr><tr>';	
	tableString=tableString+'<td id="AcresFld" width="55" valign="top" align="right"><font color="#0000cc">Area:</font></td>';
	tableString=tableString+'<td id="Acres" width="215"></td>';
	tableString=tableString+'</tr><tr>';		
//END: 2	
	tableString=tableString+'<td id="OverFiveOwners" align="middle" colSpan="2"><font color="#000cc">*Owner field has been trimmed for display purposes.</font></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td id="OverFiveLegal" align="middle" colSpan="2"><font color="#000cc">*Legal description field has been trimmed for display purposes.</font></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td id="MapSheetLink" align="middle" colSpan="2"><font color="#000cc">Map Sheet 000.TIF</font></td>';
	tableString=tableString+'</tr><tr>';
	tableString=tableString+'<td align="middle" colSpan="2"><font color="#000cc"><INPUT id="ViewDetails" style="VISIBILITY: hidden; WIDTH: 96px; HEIGHT: 27px" onclick="doViewDetails();" type="button" value="View Details" name="ViewDetails"></font></td>';
	tableString=tableString+'</tr>';
	tableString=tableString+'</table>';
//assign the string above to the results frame
	theResultsDIV=parent.ResultsFrame.document.getElementById("ResultsDIV");
	theResultsDIV.innerHTML=tableString;
	theResultsDIV.style.visibility="hidden";
//make sure the "Parcel Not Found" label is hidden
    theNotFoundDIV=parent.ResultsFrame.document.getElementById("lblParcelNotFound");
	theNotFoundDIV.style.visibility="hidden";
	return;
}