How to set cookie parameters

I might be bastardizing this but I'm using the plugin switch between 2 identical themes with different logos. This is what im trying to do.

Main site with logo at http://www.domain1.com (just a regular site)
But when a user types in another domain that i have forwarded and masked to via DNS they will be brought to the same site but with the other theme to display a different logo and it will land them on a different page.

How do i set the cookie so that if the person types in the domain to domain1 that it changes back to the original theme? Can i specify what theme to show based on the domain that they type in?