var popupHeight = screen.height; var popupWidth = screen.width; var IE6 = false; //var do_popup = false; var do_popup = false; tool_displayed = true; function cookiehandler(){ this.setCookie = function (name, value, expires) { this.cookiedate = new Date(); this.cookiedate = new Date(this.cookiedate.getTime() + expires); document.cookie = name + '=' + value + ';path=/;expires=' + this.cookiedate.toGMTString() + ';'; } this.read = function(name){ this.cookie = document.cookie; //alert(this.cookie); this.bResult = ''; //alert(strpos( this.cookie, 'display', true)); if(strpos( this.cookie, 'hide', true) !== false){ this.bResult = 'hide'; } else { this.bResult = 'display'; } /** while(this.cookie != '') { this.cookiename = this.cookie.substring(0, this.cookie.search('=')); this.cookiename = this.trim(this.cookiename); this.cookievalue = this.cookie.substring(this.cookie.search('=') + 1, this.cookie.search(';')); //alert(this.cookiename + ' = ' + this.cookievalue); if(this.cookievalue == '') { this.cookievalue = 'display'; } if(name == this.cookiename){ //alert('sticky: '+this.cookievalue); this.bResult = this.cookievalue; break; } var i = this.cookie.search(';') + 1; if(i == 0){ i = this.cookie.length } this.cookie = this.cookie.substring(i, this.cookie.length); } */ return this.bResult; } this.del = function(name){ document.cookie = name + '=;path=/;expires=Thu, 01-Jan-70 00:00:01 GMT;'; } // Erst fuehrende, dann Abschliessende Whitespaces entfernen // und das Ergebnis dieser Operationen zurueckliefern this.trim = function(string){ return string.replace (/^\s+/, '').replace (/\s+$/, ''); } } var scriptNode = document.currentScript; if(scriptNode){ var position_right = 50; var postitpicture = "//mm.7-7-7-partner.com/t7lc/browsersticky/browsersticky.de.png"; var postittourl = "https://t7strip.com/?menuid=bill&l=redrose&id=P54556&h=on&stid=browsersticky&targeturl=aW5kZXgucGhwP2lkPVA1NDU1Ng%3D%3D&camid=0&click=dG9vbD1icm93c2Vyc3RpY2t5JmRpc3BsYXllZD0xNjEyODU4NjkzJmxpZD03MCZzdGlkPWJyb3dzZXJzdGlja3k%3D"; if (postitpicture !== undefined) { var postit_imagesource = postitpicture; } else { var postit_imagesource = '//mm.7-7-7-partner.com/t7lc/browsersticky/iepng.htc.php'; } if (postittourl !== undefined) { var postit_send_to = postittourl; } else { var postit_send_to = 'https://t7strip.com/?menuid=bill&l=redrose&id=P54556&h=on&stid=browsersticky&targeturl=aW5kZXgucGhwP2lkPVA1NDU1Ng%3D%3D&camid=0&click=dG9vbD1icm93c2Vyc3RpY2t5JmRpc3BsYXllZD0xNjEyODU4NjkzJmxpZD03MCZzdGlkPWJyb3dzZXJzdGlja3k%3D'; } var styles = []; styles.push( 'div.sticky{ '); styles.push( ' position:absolute;'); styles.push( ' top:-200px;'); styles.push(' right: ' + position_right + 'px;'); styles.push(' visibility:hidden; '); styles.push(' z-index:10000;'); styles.push(' color:black;'); styles.push(' box-shadow: 10px 10px 20px grey; '); styles.push('} '); styles.push('div.sticky img,div { '); styles.push(' border-width:0px; '); styles.push(' background-color:transparent; '); styles.push('} '); var divs = []; divs.push('
'); divs.push(' '); divs.push(' '); divs.push(' '); if(do_popup){ divs.push(' '); }else { divs.push(' '); } divs.push(' '); divs.push('
'); var style = document.createElement('STYLE'); style.type = 'text/css'; style.innerHTML = styles.join(''); var div = document.createElement('DIV'); div.id = 'sticky'; div.classList.add('sticky'); div.innerHTML = divs.join(''); scriptNode.parentNode.insertBefore(style, scriptNode.nextSibling); style.parentNode.insertBefore(div, style.nextSibling); var postit_interval = null; var postit_verzoegerung = 0; var postit_refreshspeed = 10; //in welchen intervallen wird das bild bewegt millisekunden var postit_movingdistance = 5; //wie weit bewegt sich das bild in pixeln var postit_movingstop = 10; //linke position des bildes in pixeln var postit_moveuntil = 50; var postit_bottomreached = false; var postit_ns4 = document.layers; var postit_ie4 = document.all; var postit_ns6 = document.getElementById && !document.all; var postit_crossobj; if (postit_ns4) { var postit_crossobj = document.layers.sticky; } else if (postit_ie4 || postit_ns6) { var postit_crossobj = postit_ns6 ? document.getElementById("sticky") : document.all.sticky; } // nachsehen ob ein Cookie gesetzt wurde das bestimmt ob das Sticky angezeigt werden soll var stickydisplay = true; var c = new cookiehandler(); if(document.cookie){ var cookievalue = c.read('sticky'); if(cookievalue.length == 0){ //alert('cookie wurde nicht gefunden, wird gesetzt!!'); } if(cookievalue == 'hide'){ stickydisplay = false; c.del('sticky'); c.setCookie('sticky', 'hide', 300000); //alert('sticky darf nicht angezeigt werden, cookie wurde erneuert'); } else { // Cookie loeschen c.del('sticky'); } } if(stickydisplay == true){ // cookie setzen c.setCookie('sticky', 'display', 300000); //var value = c.read("sticky"); //alert('sticky anzeigen, cookie gesetzt value:' + value); window.setTimeout('postit_showit()',postit_verzoegerung*1000); } } function postit_closeit(){ if (postit_ie4 || postit_ns6) { postit_crossobj.style.visibility = "hidden"; } else if (postit_ns4) { postit_crossobj.visibility = "hide"; } var img = new Image(); img.src = '//mm.7-7-7-partner.com/t7lc/browsersticky/popuphide.php'; // cookie setzen lebensdauer 5 Minuten // Cookie loeschen und ein neues setzen var c = new cookiehandler(); if(document.cookie){ //alert('cookievalue: ' + c.read('sticky') + ' war gesetzt'); c.del('sticky'); } c.setCookie('sticky', 'hide', 300000); //alert('cookievalue: ' + c.read('sticky') + ' ist gesetzt fuer ' + window.location.host); return true; } /** * sucht das erste vorkommen in einem string */ function strpos( haystack, needle, offset){ var i = haystack.indexOf(needle, offset); // returns -1 return i >= 0 ? i : false; } function postit_sendto() { window.open(postit_send_to,'login', 'width=' + popupWidth + ',height=' + popupHeight + ',menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); postit_closeit(); return true; // wenn nicht Anmeldefenster, toolbar u. aehnliches anzeigen if(!strpos(postit_send_to, '/cam_register')){ // window.open(postit_send_to,'_blank', 'width=' + popupWidth + ',height=' + popupHeight + ',menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes'); } else { // nichts } } function postit_showit(){ if (postit_ie4||postit_ns6) { postit_crossobj.style.visibility = "visible"; } else if (postit_ns4) { postit_crossobj.visibility = "show"; } postit_interval = window.setInterval('postit_movepostit()', postit_refreshspeed); postit_movepostit(); } function postit_movepostit() { var postit_mp = document.getElementById('sticky'); if (postit_mp && postit_interval) { if (postit_bottomreached && postit_movingdistance > 1) { postit_movingdistance /= 1.02; } if (postit_bottomreached && postit_movingdistance < 1) { window.clearInterval(postit_interval); postit_interval = null; } var postit_nextpos = 0; if (postit_bottomreached) { postit_nextpos = postit_mp.offsetTop - parseInt(postit_movingdistance); } else { postit_nextpos = postit_mp.offsetTop + parseInt(postit_movingdistance); } postit_mp.style.top = postit_nextpos + 'px'; if (postit_nextpos >= postit_moveuntil) { postit_bottomreached = true; } if (postit_nextpos <= postit_movingstop && postit_bottomreached) { window.clearInterval(postit_interval); postit_interval = null; } } }