I have the below ASP functions that I use for cookies. If I visit my webiste with www, the cookies stay cross folders, however if I visit my website without the www the cookies get emptied.
When the user fills out the login form the login script is ran in a seperate folder where the user will be sent. However, as stated above if they login from the www they stay logged in otherwise they don't.
Also when the website is pulled up, I have an if statement that checks if the cookie is empty if it is set it equal to 0.
GetCookie = request.cookies(cookie)
response.Cookies(Cookie) = Val
If Statement for when the site is pulled up:
if getcookie("MyCompany_id") = "" then