var map;
var infoTabs;

function load() { 
	if (GBrowserIsCompatible()) { 
		no=Math.floor(Math.random()*16)+2;
		map = new GMap2(document.getElementById("map")); 
		//map.setCenter(new GLatLng(52.341673, 4.880755), 20); 
		map.setCenter(new GLatLng(52.341819, 4.880755), 18); 
		map.setMapType(G_HYBRID_MAP);
		icon = new GIcon();
		icon.image = "images/marker.png";
		icon.iconSize = new GSize(20, 34); 
		icon.iconAnchor = new GPoint(23, 45); 
		icon.infoWindowAnchor = new GPoint(5, 1); 
		marker=new GMarker(new GLatLng(52.341505, 4.8803390), icon); 
		if(ieVer!=6){
			//map.addControl(new GMapTypeControl());
			//map.addControl(new GLargeMapControl());
			map.enableContinuousZoom();
			map.enableDoubleClickZoom();
			map.enableScrollWheelZoom();
			map.addOverlay(marker); 
			
			var tab1 = new GInfoWindowTab("Contact", "<iframe src=\"home.php\" width=\"350\" height=\"115\" frameborder=\"0\" scrolling=\"no\"></iframe>",loadTab1);
			var tab2 = new GInfoWindowTab("Foto's", "<iframe src=\"nix.php\" name=\"pics\" width=\"350\" height=\"115\" frameborder=\"0\" scrolling=\"no\"></iframe>",loadTab2);
			var tab3 = new GInfoWindowTab("Info", "<iframe src=\"info.php\" width=\"350\" height=\"115\" frameborder=\"0\" scrolling=\"auto\"></iframe>",loadTab3);			
			infoTabs = [tab1,tab2,tab3];
			GEvent.addListener(marker, 'click', function() {
				marker.openInfoWindowTabsHtml(infoTabs);
			});
			marker.openInfoWindowTabsHtml(infoTabs);
		}
		
	}
}   

function loadTab1() {
	var infoWin = map.getInfoWindow();
	infoWin.selectTab(0);
	hideCntnt();
}		

function loadTab2() {
	var infoWin = map.getInfoWindow();
	infoWin.selectTab(1);
	pics.location="as_imgs.php";
	hideCntnt();
}  

function loadTab3() {
	var infoWin = map.getInfoWindow();
	infoWin.selectTab(2);
	hideCntnt();
}		

function pop(n){
	cntnt_frm.location="as_imgs_big.php?n="+n;
	openCntnt();
}

function hideCntnt(){
	$("#cntnt").slideUp(600);
}	 

function openDoc(doc){
	cntnt_frm.location=doc+".php";
	openCntnt();
}

function openCntnt(){
	map.setCenter(new GLatLng(52.341673, 4.880755), 19); 
	t=(h/2)-121;
	$("#cntnt").css({top:t+"px"});
	$("#cntnt").slideDown(600);
}
