// *********************************************************
  function ZoomToFull() {
    document.frmNavigation.Cmd.value = 'ZOOMFULL';
    document.frmNavigation.target="";
    document.frmNavigation.action = sApplication;
	showLayer("loadLayer");
	document.frmNavigation.submit();
  }

  function ActivateLandmark() {
    document.frmNavigation.Cmd.value = 'SNAPSHOT';
    document.frmNavigation.ShowWhat.value = 'LANDMARK';
    document.frmNavigation.target="";
    document.frmNavigation.action = sApplication;
	document.frmNavigation.submit();
  }
  
  function ActivateOrtho(imgPrefix) {
//	Used by SingleClick Client except Basic Viewer
//	imgPrefix is optional... used by Chameleon Interface
	if (imgPrefix == null) {
		imgPrefix = "";
	}	
	    document.frmNavigation.Cmd.value = 'ORTHO';
	    if (document.frmNavigation.Orthophoto.value == 'YES') {
	    document.frmNavigation.Orthophoto.value = "NO";
	    } else {
	    document.frmNavigation.Orthophoto.value = 'YES';
	    }
	    
	    document.frmNavigation.target="";
	    document.frmNavigation.action = sApplication;
		showLayer("loadLayer");
		document.frmNavigation.submit();
}

  function RefreshLayers() {
	showLayer("loadLayer");
    document.frmNavigation.Cmd.value = 'SNAPSHOT';
    document.frmNavigation.target="";
//  document.frmNavigation.action = 'CSMap.asp';
    document.frmNavigation.action = sMapProcessor;
	document.frmNavigation.submit();
  }

// *********************************************************

  function ActivateZoomIn(imgPrefix) {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	if (imgPrefix == null) {
		imgPrefix = "";
		}	
    setToolImage('ZOOMIN','2',imgPrefix); 
    document.frmNavigation.Cmd.value = 'ZOOMIN';
    document.frmNavigation.target="";
    document.frmNavigation.action = sApplication;
  }
  
  function ActivateZoomOut(imgPrefix) {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	if (imgPrefix == null) {
		imgPrefix = "";
		}	
    setToolImage('ZOOMOUT','2',imgPrefix); 
    document.frmNavigation.Cmd.value = 'ZOOMOUT';
    document.frmNavigation.target="";
    document.frmNavigation.action = sApplication;
  }
  
  function ActivatePan(imgPrefix) {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	if (imgPrefix == null) {
		imgPrefix = "";
		}	
    setToolImage('PAN','2',imgPrefix); 
    document.frmNavigation.Cmd.value = 'PAN';
    document.frmNavigation.target="";
    document.frmNavigation.action = sApplication;
  }
  
  function ActivateIdentify(targetwin,imgPrefix) {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	if (imgPrefix == null) {
		imgPrefix = "";
		}	
    setToolImage('IDENTIFY','2',imgPrefix); 
    document.frmNavigation.Cmd.value = 'IDENTIFY';
    document.frmNavigation.target = targetwin;
    document.frmNavigation.action = 'identify.asp';
  }

// Show Generic Window
function ShowWin(sURL,sTitle,iHeight,iWidth,ynstatus,yntoolbar,ynmenubar,ynScroll,ynResize,ynleft,yntop) {
	var objWin;
	objWin = window.open(sURL, sTitle, "height="+iHeight+",width="+iWidth+",status="+ynstatus+",toolbar="+yntoolbar+",menubar="+ynmenubar+",scrollbars="+ynScroll+",resizable="+ynResize+",left="+ynleft+",top="+yntop+"");
	objWin.focus();
} 

function setToolImage(tool, mode, prefix) {
	//Used by Graphical Button Clients.
	//prefix is an optional argument to the image file name.
	if (prefix == null) {
		prefix = "";
		}
	var imageFile = 'images/' + prefix + tool + mode + '.gif';	

	// Dull all images first.
	document.ZOOMIN.src = 'images/'+ prefix +'zoomin1.gif';
	document.ZOOMOUT.src = 'images/'+ prefix +'zoomout1.gif';
	document.PAN.src = 'images/'+ prefix +'pan1.gif';
	if (document.IDENTIFY)
		document.IDENTIFY.src = 'images/'+ prefix +'identify1.gif';

	//Then brighten the passed tool.
	if (tool == "ZOOMIN") {
		document.ZOOMIN.src = imageFile;
		document.B_ACTIVETOOL.src = 'images/'+ 'at_zoomin2.gif';
		}
	if (tool == "ZOOMOUT") {
		document.ZOOMOUT.src = imageFile;
		document.B_ACTIVETOOL.src = 'images/'+ 'at_zoomout2.gif';
		}
	if (tool == "PAN") {
		document.PAN.src = imageFile;
		document.B_ACTIVETOOL.src = 'images/'+ 'at_pan2.gif';
		}
	if (tool == "IDENTIFY") {
		document.IDENTIFY.src = imageFile;
		document.B_ACTIVETOOL.src = 'images/'+ 'at_identify2.gif';
		}
}
