Flash Vars to Javascript to open Password Protected Directories

I have created a website that has a user login feature.

i store 3 variables in an xml file, bring them into flash, and have the user enter their login and password. this takes them to a specified url depending on the log/pass combination.

I have this working just fine.

The problem is i have the directories protected through the control panel so that a username and password popup comes up whenever someone tries to access a protected folder on my server.

i want to see if i can have the login and pass coincide with the (flash/xml) login and password for the protected directory. so that i can just skip the step of having them get into the password protected directory.

Does anyone know if this is possible to carry over the variables to something like javascript to access the protected directorys?

thanks in advance.

motle3