//Start tillval

function updateOp() {
  var options = ge.getOptions();
  var form = document.options;
  
  options.setStatusBarVisibility(form.statusbar.checked);
  options.setGridVisibility(form.grid.checked);
  options.setOverviewMapVisibility(form.overview.checked);
  options.setScaleLegendVisibility(form.scaleLegend.checked);
  options.setAtmosphereVisibility(form.atmosphere.checked);
  options.setMouseNavigationEnabled(form.mouseNav.checked);

  if (form.nav.checked) {
    ge.getNavigationControl().setVisibility(ge.VISIBILITY_SHOW);
  } else {
    ge.getNavigationControl().setVisibility(ge.VISIBILITY_HIDE);
  }
}

//Slut tillval




//Start sökfält

function submitLocation() {
  var address = document.getElementById('address').value;
  geocoder.getLatLng(
    address, 
    function(point) {
      if (point && ge != null) {
        var la = ge.createLookAt('');     
        la.set(point.y, point.x, 100, ge.ALTITUDE_RELATIVE_TO_GROUND, 
               0, 0, 4000);
        ge.getView().setAbstractView(la);
      }
    }
  );
}


//Slut sökfält

