alertbox = function() {} alertbox.warning = function (heading, message) { $('#alertbox').html('
×

' + heading + '

' + message + '
'); } alertbox.error = function (heading, message) { $('#alertbox').html('
×

' + heading + '

' + message + '
'); } alertbox.info = function (heading, message) { $('#alertbox').html('
×

' + heading + '

' + message + '
'); } var weekday = new Array(7); weekday[0] = "Sonntag"; weekday[1] = "Montag"; weekday[2] = "Dienstag"; weekday[3] = "Mittwoch"; weekday[4] = "Donnerstag"; weekday[5] = "Freitag"; weekday[6] = "Samstag"; function format_datetime(d) { if(Object.prototype.toString.call(d) === "[object Date]") { var daynames = new Array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'); var datetimestr = daynames[d.getDay()]; datetimestr += ' ' + d.getDate(); datetimestr += '.' + (d.getMonth() + 1); datetimestr += '.' + d.getFullYear(); datetimestr += (d.getHours() > 9 ? ' ' : ' 0') + d.getHours(); datetimestr += (d.getMinutes() > 9 ? ':' : ':0') + d.getMinutes(); datetimestr += (d.getSeconds() > 9 ? ':' : ':0') + d.getSeconds(); return datetimestr; } return d; }