var win; var pe; var div; var exml; var mmap; function getImg(d) { var img = win[0].contentElem.firstChild.childNodes[1].childNodes[0]; var ig = win[0].contentElem.firstChild.childNodes[1].firstChild.id.split('_')['1']; var src = 'http://kampnagel.webmasterei.com/uploads/tx_kampnagel/' + d + '_' + ig + '.png?' + Math.random(1,999); img.src= src; } function ginit() { mmap = new GMap2(document.getElementById("map")); mmap.setCenter(new GLatLng( 53.583222, 10.021180),18); mmap.addControl(new GSmallMapControl()); mmap.setMapType(G_HYBRID_MAP); exml = new EGeoXml("exml", mmap, "kampnagelsolar.xml", { sidebarid:"the_side_bar", iwwidth:300, iwheight:240, preloadimages:true }); exml.parse(); // Element.setOpacity($('this_side_bar'),0.7); GEvent.addListener(mmap,"infowindowprepareopen", function(m){ win=m; startMonitor();}); } function getkW() { var id = win[0].contentElem.firstChild.childNodes[1].firstChild.id.split('_')['1']; getImg($('wahl').options[$('wahl').selectedIndex].value); new Ajax.Updater($('kw'),'./getkw.php?ig=' + id); } function startMonitor() { div = win[0].contentElem; // fehlt noch ig und andere Tage div.innerHTML = "
" + div.innerHTML + '
' + "
" + " letzte Messung:   kW  " + "
" if (!pe) pe = new PeriodicalExecuter(getkW,123); //mmap.updateInfoWindow(); setTimeout(getkW,300); }