function classInvite( action ) {
	var thisO = this;
	this._action = action;
	this._class_FS;
	this._json = false;
	
	this.invite = function() {
		if( this._json == false ) {
			$.post(
				'ajax_receive.php', 
				{ action:'invite' }, 
				function( data ) {
					thisO._json = eval('('+data+')');
					thisO.write();
				}
			);
		} else {
			this.write();
		}
	}
	
	this.write = function( data ) {
		var html = '<form method="post" action="'+action+'" onsubmit="return Invite.check();"><div id="invite_div" style="padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid #DDDDDD;"></div><input type="hidden" id="invite_whom" name="invite_whom" /><input type="submit" class="Button" name="invite" value="Einladen" /></form>';
		$.facebox(html);
		this._class_FS = new classFriendSelect(this._json, 'invite_div', function(data) { $('#invite_whom').val(data.join(',')); }, {height: 250});
	}
	
	this.check = function() {
		if( $('#invite_whom').val() != '' ) return true;
		return false;
	}
}
