var smid = ""; var myImage = new Image(); myImage.src = "/proimages/menu_left.gif"; var myImage1 = new Image(); myImage1.src = "/proimages/menubg.gif"; var myImage2 = new Image(); myImage2.src = "/proimages/menu_right.gif"; //hides and shows menu var previousid = ""; function ShowSub(id){ if(document.getElementById(id).value==1){ document.getElementById(id).value=0; document.getElementById(id).style.visibility='hidden'; document.getElementById(id).style.display='none'; }else{ document.getElementById(id).style.visibility='visible'; document.getElementById(id).style.display='block'; document.getElementById(id).value=1; if(previousid != id) hideprevmenu(previousid); } previousid = id; } function hideprevmenu(id){ if(id){ str = new String(id); sub_str = str.substr(0,3); if(sub_str == "SUB"){ document.getElementById(id).value=0; document.getElementById(id).style.visibility='hidden'; document.getElementById(id).style.display='none'; } } } // function GetXmlHttpObject(){ // var xmlHttp=null; // try // { // // Firefox, Opera 8.0+, Safari // xmlHttp=new XMLHttpRequest(); // } // catch (e) // { // // Internet Explorer // try // { // xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // } // catch (e) // { // xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); // } // } // return xmlHttp; // } function GetXmlHttpObject() { var AjaxObj = false; if(window.XMLHttpRequest){ AjaxObj = new XMLHttpRequest(); } else if (window.ActiveXObject){ AjaxObj=new ActiveXObject("Msxml2.XMLHTTP"); if (!AjaxObj){ AjaxObj=new ActiveXObject("Microsoft.XMLHTTP"); } } return(AjaxObj); } var map = null; var geocoder = null; //loads the map function loadMap() { var icon = new GIcon(); icon.image = "/google_map_icons/om_cl.png"; icon.shadow = "/google_map_icons/om_cl.png"; icon.iconSize = new GSize(50, 50); icon.shadowSize = new GSize(50, 50); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); // address = 'bad rodach germany'; address = '50.320000, 10.777855'; if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(50.341431, 10.777855), 5); geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { //alert(address + " not found"); } else { map.setCenter(point, 10); var marker = new GMarker(point,icon); map.addOverlay(marker); // GEvent.addListener(marker, "click", function() { // map.setCenter(point, 15); // var marker = new GMarker(point,icon); // map.addOverlay(marker); // marker.openInfoWindowHtml("Bad Rodach Germany"); // }); } } ); } } } //default plan map function defaultloadMap(){ if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(50.341431, 10.777855), 12); } } var accommodationicon = "/google_map_icons/unterkunfte.png"; var accommodationshadowicon = "/google_map_icons/unterkunfte.png"; var restauranticon = "/google_map_icons/gaststaetten.png"; var restaurantshadowicon = "/google_map_icons/gaststaetten.png"; var sightsicon = "/google_map_icons/sehenswuerdigkeiten.png"; var sightsshadowicon = "/google_map_icons/sehenswuerdigkeiten.png"; var routeicon = "/binary_data/"; var routeshadowicon = "/binary_data/"; var table_name = ""; var postcode = ""; var street = ""; var loc_name = ""; function showAddress(table_name,postcode,street,loc_name,info,img_name,geocode) { var icon = new GIcon(); if(table_name == 'accommodation'){ icon.image = accommodationicon; icon.shadow = accommodationshadowicon; } if(table_name == 'restaurant'){ icon.image = restauranticon; icon.shadow = restaurantshadowicon; } if(table_name == 'sights'){ icon.image = sightsicon; icon.shadow = sightsshadowicon; } if(table_name == 'route'){ icon.image = routeicon + img_name; icon.shadow = routeshadowicon + img_name; } icon.iconSize = new GSize(22, 22); icon.shadowSize = new GSize(22, 22); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); info = replace(info,"#","\""); if(table_name == "sights"){ // street = decodeURI(street); address = street.toString()+', '+ postcode.toString() +' '+ loc_name.toString() + ', germany' ; }else{ if(geocode!=="GeoCode"){ address = geocode.toString(); }else{ address = street.toString()+', '+ postcode.toString() +' '+ loc_name.toString() + ', germany' ; } } if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(50.341431, 10.777855), 15); geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert("sorry select location could not be found"); } else { var marker = new GMarker(point,icon); map.setCenter(point, 15); map.addOverlay(marker); marker.openInfoWindowHtml(info); // var tmpMarker = createMarker(point,addr,map,info); // map.addOverlay(tmpMarker); // map.setCenter(point, 15); // tmpMarker.openInfoWindowHtml(info); } } ); } } } var googleInfo = new Array(); var postcodestring = ""; var addr = null; var postcodearray = null; var pointstr = ""; function showAddresses(table,location,lang_id){ pointstr = ""; //point the location on the map if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(50.341431, 10.777855), 12); geocoder = new GClientGeocoder(); //gets the postcode of the accommodation under selected location xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="getPostCode.php"; url=url+"?xTm="+ Math.random() +"&table="+table; // if(table=="accommodation" || table == "restaurant"){ // url=url+"&location="+ location; // }else{ // url=url+"&location_id="+location; // } url=url+"&location_id="+location; url=url+"&lang_id=de"; xmlHttp.onreadystatechange=function getpost(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { postcodestring = xmlHttp.responseText; if(postcodestring){ postcodearray = postcodestring.split("###"); for(i=0,j=0;i