function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) === ' ') { c = c.substring(1); } if (c.indexOf(name) === 0) { return c.substring(name.length, c.length); } } return ""; } function showIoLog(animate) { //console.log('animate='+animate); if (animate==0) { $(".l-content .l-center").css("margin-right", 240); $(".to-top").css("right", 285); $(".to-shortcuts").css("right", 330); $(".right_sidebar").css("right", 0); //$(".io-log2").css("right", 0); //$("#myvesta_float").css("margin-right", 280); } else { $(".l-content .l-center").animate({"margin-right": 240}); $(".to-top").animate({"right": 285}); $(".to-shortcuts").animate({"right": 330}); $(".right_sidebar").animate({"right": 0}); //$(".io-log2").animate({"right": 0}); //$("#myvesta_float").animate({"margin-right": 280}); } /* $.ajax({url: "/list/log/", success: function(result){ $( ".io-log div" ).remove(); $($(result).find('.l-center.units')).insertAfter(".io-log h2"); $( ".io-log div" ).removeClass(); }}); */ } function hideIoLog(animate){ //console.log('animate='+animate); if (animate==0) { $(".l-content .l-center").css("margin-right", 40); $(".to-top").css("right", 85); $(".to-shortcuts").css("right", 130); $(".right_sidebar").css("right", -200); //$("#myvesta_float").css("margin-right", 100); } else { $(".l-content .l-center").animate({"margin-right": 40}); $(".to-top").animate({"right": 85}); $(".to-shortcuts").animate({"right": 130}); $(".right_sidebar").animate({"right": -200}); //$("#myvesta_float").animate({"margin-right": 100}); } } function checkCookie() { iolog = getCookie("iolog"); //console.log('cookie: "'+iolog+'"'); if (iolog === '1') { return 1; } if (iolog === '0') { return 0; } if (iolog == '') { //console.log('cookie is empty'); return ''; } } // function getRandomInt(max) { // return Math.floor(Math.random() * max); // } // var randomnumber=getRandomInt(100000000); var iohtml = '