(function(d,f,h){if(function(e){e+="=";for(var a=d.cookie.split(";"),c=0;c<a.length;c++){for(var b=a[c];b.charAt(0)==" ";)b=b.substring(1,b.length);if(b.indexOf(e)==0)return b.substring(e.length,b.length)}return null}(f)===null&&h.match(/(iPhone|iPod|iPad|Android)/)){var a={name:"Android",url:"https://market.android.com/details?id=com.stormid.scotgovnews"};h.match(/(iPhone|iPod|iPad)/)&&(a={name:"iPhone",url:"http://itunes.apple.com/gb/app/scottish-government-news/id448288167?mt=8 "});(function(e,
a,c){if(c){var b=new Date;b.setTime(b.getTime()+c*864E5);c="; expires="+b.toGMTString()}else c="";d.cookie=e+"="+a+c+"; path=/"})(f,f,30);if(confirm("The Scottish Government has a dedicated "+a.name+" app to get all the latest news direct to your phone. Press OK to download now."))if(document.createEvent){var g=d.createElement("a");g.setAttribute("href",a.url);d.body.appendChild(g);setTimeout(function(){var a=d.createEvent("HTMLEvents");a.initEvent("click",!1,!1);g.dispatchEvent(a)},200)}else window.location=
a.url}})(document,"NewsApp",navigator.userAgent);
