//
//Map Navigation Functions:
//
function ActivateFullExtent() {
    window.location = "viewer.asp?tools=FULLEXTENT";
  }  



function ActivateZoomIn() {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	//if (imgPrefix == null) {
		//imgPrefix = "";
		//}	
    setToolImage("ZOOMIN"); 
    document.frmNavigation.tools.value = 'ZOOMIN';
    document.frmNavigation.target="";
    document.frmNavigation.action = "viewer.asp";
    //document.onmousedown = mapTool;
    mode="ZOOMIN"
    //document.write(mode)
  }
  
  function ActivateZoomOut() {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	//if (imgPrefix == null) {
		//imgPrefix = "";
		//}	
    setToolImage("ZOOMOUT"); 
    document.frmNavigation.tools.value = 'ZOOMOUT';
    document.frmNavigation.target="";
    document.frmNavigation.action = "viewer.asp";
    //document.onmousedown = null;
    mode="ZOOMOUT"
  }
  
  function ActivatePan() {
  //Used by SingleClick Client except Basic Viewer
  //imgPrefix is optional... used by Chameleon Interface
	//if (imgPrefix == null) {
		//imgPrefix = "";
		//}	
    setToolImage("PAN"); 
    document.frmNavigation.tools.value = 'PAN';
    document.frmNavigation.target="";
    document.frmNavigation.action = "viewer.asp";
    //document.onmousedown = null;
    mode="PAN"
  }
  function ToggleLabels() {
      //LabelsOn = document.frmNavigation.LabelsOn.value;
      document.frmNavigation.target="_self";
      //window.location = "viewer.asp?mode=Labels&LabelsOn=" + LabelsOn + "";
      window.location = "viewer.asp?tools=Labels";
    }
  


//  function ToggleDOQQs() {
//      document.frmNavigation.target="_self";
//      window.location = "viewer.asp?tools=DOQQs";
//  }
  
//This function opened a separate window for selecting the imagery.  NOT IN USE.
//  function ToggleImages() {
//  	window.open('SelectImage.asp');
//  }

  function TurnOnDOQQs() {
      document.frmNavigation.target="_self";
      window.location = "viewer.asp?tools=DOQQs";
  }
  function TurnOnPAMAP() {
      document.frmNavigation.target="_self";
      window.location = "viewer.asp?tools=PAMAP";
  }
  function TurnImageryOff() {
      document.frmNavigation.target="_self";
      window.location = "viewer.asp?tools=Ivan";
  }

function setToolImage(tool) {
	//Used by Graphical Button Clients.
	

	// Dull all images first.
	document.ZOOMIN.src = 'images/'+ 'doqq_tool2.gif';
	document.ZOOMOUT.src = 'images/'+ 'doqq_tool3.gif';
	document.PAN.src = 'images/'+ 'doqq_tool5.gif';
	document.Photos.src = 'images/'+ 'Photos.gif';
	
	

	//Then brighten the passed tool.
	if (tool == "ZOOMIN") {
		document.ZOOMIN.src = 'images/'+ 'doqq_tool_over2.gif';
		}
	if (tool == "ZOOMOUT") {
		document.ZOOMOUT.src = 'images/'+ 'doqq_tool_over3.gif';
		}
	if (tool == "PAN") {
		document.frmNavigation.PAN.src = 'images/'+ 'doqq_tool_over5.gif';
		}
	if (tool == "Photos") {
		document.frmNavigation.Photos.src = 'images/'+ 'Photos_over.gif';
		}
	
	
}

function ZoomOhio() {
	place = document.frmNavigation.OhioSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}

function ZoomMon() {
	place = document.frmNavigation.MonSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}

function ZoomAlleg() {
	place = document.frmNavigation.AllegSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}

function ZoomWB() {
	place = document.frmNavigation.WBSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}

function ZoomJun() {
	place = document.frmNavigation.JunSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}

function ZoomUpper() {
	place = document.frmNavigation.UpperSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}
function ZoomLower() {
	place = document.frmNavigation.LowerSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}
function ZoomCounty() {
	county = document.frmNavigation.CountySelect.value;
	window.location = "viewer.asp?tools=ZoomCounty&county=" + county + "";
}
function ZoomPAMuni() {
	PAMuni = document.frmNavigation.PAMuniSelect.value;
	window.location = "viewer.asp?tools=ZoomPAMuni&PAMuni=" + PAMuni + "";
}
function ZoomNJMuni() {
	NJMuni = document.frmNavigation.NJMuniSelect.value;
	window.location = "viewer.asp?tools=ZoomNJMuni&NJMuni=" + NJMuni + "";
}
function ZoomDelaware() {
	place = document.frmNavigation.DelawareSelect.value;
	window.location = "viewer.asp?tools=ZoomPlace&place=" + place + "";
}

function ActivatePhotos() {
    setToolImage("Photos"); 
    document.frmNavigation.tools.value = 'Photos';
    document.frmNavigation.action="Photos.asp";
    document.frmNavigation.target="photoWindow";
    mode="Photos"
  }
function ActivatePhotographs() {
    setToolImage("Photographs"); 
    document.frmNavigation.tools.value = 'Photographs';
    document.frmNavigation.action="Photographs.asp";
    document.frmNavigation.target="photographWindow";
    mode="Photographs"
  }
