Logout not working on domino web site

Hi,

I tried following codes on my Logout button on a domino web site, but Logout does not really closes the application.

I am calling a frameset “Logout” from db1.nsf. Logout button is given in a subform which is sitting in db1.nsf

var urlpath = window.location.pathname;

dbpath = urlpath.substring(0,(urlpath.lastIndexOf(“db2.nsf”)+5));

parent.top.location.href=“.”+dbpath+ “?logout”

This gives me URL, as http://IP/db1.nsf/first3charofdbname?Logout

but does not work

parent.location.href = “/db2.nsf/Logout?OpenFrameset”

2.1 This will work if, my change IP in my HOST file of PC, but at the same time user can click on “BACK” from IE browser and still work on application, so it is not actually fully logged out

2.2 If I don’t change the host file then it does not work, it will simply open up db1.nsf

var path = “/db1.nsf”;

window.top.main.location = path+“?logout&redirectto=”+path+“/Logout?Openframeset”

This gives me URL, http://IP/db2.nsf?Opendatabase&Login

This is also not working

I am confused where I am going wrong.

Any guidance

Thanks