function setCookie(name, value, expires, path, domain, secure) { document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function closeTestWin(windowRef) { var closed = false; try { //if (typeof windowRef == "Window") //{ windowRef.close(); closed = true; //} } catch(e) { } return closed; } if (bn_popup_type == null) { if (closeTestWin(bn_test_window)) { bn_popup_type = 0; } else { bn_popup_type = 1; } } var startScript = ''; var complete = null; switch (bn_popup_type) { case '0': case 0: complete = startScript + 'POPUP_DB' + endScript; break; case '1': case 1: complete = startScript + 'POP_DIV_DB' + endScript; break; } if (complete != null) { document.writeln(complete); } setCookie('BNOKPOP', bn_popup_type, null, '/', '.bravenet.com');