<script type="text/javascript">
function delete_cookie(name, path) {
    // Set expiration date to last year
    var expiration_date = new Date();
    expiration_date.setYear(expiration_date.getYear() - 1);
    expiration_date = expiration_date.toGMTString();
    // Expire the cookie
    var cookie_string = name + "=; expires=" + expiration_date;
    if (path != null) {
        cookie_string += "; path=" + path;
    }
    document.cookie = cookie_string;
}
if ("%OLDSESSION%" == "1") {
    delete_cookie("JSESSIONID", "/");
    delete_cookie("ADMINCONSOLESESSION", "/");
}
</script>