//check if cookie is set var cName = "SSLVPN-MARKER="; var curNames = document.cookie; var cList = curNames.split(';'); var cValue = null; for (var i=0;i/sslvpn/login?protocol=http&popUrl="+window.location); sleep (10); }else{ var newValue = "false"; if (cValue == "false") newValue = "true"; document.cookie = cName + newValue +"; Path=/;"; if (newValue == "true") { window.location.replace("http:///sslvpn/login?protocol=http&popUrl="+window.location); sleep (10); } }