function popup (url) { fenster=window.open(url, "_blank", "width=945,height=900,status=yes,scrollbars=yes,resizable=yes"); fenster.focus(); return false; } function cal(felem,fform){ window.open('kalender.php?felem='+felem+'&fform='+fform,'','width=220, height=205, scrollbars=no, top='+((screen.height/2)-(205/2))+', left='+((screen.width/2)-(220/2))+''); } var myTimeInterval; function loadServerTime() { var url = "_inc/time.php?timeStamp=" + new Date().getTime(); var params = ""; var myAjax = new Ajax.Request( url, { method: "GET", parameters: params, onComplete: updateTime }); } function updateTime(xnr) { $('TimeDiv').innerHTML = xnr.responseText; } // window.setInterval("loadServerTime()", 1000); $(document).ready(function() { // ZEIT INITIALISIEREN var dt = new Date(1743743655000); // ZEIT EINMAL IN DER MINUTE VOM SERVER HOLEN setInterval(function() { $.ajax({ type: "POST", url: 'https://www.agma-mmc-downloadbereich.de/_inc/time.php', success: function(response){ timeInt = parseInt(response); dt = new Date(timeInt); } }); }, (1000*30)); // ZEIT PRO SEKUNDE IN JAVASCRIPT WEITERZAEHLEN setInterval(function() { var stunden = dt.getHours(); if(stunden<10) stunden = "0"+stunden; var minuten = dt.getMinutes(); if(minuten<10) minuten = "0"+minuten; var sekunden = dt.getSeconds(); if(sekunden<10) sekunden = "0"+sekunden; var jstime = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds(); $('#TimeDiv').text("04.04.2025 - "+stunden+":"+minuten+":"+sekunden); dt.setSeconds(dt.getSeconds() + 1); }, 1000); });