function utf8_to_b64( str ) { return window.btoa(unescape(encodeURIComponent( str ))); } function b64_to_utf8( str ) { return decodeURIComponent(escape(window.atob( str ))); } function htmlbox(html) { var html2 = b64_to_utf8(html); $.confirm({ title: 'Info Box', closeIcon: true, escapeKey: 'OK', content: html2, draggable: false, useBootstrap: false, type: 'blue', typeAnimated: true, buttons: { OK: { keys: ['enter'], text: 'OK', btnClass: 'btn-blue', action: function(){ } }, } }); } function close_sidebar() { $('.side-bar').hide(); $(".menu-btn").show(); $(".ausblenden").show(); } function dsgvo() { var url = "https://www.schuetzen-dietersheim.de/cookie.save?"; $('#form_cookie input[type=checkbox]:checked').each( function(index){ var input = $(this).attr('id'); var ids = $('#'+input).val(); url += input+"="+ids+"&" } ); $.ajax({ type: 'GET', url: url, success: function(res) { } }); $('#footer-cookie').hide(); } function open_window(nn) { close_sidebar(); window.top.location.href = nn; } function open_new_window(nn) { close_sidebar(); window.open(nn); } function open_fancy(url,width,height) { if(width == ""){var width = "100%";} if(height == ""){var height = "100%";} $.fancybox.open({ 'src' : url, 'type' : 'iframe', opts : { scrolling: 'no', keyboard: true, clickSlide: "", clickOutside: "", touch: { vertical: false, momentum: false},iframe : {css : {'width' : width,'height': height}}} }); } function printIt(printThis) { var printThis2 = b64_to_utf8(printThis); win = window.open(); self.focus(); win.document.open(); // win.document.write('<'+'html'+'><'+'head'+'><'+'style'+'>'); // win.document.write(''); // win.document.write('body, td { font-family: Verdana; font-size: 10pt;}'); // win.document.write('<'+'/'+'style'+'><'+'/'+'head'+'><'+'body'+'>'); // win.document.write('Drucken - '); // win.document.write('Schließen
'); win.document.write(printThis2); // win.document.write('<'+'/'+'body'+'><'+'/'+'html'+'>'); win.document.close(); win.print(); win.close(); }