function checkOS() { if(navigator.userAgent.match(/Windows Phone/i)){ document.getElementById("apppopupsubmit").href = "https://www.microsoft.com/en-us/store/apps/windows-phone"; return; } var isMobile = { Android: function() { //document.getElementById("download").href = "http://www.bing.com/"); return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry|bBB10|b|rim[0-9]+/i); }, iOS: function() { // document.getElementById("download").href = "https://jquery-datatables-column-filter.googlecode.com/svn/trunk/customFilters.html"; return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, }; var url=window.location.href; if(isMobile.Android()) { if((url.search("JSE1")!=-1) || (url.search("JDK1")!=-1)) { document.getElementById("apppopupsubmit").href = "https://play.google.com/store/apps/details?id=com.statoil.ingo"; } else if((url.search("se")!=-1)||(url.search("pl")!=-1)) { document.getElementById("apppopupsubmit").href = "https://play.google.com/store/apps/details?id=com.circlekeurope.android"; } else { document.getElementById("apppopupsubmit").href = "https://play.google.com/store/apps/details?id=com.statoil.android"; } } else if(isMobile.iOS()) { if(url.search("JSE1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/se/app/ingo-stations/id871096263"; } else if(url.search("JDK1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/dk/app/ingo-stations/id871096263"; } else if(url.search("se")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/se/app/statoil-stations/id1106837687?mt=8"; } else if(url.search("NO1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/no/app/statoil-stations/id391125359"; } else if(url.search("DK1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/dk/app/statoil-stations/id391125359"; } else if(url.search("RU1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/ru/app/statoil-stations/id391125359"; } else if ((url.search("PL1") != -1) || (url.search("pl") != -1) ) { //document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/pl/app/statoil-stations/id391125359"; document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/pl/app/statoil-stations/id1106837687?mt=8" } else if(url.search("LT1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/lt/app/statoil-stations/id391125359"; } else if(url.search("LV1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/lv/app/statoil-stations/id391125359"; } else if(url.search("EE1")!=-1) { document.getElementById("apppopupsubmit").href = "https://itunes.apple.com/ee/app/statoil-stations/id391125359"; } else { document.getElementById("apppopupsubmit").href = "https://www.apple.com/support/ios"; } } else if(isMobile.BlackBerry()) { document.getElementById("apppopupsubmit").href = "http://crackberry.com/category/software"; } } var site="<%=site%>"; var cookieName1="PopupCookieInfo"; function setAppPopupCookie(cname,exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires=" + d.toGMTString(); document.cookie = cname+"; "+expires + "; path=/"; document.getElementById('app-popup').style.display = "none"; } function getAppPopupCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i