

 /*  Allgemeine Karte die eingeblendet wird  */
function initialize() {		
		console.log(window.standortname + 'maps');
		if (window.standortname == 'ibbenbueren'){
			var secheltLoc = new google.maps.LatLng(52.26835, 7.71656);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Ibbenbueren</span><br /><br />Münsterstraße 68<br />49477 Ibbenbüren<br /><span class='tel'>Tel. 05451/7777</span>";
			}
		else if (window.standortname == 'rotenburg'){
			var secheltLoc = new google.maps.LatLng(53.11619, 9.41835);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Rotenburg</span><br /><br />Berliner Ring 1<br />27356 Rotenburg<br /><span class='tel'>Tel. 04261/6111</span>";
			}
		else if (window.standortname == 'quelkhorn'){
			var secheltLoc = new google.maps.LatLng(53.13353, 9.08136);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Quelkhorn</span><br /><br />Landstr 19<br />28870 Quelkhorn<br /><span class='tel'>Tel. 04293/7200</span>";
			}
		else if (window.standortname == 'wallenhorst'){
			var secheltLoc = new google.maps.LatLng(52.35083, 7.99816);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Wallenhorst</span><br /><br />Hollager Straße 76<br />49134 Wallenhorst<br /><span class='tel'>Tel. 05407/2040</span>";
			}
		else if (window.standortname == 'zeven'){
			var secheltLoc = new google.maps.LatLng(53.30609, 9.26746);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Zeven</span><br /><br />Nord-West-Ring 16<br />27404 Zeven<br /><span class='tel'>Tel. 04281/6555</span>";
			}
		else if (window.standortname == 'harsefeld'){
			var secheltLoc = new google.maps.LatLng(53.4574653, 9.5002116);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Harsefeld</span><br /><br />Herrenstraße 36<br />21698 Harsefeld<br /><span class='tel'>Tel. 04164/6655</span>";
			}
		else if (window.standortname == 'sittensen'){
			var secheltLoc = new google.maps.LatLng(53.28273, 9.50771);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Sittensen</span><br /><br />Hamburger Straße 6<br />27419 Sittensen<br /><span class='tel'>Tel. 04282/2005</span>";
			}
		else if (window.standortname == 'bramsche'){
			var secheltLoc = new google.maps.LatLng(52.9204, 9.23669);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Bramsche</span><br /><br />Rosenstr. 8<br />49565 Bramsche<br /><span class='tel'>Tel. 05461/2010</span>";
			}
		else if (window.standortname == 'visselhoevede'){
			var secheltLoc = new google.maps.LatLng(52.9887764, 9.5862673);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>Pizza Flitza<br/>Visselhövede</span><br /><br />Große Straße 31<br />27374 Visselhövede<br /><span class='tel'>Tel. 04262/8000</span>";
			}
		else {
			var secheltLoc = new google.maps.LatLng(52.9887764, 9.5862673);
			var boxText = document.createElement("div");
			boxText.className = "map-class";
			boxText.innerHTML = "<span class='name'>ALLEGMEIN</span>";
			}
 
		var myMapOptions = {
			 zoom: 15
			,center: secheltLoc
			,mapTypeId: google.maps.MapTypeId.ROADMAP
		};
		var theMap = new google.maps.Map(document.getElementById("map_canvas"), myMapOptions);

		var image = new google.maps.MarkerImage('img/big-pf-marker.png',
			      // This marker is 20 pixels wide by 32 pixels tall.
			      new google.maps.Size(65, 56),
			      // The origin for this image is 0,0.
			      new google.maps.Point(0,0),
			      // The anchor for this image is the base of the flagpole at 0,32.
			      new google.maps.Point(20, 50));
		  var shadow = new google.maps.MarkerImage('img/big-pf-marker-shadow.png',
			      // The shadow image is larger in the horizontal dimension
			      // while the position and offset are the same as for the main image.
			      new google.maps.Size(65, 56),
			      new google.maps.Point(0,0),
			      new google.maps.Point(20, 50));
			      // Shapes define the clickable region of the icon.
			      // The type defines an HTML &lt;area&gt; element 'poly' which
			      // traces out a polygon as a series of X,Y points. The final
			      // coordinate closes the poly by connecting to the first
			      // coordinate.

		 
 
		var marker = new google.maps.Marker({
			map: theMap,
			position: secheltLoc,
			visible: true,
			shadow: shadow,
	        icon: image
		});
 
		var myOptions = {
			 content: boxText
			,disableAutoPan: false
			,maxWidth: 0
			,pixelOffset: new google.maps.Size(-140, 0)
			,zIndex: null
			,boxStyle: { 
			  width: "280px"
			 }
			,closeBoxMargin: "-1000px"
			,infoBoxClearance: new google.maps.Size(1, 1)
			,isHidden: false
			,pane: "floatPane"
			,enableEventPropagation: false
		};
 
		google.maps.event.addListener(marker, "click", function (e) {
			ib.open(theMap, this);
		});
 
		var ib = new InfoBox(myOptions);
		ib.open(theMap, marker);
}

