var ArraySlideshowPics = new Array(
	'/images/static/showroom/slideshow/101_1800.jpg',
	'/images/static/showroom/slideshow/101_1805.jpg',
	'/images/static/showroom/slideshow/101_1815.jpg',
	'/images/static/showroom/slideshow/101_1816.jpg',
	'/images/static/showroom/slideshow/101_1827.jpg'
);
var SlideshowIndex = 0;
function Slideshow(myParameter){
	if(document.getElementById("foto").style.visibility == 'hidden'){
		showDiv('fotos');
	} else {
		var tempPicLocation = '';
		if(myParameter == 'back'){
			SlideshowIndex--;
			if(SlideshowIndex < 0){
				SlideshowIndex = ArraySlideshowPics.length-1;
			}
		} else {
			SlideshowIndex++;
			if(SlideshowIndex < ArraySlideshowPics.length){
			} else {
				SlideshowIndex = 0;
			}
		}
		tempPicLocation = ArraySlideshowPics[SlideshowIndex];
		document.getElementById("SlidePicture").src = tempPicLocation;
	}
}
// Div Handler
function showDiv(myWhat){
	if(myWhat == 'map'){
		var Hide = document.getElementById("foto");
		Hide.style.visibility = "hidden";
		Hide.style.display = "none";
		var Show = document.getElementById("map");
		Show.style.visibility = "visible";
		Show.style.display = "block";
		MakeMap();
	} else if(myWhat == 'fotos'){
		GUnload();
		var Hide = document.getElementById("map");
		Hide.style.visibility = "hidden";
		Hide.style.display = "none";
		var Show = document.getElementById("foto");
		Show.style.visibility = "visible";
		Show.style.display = "block";
	}
}
// GOOGLE-MAPS
function MakeMap(){
var iconStrandgutshop;

var INFOWINDOW_HTML='<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px;">Strandgutshop.biz GmbH<br>Showroom<br>Gasstra&szlig;e 2A<br>22761 Hamburg<br><br>Tel. +49-(0)180 - 57 87 262</span>';

  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(53.5610041868855, 9.916684627532959), 13);
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.addControl(new GScaleControl());
    
    
		iconStrandgutshop = new GIcon();
		iconStrandgutshop.image = "http://www.strandgutshop.biz/images/iconstrandgut.png";
		iconStrandgutshop.iconSize = new GSize(20, 20);
		iconStrandgutshop.iconAnchor = new GPoint(5, 19);
		iconStrandgutshop.infoWindowAnchor = new GPoint(10, 1);
		
    var marker=new GMarker(new GLatLng(53.5610041868855, 9.916684627532959), {icon: iconStrandgutshop});
    //var marker = new GMarker(new GLatLng(53.5610041868855, 9.916684627532959));
    map.addOverlay(marker);
    GEvent.addListener(marker, "click", function() {
      marker.openInfoWindowHtml(INFOWINDOW_HTML);
    });
    marker.openInfoWindowHtml(INFOWINDOW_HTML);
    
    
  }
}
