window.addEvent('unload', Cookie.delete.pass('applicationCookie'));
var eraser = function () { eraseCookie('applicationCookie'); };
if(window.addEventListener) window.addEventListener('unload', eraser, false);
else if(window.attachEvent) window.attachEvent('onunload', eraser);
Your method removes all other events from unload of the body and is bad practice. In this example, I delete a cookie which is obviously something which can be done even easier but then the same can be said for your article.
You could make an
XMLHttpRequest
instead of deleting a cookie and this would be the way to go.