function closePlan(){
	document.getElementById("plan_bg").style.position = "absolute";
	document.getElementById("plan_bg").style.left = "0px";
	document.getElementById("plan_bg").style.top = "0px";
	document.getElementById("plan_bg").style.width = "0px";
	document.getElementById("plan_bg").style.height = "0px";
	
	document.getElementById("plan_border").style.position = "absolute";
	document.getElementById("plan_border").style.left = "0px";
	document.getElementById("plan_border").style.top = "0px";
	document.getElementById("plan_border").style.width = "0px";
	document.getElementById("plan_border").style.height = "0px";
	
	document.getElementById("plan_hidden").style.position = "absolute";
	document.getElementById("plan_hidden").style.left = "0px";
	document.getElementById("plan_hidden").style.top = "0px";
	document.getElementById("plan_hidden").style.width = "0px";
	document.getElementById("plan_hidden").style.height = "0px";
	
	document.getElementById("plan").style.position = "absolute";
	document.getElementById("plan").style.left = "0px";
	document.getElementById("plan").style.top = "0px";
	document.getElementById("plan").style.width = "0px";
	document.getElementById("plan").style.height = "5px";
	document.getElementById("plan").innerHTML = "";	
}

function showPlan(){
	document.getElementById("plan_bg").style.position = "absolute";
	document.getElementById("plan_bg").style.left = "0px";
	document.getElementById("plan_bg").style.top = "0px";
	document.getElementById("plan_bg").style.width = "100%";
	document.getElementById("plan_bg").style.height = "100%";
	document.getElementById("plan_bg").style.backgroundColor = "#000000";
	
	document.getElementById("plan_border").style.position = "absolute";
	document.getElementById("plan_border").style.left = "50%";
	document.getElementById("plan_border").style.marginLeft = "-335px";
	document.getElementById("plan_border").style.top = "50%";
	document.getElementById("plan_border").style.marginTop = "-235px";
	document.getElementById("plan_border").style.width = "670px";
	document.getElementById("plan_border").style.height = "470px";
	
	document.getElementById("plan_hidden").style.position = "absolute";
	document.getElementById("plan_hidden").style.left = "50%";
	document.getElementById("plan_hidden").style.marginLeft = "-325px";
	document.getElementById("plan_hidden").style.top = "50%";
	document.getElementById("plan_hidden").style.marginTop = "-225px";
	document.getElementById("plan_hidden").style.width = "650px";
	document.getElementById("plan_hidden").style.height = "450px";
	document.getElementById("plan_hidden").style.overflow = "hidden";
	
	document.getElementById("plan").style.position = "absolute";
	document.getElementById("plan").style.left = "50%";
	document.getElementById("plan").style.marginLeft = "-325px";
	document.getElementById("plan").style.top = "50%";
	document.getElementById("plan").style.marginTop = "-225px";
	document.getElementById("plan").style.width = "650px";
	document.getElementById("plan").style.height = "485px";
	document.getElementById("plan").style.overflow = "hidden";
	
	document.getElementById("close_plan").style.position = "absolute";
	document.getElementById("close_plan").style.right = "0px";
	document.getElementById("close_plan").innerHTML = "<a href='javascript:closePlan();'><img src='../images/close_plan.png' /></a>";
	
	initializeGMAP();
}

function initializeGMAP() {
	if (GBrowserIsCompatible()) {
		var strMarker;
		strMarker = "<div id='info_contact'>";
		strMarker += "<b>Modelspoorclub VZW Locomatic</b><br />";
		strMarker += "Otegemstraat 238 bus 1<br />";
		strMarker += "8550 ZWEVEGEM<br />";
		strMarker += "T +32(0)56/75.84.48<br />";
		strMarker += "E <a href='mailto:info@locomatic.eu' id='info'>info@locomatic.eu</a><br />";
		strMarker += "<br />";
		strMarker += "<b>Openingsuren:</b><br />";
		strMarker += "Woensdag 14.00-20.00<br />";
		strMarker += "Zondag 09.00-13.00";
		strMarker += "</div>";
		var map = new GMap2(document.getElementById("plan"));
		
		map.addControl(new GLargeMapControl3D());

		map.setCenter(new GLatLng(50.816883, 3.351527), 15);
		
		var pointer = new GIcon(G_DEFAULT_ICON);
		/*pointer.shadow = "";*/
		pointer.iconSize = new GSize(0, 0);
		pointer.shadowSize = new GSize(0, 0);
		/*pointer.iconAnchor = new GPoint(0, 0);*/
		pointer.infoWindowAnchor = new GPoint(9, 38);
		// Set up our GMarkerOptions object
		markerOptions = {icon:pointer};
		
		var marker = new GMarker(new GLatLng(50.816883, 3.351527), markerOptions);
		map.addOverlay(marker);
		GEvent.addListener(marker, "click", function(){
			marker.openInfoWindowHtml(strMarker);			
		});
		marker.openInfoWindowHtml(strMarker);
  	}
}
