//<![CDATA[
/*************************************************
 * Created with GoogleMapAPI 2.3
 * Author: Monte Ohrt <monte AT ohrt DOT com>
 * Copyright 2005-2006 New Digital Group
 * http://www.phpinsider.com/php/code/GoogleMapAPI/
 *************************************************/
var points = [];
var markers = [];
var counter = 0;
var sidebar_html = "";
var marker_html = [];
var icon = [];
icon[0] = new GIcon();
icon[0].image = "http://www.campingshongarije.nl/images2/gmarkers/m1.png";
icon[0].shadow = "http://www.campingshongarije.nl/images2/gmarkers/shadow.png";
icon[0].shadowSize = new GSize(37,34);
icon[0].iconSize = new GSize(20,34);
icon[0].iconAnchor = new GPoint(10,17);
icon[0].infoWindowAnchor = new GPoint(10,17);
var map = null;
function onLoad() {
if (GBrowserIsCompatible()) {
var mapObj = document.getElementById("map");
if (mapObj != "undefined" && mapObj != null) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(47.4761, 19.0835), 10, G_NORMAL_MAP);
map.addControl(new GScaleControl());
map.savePosition();cj(map.getZoom());ew = new EWindow(map, E_STYLE_7); 
map.addOverlay(ew);
var point = new GLatLng(47.4761,19.0835);
var marker = createMarker(point,"<img src=\"http://www.campingshongarije.nl/images2/star3.gif\">Camping Haller","<div id=\"gmapmarker\"><!--<div id=\"gmap_popup\" style=\"width:250px\">--> <table width=\"330px\" align=\"center\" height=\"98\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 330px;\"> <tr valign=\"top\" width=\"330px\"> <td bgcolor=\"#ff9a31\" colspan=\"2\" width=\"330px\" height=\"20\"> <table width=\"100%\" height=\"20\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"> <tr valign=\"middle\"> <td class=\"gmap_hname\" width=\"4\">&nbsp;</td> <td nowrap class=\"gmap_hname\" width=\"100%\" align=\"left\">Camping Haller</td> <td class=\"gmap_hname\">&nbsp;</td> <td width=\"1%\" class=\"gmap_hname\" align=\"right\"><img src=\"http://www.campingshongarije.nl/images2/star3.gif\" border=\"0\" hspace=\"0\" vspace=\"0\"></td> <td class=\"gmap_hname\">&nbsp;</td> <td class=\"gmap_hname\" width=\"20\" align=\"center\" valign=\"middle\"> <a onclick=\"ew.hide(); ClickOnClose();\" style=\"cursor: default; vertical-align: middle;\" id=\"linkCurrent\"> <img src=\"http://www.campingshongarije.nl/images2/map/close.gif\" border=\"0\" width=\"12\" height=\"11\" hspace=\"0\" vspace=\"0\"> </a> </td> </tr> </table> </td> </tr> <tr valign=\"top\" width=\"330px\"> <td bgcolor=\"white\" width=\"330px\" height=\"78\"> <table width=\"100%\" cellspacing=\"3\" cellpadding=\"1\" border=\"0\"> <tr valign=\"top\"> <td bgcolor=\"white\" width=\"100%\" height=\"58\" align=\"left\"> Haller utca 27, H-1096, Budapest<br> Camping Haller is gelegen in het centrum van Budapest, in de buurt zijn er restaurants en supermarkten, ook zijn de bezienswaardigheden makkelijk te bereiken.  </td> </tr> <tr valign=\"top\"> <td bgcolor=\"white\" width=\"100%\" height=\"20\"> <a href=\"http://www.campingshongarije.nl/hongarije/budapest/camping-haller-budapest.html\">Meer info</a> </td> </tr> </table> </td> <td bgcolor=\"white\" height=\"78\" nowrap valign=\"top\"> <a href=\"http://www.campingshongarije.nl/hongarije/budapest/camping-haller-budapest.html\"> <img src=\"http://www.campingshongarije.nl/himages/small_1913.jpg\" width=\"70\" height=\"70\" border=\"0\" hspace=\"10\" vspace=\"10\"> </a> </td> </tr> <!--</div>--></div>", 0);
map.addOverlay(marker);
document.getElementById("sidebar_map").innerHTML = "<ul class=\"gmapSidebar\">"+ sidebar_html +"</ul>";
}
} else {
alert("Sorry, the Google Maps API is not compatible with this browser.");
}
}
function createMarker(point, title, html, n) {
if(n >= 1) { n = 0; }
var marker = new GMarker(point,{'icon': icon[n]});
if(isArray(html)) { GEvent.addListener(marker, "click", function() { marker.openInfoWindowTabsHtml(html); }); }
else { 
            GEvent.addListener(marker, "click", function() { 
            ClickOnMarker(marker, html); }); 
            GEvent.addListener(marker, "infowindowclose", function () {
            ClickOnClose(marker); });
            GEvent.addListener(marker, "infowindowopen", function () {
            InfoWindowOpen(marker); });
            }
points[counter] = point;
markers[counter] = marker;
marker_html[counter] = html;
sidebar_html += '<li class="gmapSidebarItem" id="gmapSidebarItem_'+ counter +'"><a href="javascript:click_sidebar(' + counter + ')">' + title + '</a></li>';
counter++;
return marker;
}
function isArray(a) {return isObject(a) && a.constructor == Array;}
function isObject(a) {return (a && typeof a == 'object') || isFunction(a);}
function isFunction(a) {return typeof a == 'function';}
function click_sidebar(idx) {
  if(isArray(marker_html[idx])) { markers[idx].openInfoWindowTabsHtml(marker_html[idx]); }
  else { ClickOnMarker(markers[idx], marker_html[idx]); }
}
function showInfoWindow(idx,html) {
map.centerAtLatLng(points[idx]);
markers[idx].openInfoWindowHtml(html);
}
//]]>
