// Author: uismedia/Creator: Mappetizer  8.3.2 for ArcGIS by uismedia (http://www.mappetizer.de); 03.06.2010 10:43:29
dojo.require("dijit.TitlePane");
dojo.require("dojo.parser");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
dojo.require("dijit.form.Button");
dojo.require("dijit.Toolbar");

dojo.addOnLoad(function() {
  //Do not delete or change this function
  var leg = mv_embedSVGNode(dojo.doc,"MVlegendDoc","165px","282px","embfiles/legend.svg");
  dojo.byId("MVlegend").appendChild(leg);

  if (dojo.byId("MVoverview") != null) {
    var over = mv_embedSVGNode(dojo.doc,"MVoverviewDoc","167px","168px","embfiles/overview.svg");
    dojo.byId("MVoverview").appendChild(over);
  }

  var map = mv_embedSVGNode(dojo.doc,"MVmapDoc","500px","502px","embfiles/map.svg");
  dojo.byId("MVmap").appendChild(map);

  if (dojo.isIE) {
    checkAndGetSVGViewer();
  }
  // Add functions to toolbar
  dojo.connect(dojo.byId("MVtoolbar.zoomin"),"onclick",mv_zoomInTool);
  dojo.connect(dojo.byId("MVtoolbar.zoomout"),"onclick",mv_zoomOutTool);
  dojo.connect(dojo.byId("MVtoolbar.pan"),"onclick",mv_panTool);
  dojo.connect(dojo.byId("MVtoolbar.fullextent"),"onclick",mv_fullExtent);
  dojo.connect(dojo.byId("MVtoolbar.identify"),"onclick",mv_identifyTool);
  dojo.connect(dojo.byId("MVtoolbar.print"),"onclick",mv_print);
  dojo.connect(dojo.byId("MVtoolbar.help"),"onclick",mv_showHelp);
  dojo.connect(dojo.byId("body"),"onresize",mv_resizeMap);

  mv_checkLoaded();
});

function mv_DocSettings() {
  //Do not delete or change this function;
  mv_Doc.userSettings("#E2E6D3","#B5C09F","red","yellow","#D0D8BE",true,true);
  mv_Doc.txtIESupport = "Diese Seite benoetigt den Adobe SVG Viewer 3.0 zur Darstellung (kostenloses Plug-In).\n(http://www.adobe.com/svg/viewer/install/main.html)";
  mv_Doc.txtQueryNoRec = "Kein Objekt gefunden.";
  mv_Doc.txtFlicker = "Objekt hervorheben";
  mv_Doc.txtZoomTo = "Auf Objekt zoomen";
  mv_Doc.txtPrint = "Drucken";
  mv_Doc.txtClose = "Schließen";
  mv_Doc.CheckStatus = "w11uMD6";
  new MV.ZoomObject("MVlistZoomObject",0);
}

function mv_MapSettings() {
  //Do not delete or change this function;
  new MV.Layer("th0",true,true,false,true,false,"FeatureLayer","");
  new MV.Layer("th1",true,true,true,true,false,"FeatureLayer","");
  new MV.Layer("th2",true,true,true,true,false,"FeatureLayer","","th2txt0,th2txt1");
  new MV.Layer("th3",false,true,true,true,false,"FeatureLayer","");
  mv_Map.userSettings(110575.8,6111800.5,77.8836,1,true,3393,"");
}

function mv_initializeLegend() {
  //Do not delete or change this function;
}

function mv_initializeShareGeomLegend() {
  //Do not delete or change this function;
}

function mv_ScalebarSettings() {
  //Do not delete or change this function;
  mv_Scalebar.userSettings(2,64.2,5);
}

function mv_initializeSettings() {
  //Do not delete or change this function;
  mv_declareClassIdentifyObject();
  mv_declareClassIdentifyTP();

  mv_Doc.Toolbars = new MV.List();
  mv_declareClassToolbar();
  mv_createToolbar();
  dojo.byId("MVtoolbar.identify").click();
}

function mv_initializeSettings2() {
 //Do not delete or change this function;
}


function mv_showHelp() {
  var theWin = window.open("embfiles/help.html","MVHelp", "width=475,height=472,top=50,left=50,toolbar=no,menubar=no,location=no,hotkeys=no,resizable=yes,scrollbars=yes,dependent=yes,status=no");
  theWin.focus();
}


function mv_userInit() {
//This function is for your own scripts, it will be called on loading, do not delete it
//  mv_alert("function mv_userInit()");
}

function mv_userMVDocToolbar(objButton) {
//This function is for your own toolbar buttons, do not delete it
//  switch(objButton.id) {
//      case "MVtoolbar.mybutton":
//          objButton.Function = "testFunc('hier',2)";
//          objButton.State = 1;  //this button is a radio button
//          break;
//  }
}


