Open a NotesDatabase via lS script and via Web

Mates,

I need some help.

I have a NotesDatabase which has only one navigator, for test, and a formula @command([ToolsRunMacro];“(myAgent)”)

I wrote the code in LS of this agent as below:

internetIPofMyServer$=…

pathAndMailFile$=…

url = “http://” + internetIPofMyServer$ + “/” + pathAndMailFile$

Print “<SCRIPT LANGUAGE=”“JavaScript”“>top.location='” & url & “';”

When my web user types http://mydomain.com, the web.nsf is invoked and a login and password are requested, as Notes always does.

There are two OU1, in the same Notes domain, the same names.nsf replicated between them.

The OU1=“RJ” has users and their mail databases in server A.

The OU1=“SP” has users and their mail databases in server B.

All users are authenticated in server A, which is a internet host for all people who have a mail account in it.

The code works well, but only if the user belongs to OU1=“RJ”, because his email is located in the same server A of all OU1=“RJ” users, as I said.

If the authenticated user belongs to OU1=“SP” the code identifies that OU1 and try to open his mail database in server B, which it must be.

But, another authentication is required.

Is there another way to write that code?

Thank you all.