В щетчике тоже ноль выкидывает.
Код впринцепи не большой попробуйте запустить у себя если несложно, может увидите то чего не вижу я...
<title>Golfclub suche</title>
<style type="text/css">
/* Start of css that is not needed for the script */
body{
font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
margin-top:0px;
background-image:url('../../images/heading3.gif');
background-repeat:no-repeat;
padding-top:10px;
}
p{
margin-top:0px;
}
a{
color:#660000;
text-decoration:none;
}
/* End of css that is not needed for the script */
/* Don't delete anything below here */
.dhtmlgoodies_contentBox{
border:1px solid #317082;
height:100%;
visibility:hidden;
position:absolute;
background-color:#E2EBED;
overflow: auto;
padding:2px;
width:600px;
}
.dhtmlgoodies_content{
position:relative;
font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
width:100%;
font-size:0.8em;
}
</style>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAqhsoVuEo3BxAXgujPIiHdhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTtTNmWH0QF_Ew4EPElCVnWRPcXSQ" type="text/javascript"></script>
<script type="text/javascript">
var slideDownInitHeight = new Array();
var slidedown_direction = new Array();
var slidedownActive = false;
var contentHeight = false;
var slidedownSpeed = 8; // Higher value = faster script
var slidedownTimer = 7; // Lower value = faster script
var slidedownContentBox;
function slidedown_showHide(boxId)
{
start();
if(!slidedown_direction[boxId])slidedown_direction[boxId] = 1;
if(!slideDownInitHeight[boxId])slideDownInitHeight[boxId] = 0;
if(slideDownInitHeight[boxId]==0)slidedown_direction[boxId]=slidedownSpeed; else slidedown_direction[boxId] = slidedownSpeed*-1;
slidedownContentBox = document.getElementById(boxId);
var subDivs = slidedownContentBox.getElementsByTagName('DIV');
for(var no=0;no<subDivs.length;no++){
if(subDivs[no].className=='dhtmlgoodies_content')slidedownContent = subDivs[no];
}
contentHeight = slidedownContent.offsetHeight;
slidedownContentBox.style.visibility='visible';
slidedownActive = true;
slidedown_showHide_start(slidedownContentBox,slidedownContent);
}
function slidedown_showHide_start(slidedownContentBox,slidedownContent)
{
if(!slidedownActive)return;
slideDownInitHeight[slidedownContentBox.id] = slideDownInitHeight[slidedownContentBox.id]/1 + slidedown_direction[slidedownContentBox.id];
if(slideDownInitHeight[slidedownContentBox.id] <= 0){
slidedownActive = false;
slidedownContentBox.style.visibility='hidden';
slideDownInitHeight[slidedownContentBox.id] = 0;
}
if(slideDownInitHeight[slidedownContentBox.id]>contentHeight){
slidedownActive = false;
}
slidedownContentBox.style.height = slideDownInitHeight[slidedownContentBox.id] + 'px';
slidedownContent.style.top = slideDownInitHeight[slidedownContentBox.id] - contentHeight + 'px';
setTimeout('slidedown_showHide_start(document.getElementById("' + slidedownContentBox.id + '"),document.getElementById("' + slidedownContent.id + '"))',slidedownTimer); // Choose a lower value than 10 to make the script move faster
}
function setSlideDownSpeed(newSpeed)
{
slidedownSpeed = newSpeed;
}
</script>
</head>
<body onunload="GUnload()">
<div>
<div id="dhtmlgoodies_control"><a href="#" onclick="slidedown_showHide('box1');return false;">Show/Hide map</a></div>
<div class="dhtmlgoodies_contentBox" id="box1">
<div class="dhtmlgoodies_content" id="subBox1">
<div id="map" style="width: 600px; height: 600px"></div><br>
<div id="verbindung">
<table border="0">
<tr>
<td>
<input type="text" name="zieladresse" id="zieladresse"/>
</td>
<td>
<a href="javascript:makeDirection()" value="Verbindung suchen..">Verbindung suchen..</a>
</td>
</tr>
</table>
</div>
<div id="directions"></div>
<div id="tabelle"></div>
</div>
</div>
</div>
<script type="text/javascript">
var gdir=null;
var i = 0;
var geocoder;
var map;
var side_bar_html;
var address;
function myclick(i) {
gmarkers[i].openInfoWindowHtml(htmls[i],{maxWidth:230});
}
function start(){
geocoder = new GClientGeocoder();
side_bar_html = "";
var gmarkers = [];
var htmls = [];
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var mt = map.getMapTypes();
address = "Bonn";
geocoder.getLocations(address, addAddressToMap);
}
function addAddressToMap(response){
if (!response || response.Status.code != 200) {
alert("Die eingegebene Adresse konnte nicht gefunden werden.");
} else {
place = response.Placemark[0];
point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);
map.setCenter(new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]),11);
marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml("info");
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(info);
});
side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
i++;
}
}
function makeDirection(){
var tablica = document.createElement("div");
tablica.setAttribute("id", "tablica");
document.getElementById('subBox1').appendChild(tablica);
gdir = new GDirections(map, document.getElementById("tablica"));
setDirections(document.getElementById("zieladresse").value, address, "de");
}
function setDirections(fromAddress, toAddress, locale) {
gdir.load("from: " + fromAddress + " to: " + toAddress,{ "locale": locale });
}
</script>
</body>