var pageCountLimit = 1; /*how many pageviews before showing the popover*/ var pageViewCount = 1; /*counter for keeping track of pageviews*/ var pageViewCountName = 'atentaKeks'; /* name of cookie used for keeping track of pageviews*/ var popBehind = false; /*should the popup be behind main browser window*/ var enableDeactivation = true; /*if no/yes is clicked, do not show popoover again*/ var deactivationName = 'atentaKeksVisited'; /*cookie name used for check if previously visited*/ var delay=3; /* How many seconds before window opens*/ var cookiename = 'atentaKeks_or'; /* Name of cookie, no need to change unless for testing*/ var showtopercent = 100; /* How many percent of visitors to show survey*/ var expDays = 14; /* Expiration for cookie*/ var wheight = 600;var wwidth = 1300;var openAfter = true;function showWin() { document.getElementById('winDisplay').style.display = '';}function closeWin() { document.getElementById('winDisplay').style.display = 'none'; if( enableDeactivation ){ SetCookie(deactivationName,true,exp); } } function GetCookie (name) { var arg = name + '='; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(' ', i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = '/'; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + '=' + escape (value) + ((expires == null) ? '' : ('; expires=' + expires.toGMTString())) + ((path == null) ? '' : ('; path=' + path)) + ((domain == null) ? '' : ('; domain=' + domain)) + ((secure == true) ? '; secure' : ''); } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + '=' + cval + '; expires=' + exp.toGMTString(); } var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); function amt(){ var count = GetCookie(cookiename) if(count == null) { SetCookie(cookiename,'1') return 1 } else { var newcount = parseInt(count) + 1; DeleteCookie(cookiename) SetCookie(cookiename,newcount,exp) return count } } function getCookieVal(offset) { var endstr = document.cookie.indexOf (';', offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function checkCount() { var haveVisited = (GetCookie(deactivationName) == null) ? false : true; var count = GetCookie(cookiename); var ran_number=Math.floor(Math.random()*100); var pvc = GetCookie(pageViewCountName); ( pvc == 'null' ) ? 1 : pvc++; if( pvc > pageCountLimit){ pvc=1; } SetCookie(pageViewCountName,pvc); if (ran_number < showtopercent) { if (count == null) { count=1; SetCookie(cookiename, count, exp); if( pageCountLimit == 1){ setTimeout('showWin()',delay*1000); }else{ SetCookie(cookiename, count, exp); SetCookie(pageViewCountName, 1, exp); } } else { if( pvc >= pageCountLimit){ if( enableDeactivation ){ if(!haveVisited){ setTimeout('showWin()',delay*1000); } }else{ setTimeout('showWin()',delay*1000); } SetCookie(cookiename,1,exp); }else{ count++; } SetCookie(cookiename, count, exp); } } } function oWin(){ w = window.open('height='+wheight+',width='+wwidth+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes'); if( popBehind ){ w.blur(); window.focus(); } closeWin(); } document.write("
\"image
\"image
");window.onload=checkCount();