var OW_FBConstructor = function(options)
{
	var self = this;
	
	var redirect = function(href){
		if (href) {
			window.location.href = href; 
		} else {
			window.location.reload(true);
		}
	};
	
	this.references = {};
	
	this.delegates = {
		onLogin: function(){
			redirect(options.onLoginUrl);
		},
		
		onSynchronize: function(){
			redirect(options.onSynchronizeUrl);
		},
		
		onLoginCancel: function(){
			
		},
		
		onPermission: function(){
			redirect();
		}
	};
	
	
	this.showPermissionDialog = function(key) {
		FB.Connect.showPermissionDialog(key, this.delegates.onPermission);
	};
	
	this.login = function(){
		FB.Connect.requireSession(this.delegates.onLogin, this.delegates.onLoginCancel);
	};
	
	this.synchronize = function(delegate) {
		FB.Connect.requireSession(this.delegates.onSynchronize, this.delegates.onLoginCancel);
	};
};
