﻿var delay=240,cookiename="netigatesurvey",showtopercent=100,expDays=1e3;function showWin(){var a=navigator.appVersion.indexOf("MSIE 7.")==-1?false:true;if(a)$("#netigate").css("width","990px").css("height","400px").css("text-align","center").css("position","relative").css("margin-left","auto").css("margin-right","auto").css("top","-850px").css("z-index","1000");else $("#netigate").css("width","990px").css("height","400px").css("text-align","center").css("position","absolute").css("margin-left","auto").css("margin-right","auto").css("top","200px").css("z-index","1000");$("#netigate").append('<div style="background-color:#ffffff;padding:15px;width:320px;text-align:center;border:solid 3px #000000;position:relative;margin-left:auto;margin-right:auto;"><h1 style="font-family:Arial; font-size:16px;padding:5px;">Vi vill utveckla vår webbplats!</h1><p style="font-family:Arial;font-size:12px;padding:5px;">Vi hoppas att du vill bidra genom att svara på vår webbenkät. Enkäten är enkel och tydlig och tar bara någon minut att besvara.</p><p style="font-family:Arial;font-size:12px;padding:5px;">Tack för hjälpen!</p><div style="width:295px;height:50px;padding:10px;" ><div style="float:left;width:100px;padding-left:30px;"><img style="border:0px;width:56px;height:26px;"  src="http://www.boxer.se/Global/Swedish/general_images/jaknapp.gif" alt="Ja" onclick="OpenSurvey();" /></div><div style="float:right;width:100px;padding-right:30px;"><img style="border:0px;width:56px;height:26px;" src="http://www.boxer.se/Global/Swedish/general_images/nejknapp.gif" alt="Nej" onclick="WinClose();" /></div></div><p style="font-family:Arial;font-size:10px;">WEB360 powered by: NETIGATE</p></div>')}function WinClose(){$("#netigate").html("").css("z-index","-100")}function OpenSurvey(){WinClose();window.open("https://www.netigate.se/s.asp?s=62913X6216","Web360","height=800,width=800,status=0,toolbar=0,menubar=0,location=0,resizable=1,scrollbars=1")}function GetCookie(f){var b=f+"=",d=b.length,e=document.cookie.length,a=0;while(a<e){var c=a+d;if(document.cookie.substring(a,c)==b)return getCookieVal(c);a=document.cookie.indexOf(" ",a)+1;if(a==0)break}return null}function SetCookie(h,g){var b=SetCookie.arguments,a=SetCookie.arguments.length,c=a>2?b[2]:null,e=a>3?b[3]:"/",d=a>4?b[4]:null,f=a>5?b[5]:false;document.cookie=h+"="+escape(g)+(c==null?"":"; expires="+c.toGMTString())+(e==null?"":"; path="+e)+(d==null?"":"; domain="+d)+(f==true?"; secure":"")}function DeleteCookie(b){var a=new Date;a.setTime(a.getTime()-1);var c=GetCookie(b);document.cookie=b+"="+c+"; expires="+a.toGMTString()}var exp=new Date;exp.setTime(exp.getTime()+expDays*24*60*60*1e3);function amt(){var a=GetCookie(cookiename);if(a==null){SetCookie(cookiename,"1");return 1}else{var b=parseInt(a)+1;DeleteCookie(cookiename);SetCookie(cookiename,b,exp);return a}}function getCookieVal(b){var a=document.cookie.indexOf(";",b);if(a==-1)a=document.cookie.length;return unescape(document.cookie.substring(b,a))}function checkCount(){var a=GetCookie(cookiename);if(a==null){a=1;SetCookie(cookiename,a,exp);setTimeout("checkCount()",1e3)}else if(a>delay){a=-1e3;SetCookie(cookiename,a,exp);var b=Math.floor(Math.random()*100);b<showtopercent&&showWin()}else{if(a<0)return;a++;SetCookie(cookiename,a,exp);setTimeout("checkCount()",1e3)}}window.onload=checkCount
