//<!--[CDATA[

var map;
var baseIcon;

var cnt;
var p;
var l;

var geocoder = new GClientGeocoder();



//----------------
//----- LOAD -----
//----------------
function load() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map"));
//    geocoder = new GClientGeocoder();

    p = new Array();
    l = new Array();

    //--------------------------------
    //----- Basis Icon festlegen -----
    //--------------------------------
    baseIcon = new GIcon();
    baseIcon.iconSize = new GSize(24, 24);
    baseIcon.shadowSize = new GSize(24, 24);
    baseIcon.iconAnchor = new GPoint(2, 22);
    baseIcon.infoWindowAnchor = new GPoint(12, 8);

    //----------------------------
    //----- Karte einstellen -----
    //----------------------------
    map.addControl(new GLargeMapControl());
//        map.addControl(new GMapTypeControl());
//        map.addControl(new GScaleControl ());

//    map.setCenter(new GLatLng(54.50, 6.06), 5);
    map.setCenter(new GLatLng(47.279229002570816, -15.140625), 1);

    showTeam();
  }
}



//---------------------------
//----- Marker erzeugen -----
//---------------------------
function createMarker(point, symbol, text) {
  var icon = new GIcon(baseIcon);

  icon.image = "img/"+ symbol + ".png";
  icon.shadow = "img/"+ symbol + "_shadow.png";

  var marker = new GMarker(point, icon);

  GEvent.addListener(marker, "click", function() {
                                        marker.openInfoWindowHtml(text);
                                      }
                    );

  return marker;
}


//-------------------------------
//----- Adresse geocodieren -----
//-------------------------------
function Address2Point(address, info) {
  var pt = geocoder.getLatLng(address,
                     function(point) {
                       if (!point) {
                         alert(address + " not found");
                       }
                       else {
//                             map.setCenter(point, 11);
                         map.addOverlay(createMarker(point, "3D_pin_red", info));
                       }
                     }
                    );
  return pt;
}



function info_block(nam, adr_1, adr_2, adr_3, email, web, tel_1, tel_2, tel_3, profil, bild) {
  var s = "";

  s = s + "<div id=\"Ebene1\">" +
			      "<div id=\"Ebene2\">" +
				      "<strong>" + nam + "</strong><br>";
  if (adr_1 != "") {
    s = s + adr_1 + "<br>";
  }
  if (adr_2 != "") {
		s = s + adr_2 + "<br>";
  }
  if (adr_3 != "") {
    s = s + adr_3 + "<br>";
  }
  if (email != "") {
		s = s + email + "<br>";
  }
  if (web != "") {
		s = s + web + "<br>";
  }
  if (tel_1 != "") {
		s = s + tel_1 + "<br>";
  }
  if (tel_2 != "") {
		s = s + tel_2 + "<br>";
  }
  if (tel_3 != "") {
		s = s + tel_3 + "<br>";
  }

  s = s + "<br>";

  if (profil != "") {
		s = s + "<a href=\"" + profil + "\" target=\"_blank\">" +
					    "Profil anschauen" +
				    "</a>";
  }

  s = s + "</div>" +
          "<div id=\"Ebene3\">" +
            "<img src=\"" + bild + "\" alt=\"\" width=\"66\" border=\"0\" />" +
			    "</div>" +
		    "</div>";

  return s;
}



//---------------------------------
//----- Learning Journey Team -----
//---------------------------------
function showTeam() {
      var pnt;
      var act_text;

//4: (52.552112, 13.386764)
      nam = "Dr. Bodo Schwieger";
      adr_1 = "Schönhauser Allee 45";
      adr_2 = "10435 Berlin";
      adr_3 = "";
      email = "bodo.schwieger@team-red.net";
      web = "";
      tel_1 = "phone: +49 (30) 13898635";
      tel_2 = "mobile: +49 (178) 8760898";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Schwieger_Bodo_m1.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(52.54084094194898, 13.412504196166992);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

//19: (59.585037, 11.131902)
      nam = "Rune Draegni";
      adr_1 = "PO Box 7150 Majorstuen";
      adr_2 = "0307 Oslo";
      adr_3 = "Norway";
      email = "rune.draegni@team-red.net";
      web = "";
      tel_1 = "phone: +47 23368600";
      tel_2 = "mobile: +47 90025168";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Draegni_Rune_m21.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(59.91380512441711, 10.738770961761475);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

//22: (48.095545, 11.287564)
      nam = "Tobias Kipp";
      adr_1 = "Weichselbaumer Stra&szlig;e 6";
      adr_2 = "82205 Gilching";
      adr_3 = "";
      email = "tobias.kipp@team-red.net";
      web = "";
      tel_1 = "phone: +49 (8105) 774072";
      tel_2 = "mobile: +49 (171) 4262971";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Kipp_Tobias_m25.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(48.095545, 11.287564);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

//26: (52.437434, 13.228684)
      nam = "Willem Brouwer";
      adr_1 = "An der Stammbahn 67";
      adr_2 = "14532 Kleinmachnow";
      adr_3 = "";
      email = "willem.brouwer@team-red.net";
      web = "";
      tel_1 = "phone: +49 (30) 80907251";
      tel_2 = "mobile: +49 (178) 8156829";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Brouwer_Willem_m39.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(52.418132513194166, 13.218623399734497);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

//26: (52.437434, 13.228684)
      nam = "Tom Rye";
      adr_1 = "10 Colinton Road";
      adr_2 = "EH10 5DT Edinburgh";
      adr_3 = "";
      email = "tom.rye@team-red.net";
      web = "";
      tel_1 = "phone: +44 (131) 455-2210";
      tel_2 = "mobile: +44 (131) 3370080";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Rye_Tom_m20.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(55.93333711085314, -3.213930130004883);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

      nam = "Conrad Wagner";
      adr_1 = "Stansstaderstrasse 26";
      adr_2 = "6370 Stans";
      adr_3 = "Switzerland";
      email = "conrad.wagner@team-red.net";
      web = "";
      tel_1 = "phone: +41 (41) 6101742";
      tel_2 = "mobile: +41 (76) 3917151";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Wagner_Conrad_.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(46.95932840960335, 8.362805843353271);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

      nam = "David Brook";
      adr_1 = "1905 NE Clackamas Street";
      adr_2 = "97232 Portland";
      adr_3 = "United States of America";
      email = "david.brook@team-red.net";
      web = "";
      tel_1 = "phone: +1 (503) 2884024";
      tel_2 = "mobile: +1 (503) 3131320";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Brook_David_.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(45.53294316571296, -122.64664649963379);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

//--------------------------------------------------------------------

      nam = "Dominik Villaret";
      adr_1 = "Shanghai 200031";
      adr_2 = "P.R. China";
      adr_3 = "";
      email = "dominik.villaret@team-red.net";
      web = "";
      tel_1 = "China: +86 (0)135 24815329";
      tel_2 = "Germany: +49 (0)172 9738163";
      tel_3 = "";
      profil = "";
      bild = "img/photos/Villaret_Dominik_m26.jpg";

      act_text = info_block(nam, adr_1, adr_2, adr_3, email, web,
                            tel_1, tel_2, tel_3, profil, bild);
      pnt = new GLatLng(31.208424490467404, 121.43819332122803);
      map.addOverlay(createMarker(pnt, "3D_pin_red", act_text));

  return;
}

//]]-->
