// Author: uismedia/Creator: Mappetizer  8.2.3 for ArcGIS by uismedia (http://www.mappetizer.de); 23.03.2010 16:31:11
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","282px","47px","embfiles/legend.svg");
  dojo.byId("MVlegend").appendChild(leg);

  var map = mv_embedSVGNode(dojo.doc,"MVmapDoc","448px","604px","embfiles/map.svg");
  dojo.byId("MVmap").appendChild(map);

  if (dojo.isIE) {
    checkAndGetSVGViewer();
  }

/*  if (dojo.isIE) {
    var asv = null;
    try {
      asv = new ActiveXObject("Adobe.SVGCtl");
    } catch(err) {}
    if (asv == null) {
      document.writeln("<p>To view this page you need an SVG viewer.");
      document.writeln("<a href='http://www.adobe.com/svg/viewer/install/main.html' target='_blank'><img src='pictures/svgdownload.gif' width='88' height='31' border='0' alt='Download Adobe SVG Viewer'></a>");
      document.writeln("</p>");
      document.writeln("<p>&nbsp;</p>");
    }
  }*/
  // 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.koord"),"onclick",mv_coordinateTool);
  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("white","silver","red","yellow","#ECE9D8",true,false);
  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.CheckStatus = "a04uMD4";
}

function mv_MapSettings() {
  //Do not delete or change this function;
  new MV.Layer("th0",true,true,true,true,false,"GroupLayer","");
  new MV.Layer("th0-0",true,true,true,true,false,"GroupLayer","");
  new MV.Layer("th0-0-0",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Gebaeude&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-1",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Graeber&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-2",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Kirche&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-3",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Friedhof&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-4",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Kirchengelaende&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-5",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Airport&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-6",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Bahnhof&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-7",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Bahn&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-8",true,true,true,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Grossstadt&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-9",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Stadt&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-10",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Dorf&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-11",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Stadtteil&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-12",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Weiler&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-13",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Ortschaft&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-14",true,true,true,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Autobahn&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-15",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Kraftfahrstrasse&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-16",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Bundesstrasse&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-17",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Landstrasse&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-18",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=einfache_Strasse&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-19",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Zufahrtswege&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-20",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Wohnstrasse&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-21",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Wege&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-22",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Radweg&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-23",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Fussgaengerweg&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-24",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Strand&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-25",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Inselpunkte&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-26",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Kueste&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-27",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Insel&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-28",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Wasserbecken&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-29",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Kanal&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-30",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Baeche&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-31",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Fluesse&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-32",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Wasser&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-33",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Fussgaengerzone&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-34",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Wiese&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-35",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Wald&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-36",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Naherholungsgebiet&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-37",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Park&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-38",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=unkultiviertes_Land&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-39",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Gruenflaeche&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-40",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Bauland&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-41",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Industriegebiet&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-42",true,true,false,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Landwirtschaft&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th0-0-43",true,true,true,true,false,"WMSLayer","http://osm.wheregroup.com/cgi-bin/osm_basic.xml?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Grenzen&STYLES=&SRS=EPSG:4326&FORMAT=image/gif&TRANSPARENT=TRUE");
  new MV.Layer("th1",false,true,true,true,false,"FeatureLayer","");
  mv_Map.userSettings(640254,7385959,2328.28444444444,0,true,3393,"WebMercator");
}

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;
}

function mv_initializeSettings() {
  //Do not delete or change this function;
  mv_Doc.Toolbars = new MV.List();
  mv_declareClassToolbar();
  mv_createToolbar();
}

function mv_initializeSettings2() {
 //Do not delete or change this function;
}


function mv_showHelp() {
  var theWin = window.open("embfiles/help.html","MVHelp", "width=475,height=459,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;
//  }
}


