function do_initialize(){ maanden = ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "October", "November", "December" ]; //============================== game info such as jackpots of every game, game still running or not, ======================================== //============================== nr of players per game etc etc etc ======================================== var dateObj = new Date(); var month = lasttwodigitsInt(dateObj.getUTCMonth() + 1); //months from 1-12 var year = dateObj.getUTCFullYear(); deadline = maanden[parseInt(month)]+" 1 "+year; getgameinfo(); //in 'subs' Get the statusses of 'active games' and present the info where appropriate (every page will do this) //left=getTimeRemaining(deadline); // document.getElementById("jackpot").innerHTML = "JACKPOT  Euro 577,50"; // // detrmine the language // van2 = document.getElementById("flag_used").src; van1 = van2.substr(-6); van = van1.substr(0, 2); window.land = van; //for non language_xx 's if (document.cookie.indexOf("language") >= 0) { language_index = getCookie("language"); language_flag = getCookie("language_flag"); land = language_flag.substr(-6); land = land.substr(0, 2); // alert("land="+land); window.land = land; document.getElementById("Select1").selectedIndex = language_index; document.getElementById("flag_used").src = language_flag; setlanguage('language'); // htmltochange= new XMLSerializer().serializeToString(document); // setlanguage(htmltochange); } else { setCookie("language", 'EN'); setCookie("language_flag", 'img/flags/EN.png'); document.getElementById("Select1").selectedIndex = 1; // (zet op holland(nr 13) document.getElementById("flag_used").src = "img/flags/EN.png"; } // window.ht14 = document.getElementById("language_14").innerHTML; // window.ht15 = document.getElementById("language_15").innerHTML; if (document.cookie.indexOf("useremail") < 0 && !document.getElementById("language_16")) { // do this if caller is NOT index.php window.location.href ="index.php"; //swipe down to go to home } if (document.cookie.indexOf("useremail") >= 0) { useremail = getCookie("useremail"); if (document.cookie.indexOf("username") >= 0) { username = getCookie("username"); window.user = username; window.email = useremail; window.loggedin = 'yes'; removeClass("disabled"); } else { document.getElementById("language_02").style.display='none'; username = useremail; setCookie("username", username); } } if (window.user == 'arno') { // document.getElementById("admin").style.display = 'block'; } else { // document.getElementById("admin").style.display = 'none'; //for now } var width = window.innerWidth; var height = window.innerHeight; console.log(width + " " + height); window.width=width; if (width<900 ){ if ($('#jackpot').length > 0) { // Exists. document.getElementById("jackpot").style.color="white"; document.getElementById("jackpot").style.marginTop="-50px"; document.getElementById("jackpot").style.fontSize="medium"; removeClass("arno"); } if (document.getElementById("OplossingTable")){ document.getElementById("OplossingTable").style.width="100%"; document.getElementById("wrapper").style.width="100%"; } } if (window.user && window.user != '' && window.user != 'undefined') { //alert(window.user); // document.getElementById("id_login").style.display = 'none'; document.getElementById("showedname").innerHTML = window.user + "   "; document.getElementById("showedname").title = "'Klik to logoff' "+window.email; var elementExists = document.getElementById("voorarno"); if(elementExists){ document.getElementById("voorarno").style.display='block'; } setCookie('username', window.user); setCookie('useremail', window.email); // document.getElementById("myTopnav").style.pointerEvents = 'block'; // document.getElementById("myTopnav").style.opacity = 1; if (window.user == 'bart' || window.user == 'arno') { // document.getElementById("admin").style.display = 'block'; } else { // document.getElementById("admin").style.display = 'none'; //for now } } else { document.getElementById("showname").style.display = 'block'; if (window.user == 'undefined') { window.user = "No Login"; window.loggedin = "no"; window.email = "No email"; // document.getElementById("myTopnav").style.pointerEvents = 'none'; // document.getElementById("myTopnav").style.opacity = 0.4; } } var newURL = window.location.protocol + "//" + window.location.host + "/" + window.location .pathname + window.location.search; //alert(newURL); var str = newURL.split("="); if (str[1]) { var res = str[1].replace(/%20/g, " "); // replace all occurences of "%20" with " " } else { // document.getElementById("showlogin").style.display='block'; } }