function twoDigits(value) { if(value < 10) { return '0' + value; } return value; } $(document).ready(function() { // Format date in header var lastlogin = new Date($("#lastlogin").text() * 1000); //var d = Date.parse(lastlogin); $("#lastlogin").text(lastlogin.getFullYear() + "-" + twoDigits(lastlogin.getMonth()) + "-" + twoDigits(lastlogin.getDate()) + " " + twoDigits(lastlogin.getHours()) + ":" + twoDigits(lastlogin.getMinutes()) + ":" + twoDigits(lastlogin.getSeconds())); // this is necessary for the special setting feature (ref #1010) $.getQueryVariable = function(key) { var urlParams = decodeURI( window.location.search.substring(1) ); if(urlParams == false | urlParams == '') return null; var vars = urlParams.split("&"); for (var i=0;i