
  function SpatialAirportSearch(){
  		var sAirPortCode = document.all.apt.value;
  		
  		if(sAirPortCode != ''){
  			//alert(document.all.apt.value);
  			showLayer("loadLayer");
  			document.location=sMapProcessor+'reset=true&action=apt&apt='+sAirPortCode;
  			  			
  		}else{
  			alert('Please Specify An Airport Code.');
  		}
  			
  			
  	
	}

  function SpatialFromToAirportSearch(){
  		var sFrom = document.all.btnTripFrom.value;
  		var sTo = document.all.btnTripTo.value;
  		
  		if((sTo != '') && (sFrom != '')){
  			document.location=sMapProcessor+'reset=true&action=apt&toApt='+sTo+'&fromApt=' +sFrom;
  		}else{  		
  			alert('Please specify both a arrival and a desitination airport code.');
  		}
  	
	}
  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 = 'map.jsp';
  }
  
  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 = 'map.jsp';
  }
  
  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);
    alert (document.frmNavigation.Cmd.value);
    document.frmNavigation.Cmd.value = 'PAN';
    document.frmNavigation.target="";
    document.frmNavigation.action = 'map.jsp';
  }
  
   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 = "";
    document.frmNavigation.action = 'map.jsp';
   }

  
function PopOut(sURL,sTitle,iHeight,iWidth,ynScroll,ynResize) {

var objWin;
  objWin = window.open(sURL, sTitle, "height="+iHeight+",width="+iWidth+",scrollbars="+ynScroll+",resizable="+ynResize+"");
  if (parseInt(navigator.appVersion) >=4) objWin.window.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.
	//parent.toolFrame.zoomin.src = 'images/zoomin1.gif';
  document.ZOOMIN.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/zoomin1.gif';
	//parent.toolFrame.zoomout.src = 'images/zoomout1.gif';
  document.ZOOMOUT.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/zoomout1.gif';
	//parent.toolFrame.pan.src = 'images/pan1.gif';

  //document.MEASURE.src = 'images/blue_measure1.gif';
	//parent.toolFrame.id.src = 'images/id2.gif';

	// These controls aren't on both pages, so check for their existence
	//if (parent.toolFrame.chgloc) parent.toolFrame.chgloc.src = 'images/chgloc2.gif';
	//if (parent.toolFrame.buffer) parent.toolFrame.buffer.src = 'images/buffer2.gif';
	//if (parent.toolFrame.measure) parent.toolFrame.measure.src = 'images/measure2.gif';

	//Then brighten the passed tool.
	if (tool == "ZOOMIN") {
		//parent.toolFrame.zoomin.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/zoomin1.gif';
    //document.ZOOMIN.src = imageFile;
    document.ZOOMIN.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/blue_zoomin2.gif'
    //added ck et 2003
    document.ZOOMOUT.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/zoomout1.gif';

    
		}
	if (tool == "ZOOMOUT") {
		//parent.toolFrame.zoomout.src = 'images/zoomout1.gif';
    //document.ZOOMOUT.src = imageFile;
    document.ZOOMOUT.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/blue_zoomout2.gif'    
        //added ck et 2003
    document.ZOOMIN.src = 'http://tfr.faa.gov/tfr_map_ims/html/images/zoomin1.gif';

    
		}
	if (tool == "PAN") {
		//parent.toolFrame.pan.src = 'images/pan1.gif';
    //document.PAN.src = imageFile;
       
        //added ck et 2003
    document.ZOOMOUT.src = 'images/zoomout1.gif';
    document.ZOOMIN.src = 'images/zoomin1.gif';
    
		}
	if (tool == "IDENTIFY") {
		//parent.toolFrame.id.src = 'images/identify1.gif';
    //document.IDENTIFY.src = imageFile;
    
         //added ck et 2003
    document.ZOOMOUT.src = 'images/zoomout1.gif';
        document.ZOOMIN.src = 'images/zoomin1.gif';
		}
	if ((tool == "buffer") && (typeof(document.buffer) != 'undefined')) {
		//parent.toolFrame.buffer.src = 'images/zoomin1.gif';
		}
	//if (tool == "MEASURE") {
    
		//parent.toolFrame.measure.src = 'images/zoomin1.gif';
    //alert(imageFile);
    //document.MEASURE.src = imageFile;
		//}
	if ((tool == "chgloc") && (typeof(document.chgloc) != 'undefined')){
		//parent.toolFrame.chgloc.src = 'images/zoomin1.gif';
		}
	
}

function ProcessLink(sURL) {
		document.body.style.cursor = "wait";
		document.location = sURL;
}