// aimsGeneric.js
/*
*  JavaScript template file for ArcIMS HTML Viewer
*		dependent on aimsXML.js, ArcIMSparam.js, aimsCommon.js, aimsMap.js,
*		aimsLayers.js, aimsDHTML.js
*/


// load in MapService
function loadMapService(mapURL,ovURL,checkExtents) {
       	if (mapURL!="") {
		showRetrieveData();
		if (aimsSelectPresent) {
			selectCount=0;
			highlightedOne="";
			selectPoints.length=1;
			selectLeft.length=1;
			selectRight.length=1;
			selectTop.length=1;
			selectBottom.length=1;
		}
		ActiveLayerIndex=0;
		
		showGeocode=false;
		clickCount=0;
		imsURL = mapURL;
		imsQueryURL= imsURL + "&CustomService=Query";
		imsGeocodeURL = imsURL + "&CustomService=Geocode";
		if (ovURL!="") {
			imsOVURL = ovURL;
			hasOVMap=true;
		} else {
			ovIsVisible=true;
			toggleOVMap();
			imsOVURL = "";
			hasOVMap=false;
		}
		if (parent.TextFrame!=null) parent.TextFrame.document.location= appDir + "text.htm";
		if (checkExtents) {
			MapUnits="DEGREES";
			chkUnits=true;
			enforceFullExtent=true;
			pastStart=false;
			startUp();
		} else {
			sendMapXML();
		}
	} 
}

