var accepts=new Array(); // The line below causes all cookies from the // www.foo.com server to be rejected. // var rejects=new Array("www.foo.com"); var rejects=new Array(); var asks=new Array(); function accept(cookie) { for(var i=0; i < accepts.length; i++) { if(cookie.domain == accepts[i]) { cookie.accept(); return true; } } return false; } function reject(cookie) { for(var i=0; i < rejects.length; i++) { if(cookie.domain == rejects[i]) { cookie.reject(); return true; } } return false; } function ask(cookie) { for(var i=0; i < asks.length; i++) { if(cookie.domain == asks[i]) { cookie.ask(); return true; } } return false; } // This function does the actual filtering // and it's name must be included in the // javascript cookie filter user pref. function cookieFilterFunctionName(cookie) { if(accept(cookie)) return true; if(reject(cookie)) return true; if(ask(cookie)) return true; return false; }