Javascript folder on openfire to prevent cross domain problems?

Hi

I want to use javascript to talk with the http binding of openfire.

From where should I serve my javascript files so I won`t have to use proxy and deal with cross domain security problems?

Is there a folder on openfire specific for this?

Is there another way javascript could talk with openfire except for http binding?

Thanks