function firstRunTutorial() { // $.removeCookie('name', { path: '/' }); if(document.cookie.match(/^(.*;)?\s*firstRunTutorial\s*=\s*[^;]+(.*)?$/)) { // dont show //cookie previously dropped, tell gyro to switch on } else { krpano = document.getElementById("krpanoSWFObject"), krpano.call("js(openModal3('pages/instructions.html'));") document.cookie = "firstRunTutorial=shown;max-age=600"; } }