/** * Gets the value of the specified cookie. * * name Name of the desired cookie. * * Returns a string containing value of specified cookie, * or null if cookie does not exist. */ function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } function openTestWin() { var win = window.open("","MyWindow","location=no,height=1,width=1,toolbar=no,status=no,menubar=no,resizable=no,scrollbars=no,left=5000,top=5000"); self.focus(); return win; } var bn_popup_type = getCookie('BNOKPOP'); if (bn_popup_type == null) { var bn_test_window = openTestWin(); }