/*  Allgemeine Karte die eingeblendet wird  */

function initializeGlobal() {		
	var myOptions = {
		    zoom: 7,
		    center: new google.maps.LatLng(53.11619, 9.41835),
		    mapTypeId: google.maps.MapTypeId.ROADMAP
		  }
		  var map = new google.maps.Map(document.getElementById("map_canvas"),
		                                myOptions);
		 
		  setMarkers(map, standorte);
		}
		 
		/**
		 * Data for the markers consisting of a name, a LatLng and a zIndex for
		 * the order in which these markers should display on top of each
		 * other.
		 */
		var standorte = [
		  ['Ibbenbueren', 52.26835, 7.71656, 0],
		  ['Rotenburg', 53.11619, 9.41835, 1],
		  ['Quelkhorn', 53.13353, 9.08136, 2],
		  ['Wallenhorst', 52.35083, 7.99816, 3],
		  ['Zeven', 53.30609, 9.26746, 4],
		  ['Harsefeld', 53.4574653, 9.5002116, 5],
		  ['Sittensen', 53.28273, 9.50771, 6],
		  ['bramsche', 52.40663, 8.00028, 7],
		  ['Visselhoevede', 52.9887764, 9.5862673, 8],
		];
		console.log(standorte[0][0] +','+ standorte[1][0]);
		 
		function setMarkers(map, locations) {
		  // Add markers to the map
		 
		  // Marker sizes are expressed as a Size of X,Y
		  // where the origin of the image (0,0) is located
		  // in the top left of the image.
		 
		  // Origins, anchor positions and coordinates of the marker
		  // increase in the X direction to the right and in
		  // the Y direction down.
		  var image = new google.maps.MarkerImage('img/pf-marker.png',
		      // This marker is 20 pixels wide by 32 pixels tall.
		      new google.maps.Size(20, 32),
		      // The origin for this image is 0,0.
		      new google.maps.Point(0,0),
		      // The anchor for this image is the base of the flagpole at 0,32.
		      new google.maps.Point(0, 32));
		  var shadow = new google.maps.MarkerImage('img/pf-marker-shadow.png',
		      // The shadow image is larger in the horizontal dimension
		      // while the position and offset are the same as for the main image.
		      new google.maps.Size(37, 32),
		      new google.maps.Point(0,0),
		      new google.maps.Point(0, 32));
		      // Shapes define the clickable region of the icon.
		      // The type defines an HTML &lt;area&gt; element 'poly' which
		      // traces out a polygon as a series of X,Y points. The final
		      // coordinate closes the poly by connecting to the first
		      // coordinate.
		  var shape = {
		      coord: [1, 1, 1, 20, 18, 20, 18 , 1],
		      type: 'poly'
		  };
		  for (var i = 0; i < locations.length; i++) {
		    var standorte = locations[i];
		    var myLatLng = new google.maps.LatLng(standorte[1], standorte[2]);
		    var marker = new google.maps.Marker({
		        position: myLatLng,
		        map: map,
		        shadow: shadow,
		        icon: image,
		        shape: shape,
				className: i,
		        zIndex: standorte[3]
		    });
		    google.maps.event.addListener(marker, "mouseover", function (){
				  if (this.className == '0'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.ibbenbueren').addClass("maphover");
					  }
				  else if (this.className == '1'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.rotenburg').addClass("maphover");
					  }
				  else if (this.className == '2'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.quelkhorn').addClass("maphover");
					  }
				  else if (this.className == '3'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.wallenhorst').addClass("maphover");
					  }
				  else if (this.className == '4'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.zeven').addClass("maphover");
					  }
				  else if (this.className == '5'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.harsefeld').addClass("maphover");
					  }
				  else if (this.className == '6'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.sittensen').addClass("maphover");
					  }
				  else if (this.className == '7'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.bramsche').addClass("maphover");
					  }
				  else if (this.className == '8'){
					  $('.standorte').removeClass("maphover");
					  $('.standorte.visselhoevede').addClass("maphover");
					  }
				  else{
					  $('.standorte').removeClass("maphover");
					  }
					 
				});
		    google.maps.event.addListener(marker, "click", function (){
				  if (this.className == '0'){
					  window.location.href='http://www.pizza-flitza.com/index.php?id=12';
					  }
				  else if (this.className == '1'){
					  window.location.href='http://www.pizza-flitza.com/index.php?id=109';
					  }
				  else if (this.className == '2'){
					  }
				  else if (this.className == '3'){
					  window.location.href='http://www.pizza-flitza.com/index.php?id=2';
					  }
				  else if (this.className == '4'){
					  window.location.href='http://www.pizza-flitza.de/zeven';
					  }
				  else if (this.className == '5'){
					  }
				  else if (this.className == '6'){
					  window.location.href='http://www.pizza-flitza.de/zeven';
					  }
				  else if (this.className == '7'){
					  window.location.href='http://www.pizza-flitza.com/index.php?id=28';
					  }
				  else if (this.className == '8'){
					  }
				});
		  }
			
		}
