/*
 * Remote Functions
 * $Revision: 1.102.10.26 $
 * $Date: 2009/05/12 19:52:18 $
 */

function Remote( url ) {
	this._url = url;
	this._transport = this.getTransport();
	this._method = 'get';
	this._parameters = [];	
	this._completeHandler = null;
	this._errorHandler = null;
}

Remote.prototype.getTransport = function() {
	if (window.ActiveXObject) return new ActiveXObject('Microsoft.XMLHTTP');
	else if (window.XMLHttpRequest) return new XMLHttpRequest();
	else return false;
}

Remote.prototype.addEventListener = function( eventName, callback ) {
	if ( eventName == 'complete' ) {
		this._completeHandler = callback;
	} else if ( eventName == 'error' ) {
		this._errorHandler = callback;
	}
}

Remote.prototype.setMethod = function( value ) {
	if ( value.toLowerCase() == 'post' ) {
		this._method = 'post';
	} else {
		this._method = 'get';
	}
}

Remote.prototype.addParameter = function( name, value ) {
	this._parameters.push([name, value]);
}

Remote.prototype._getQueryString = function() {
	var queryString = '';
	var t = this._parameters.length;
	
	for ( var i = 0; i < t; i++ ) {
		queryString += this._parameters[i][0] + '=';
		queryString += escape(this._parameters[i][1]).replace(/\+/g, "%2B"); 
		//encodeURIComponent(this._parameters[i][1]);
		queryString += '&';
		
	}

	// adiciona o hash a queryString, pra forcar o browser
	queryString += 'hash=' + new Date().getTime();
	
	return queryString;
}

var Base64 = {

    // private property
    _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",

    // public method for encoding
    encode : function (input) {
        var output = "";
        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
        var i = 0;

        input = Base64._utf8_encode(input);

        while (i < input.length) {

            chr1 = input.charCodeAt(i++);
            chr2 = input.charCodeAt(i++);
            chr3 = input.charCodeAt(i++);

            enc1 = chr1 >> 2;
            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
            enc4 = chr3 & 63;

            if (isNaN(chr2)) {
                enc3 = enc4 = 64;
            } else if (isNaN(chr3)) {
                enc4 = 64;
            }

            output = output +
            this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
            this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);

        }

        return output;
    },

    // private method for UTF-8 encoding
    _utf8_encode : function (string) {
        string = string.replace(/\r\n/g,"\n");
        var utftext = "";

        for (var n = 0; n < string.length; n++) {

            var c = string.charCodeAt(n);

            if (c < 128) {
                utftext += String.fromCharCode(c);
            }
            else if((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            }
            else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }

        }

        return utftext;
    }
}

convert = function( palavra ) {
	//Declaração dos domínios de validação
	var invalidos = 'àá@äãâªß©ç¢êéèë&ìíîïñõòóôöø®$ùúûüýÿ'

	if(parseInt(palavra) == palavra) {
		return false;
	} else {
		palavra = palavra.toLowerCase();
	
		var reg = new RegExp('[a-z0-9]{1}');
		for ( var i = 0; i < palavra.length; i++ ) {
			var ch = "" + palavra.charAt(i);
			if ( !ch.match( reg ) ) {
				var n = invalidos.indexOf( ch );
				if ( n > -1 ) {
					return true;
				}
			}
		}
		
 		return false;
	}
}

Remote.prototype.onStateChange = function() {
	if (this._transport.readyState == 4 ) {
		if ( this._transport.status == 200 ) { //304 ?? cache; testar
			if ( this._completeHandler ) {
				try {
					
					if ( ( this._transport.getResponseHeader('Content-type') || '').match(/^text\/javascript/i) ) {
						var evaluate = this._transport.responseText;
					} else {
						var evaluate = this._transport.getResponseHeader("X-JSON");
									
					}
					eval('var JSON = '+evaluate); //Evitar RHINO 
					var json = JSON; 
					try {
						if ( json.STATUS == 'NAOLOGADO' ) {
							var parametros = "";
							var result = "";
							for(var i=0; i<this._parameters.length;i++ ) {
								if(convert(this._parameters[i][1])) {
									result = Base64.encode(this._parameters[i][1]);
								} else {
									result = this._parameters[i][1];
								}
								parametros = parametros + this._parameters[i][0] + "=" + result + "&";
							}
							var paramUrl = this._url + "?" + encodeURIComponent(parametros + "origem=" + Base64.encode(document.location.href));							
							document.location =  urlLogin + "?url="+paramUrl.substring(1);							
							this._transport.onreadystatechange = function(){};
							return;
						}
						
						if ( json.STATUS == 'LOGADOSEMFLOG' ) { 
							document.location = json.URL;
							this._transport.onreadystatechange = function(){};
							return;
						}						
						
						if ( json.STATUS == 'REDIRECT' ) { 
							document.location = json.URL;
							this._transport.onreadystatechange = function(){};
							return;
						}						

						if ( json.STATUS == 'ERRO' ) { 
							if ( this._errorHandler ) {
								setTimeout(function(){this._errorHandler(json, this._transport);}.bind(this), 10);
							} else {
								Erro(json.ERROR);
							}
							return;
						}

					}
					catch (e) {}
					setTimeout( function(){ this._completeHandler( json );}.bind(this), 10);
				} catch (e) {};	
			}
		} else {
			if ( this._errorHandler ) {
				setTimeout(function(){this._errorHandler({}, this._transport);}.bind(this), 10);
			} else {
				Erro("Ocorreu um erro");
			}
		}
		this._transport.onreadystatechange = function(){};
	}
}

Remote.prototype.send = function() {
	var qs = this._getQueryString();
	var url = this._url;
	if ( this._method == 'get' && qs.length > 0 ) {
		url += (url.match(/\?/) ? '&' : '?') + qs;
	}

	this._transport.open(this._method, url, true);
	this._transport.onreadystatechange = this.onStateChange.bind(this);
	if (this._method == 'post') {
		this._transport.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		this._transport.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
		if (this._transport.overrideMimeType) this._transport.setRequestHeader('Connection', 'close');
		this._transport.send(qs);	
	} else {
		this._transport.send(null);	
	}
}

/**
 * Função Wrapper para o objeto remote. Tem como objetivo otimizar quantidade de código
 * @param {Object} url : URL Da chamada
 * @param {Object} params : Object com parametros Ex:  {userId:'23', date:'22-03-2003', ... , lastParam:'Bla..'}
 * @param {Object} callback : Uma função OU um set de funções Ex: {complete:functionA, error:functionB}
 * @param {Object} method : get ou post ; não passando é get por defaut.
 */


Remote.call = function( url, params, callback, method) {
	var r = new Remote(url);
	if ( method ) {
		r.setMethod(method);
	}
	for ( var i in params ) {
		if ( typeof params[i] == 'object' ) {
			for ( var j in params[i] ) {
				if ( typeof params[i][j] == 'function' ) continue;
				r.addParameter(i, params[i][j]);
			}
		} else {
			r.addParameter(i, params[i]);
		}
	}
	
	if ( typeof callback == 'function' ) {
		r.addEventListener('complete', callback);	
	} else {
		for ( var i in callback ) {
			r.addEventListener(i, callback[i]);
		}
	}
	r.send();
};

/**
 * Envolve parametro em array - se não for um array
 */
Remote.wrapper = function( value ) {
	if ( typeof value != 'object' ) {
		return [value];
	} else {
		return value;
	}
};


/* Remote Utils */
var Util = {
	
	/* carrega cidades */
	loadCidades:function( estadoId, callback ) {
		 Remote.call(
		 	'/flog/publico/busca/cidades.ssp',
			{'estadoID':estadoId},
			{'complete':callback},
			'post'
		 );
	},
	
	/* carrega cidades */
	loadEstados:function( paisId, callback ) {
		 Remote.call(
		 	'/flog/publico/busca/estados.ssp',
			{'paisID':paisId},
			{'complete':callback},
			'post'
		 );
	},	
	
	login:function( user, pass, callback ) {
		 
		 Remote.call(
			'/flog/publico/loginAjax',
			{
					'login':user,
					'pass':pass
			},
			{'complete':callback, 'error':callback},
			'post'
		);			 
	},

	/* carrega fotologs (pessoal e grupos) */
	loadFotologs:function(callback)
	{
		
		 Remote.call(
			'/flog/logado/fotologConsultarFotologs.ssp',
			{
			},
			callback,
			'post'
		);	
	},

	/* carrega fotologs de grupo */
	loadGrupos:function(callback)
	{
		
		 Remote.call(
			'/flog/logado/fotologConsultarGrupos.ssp',
			{},
			callback,
			'post'
		);	
	},

	/* carrega albuns */
	loadAlbuns:function(webloggerID, callback)
	{
		
 		Remote.call(
			'/flog/logado/fotologConsultarAlbuns.ssp',
			{
				'webloggerID':webloggerID
				
			},
			callback,
			'post'
		);			

	},
	
	/* carrega denuncias */
	loadTipoDenuncias:function(tipo, callback)
	{
		Remote.call(
			'/flog/logado/denunciasConsultar.ssp',
			{
				'tipo':tipo
			},
			callback,
			'post'
		);			

	}
}; // Util


/* Funcionalidades da home */
var Home = {
	updateColumn:function() {
	}
}; //Home


/**
 * Metodos do Fotolog
 */

var Fotolog = {
	/*
	 * Excluir Foto
	 */
	excluirFoto:function( albumID, fotosID, callback ) {
		Remote.call(
			'/flog/logado/ajax/fotoExcluir.ssp',
			{'albumID':albumID, 'fotoID':Remote.wrapper(fotosID) },
			callback,
			'post'
		);
	},
	/*
	 * Salvar Blast
	 */
	saveBlast:function( webloggerID, corID, text, callback ) {
		Remote.call(
			'/flog/logado/ajax/perfilPessoalManterBlast.ssp',
			{'webloggerID':webloggerID, 'corID':corID, 'mensagem':text},
			callback,
			'post'
		);		
	},
	
	/*
	 * Copiar foto para album
	 */
	copiarParaAlbum:function( albumIDOrigem, fotosIDOrigem, albumIDDestino, fotologIDOrigem, fotologIDDestino, callback, errorCallback ) {
		Remote.call(
			'/flog/logado/ajax/fotoCopiarParaAlbum.ssp',
			{
				'albumIDOrigem':albumIDOrigem, 
				'fotoIDOrigem':Remote.wrapper(fotosIDOrigem),
				'albumIDDestino':albumIDDestino,
				'webloggerIDOrigem':fotologIDOrigem,
				'webloggerIDDestino':fotologIDDestino
			},
			{'complete':callback, 'error':errorCallback || null },
			'post'
		);				
	},
	
	/*
	 * Copiar foto para Grupo
	 */	
	copiarParaGrupo:function( albumIDOrigem, fotoIDOrigem, grupoWebloggerID, callback, errorCallback ) {
		Remote.call(
			'/flog/logado/ajax/fotoCopiarParaGrupo.ssp',
			{
				'albumIDOrigem':albumIDOrigem, 
				'fotoIDOrigem':Remote.wrapper(fotoIDOrigem),
				'grupoWebloggerID':grupoWebloggerID
			},
			{'complete':callback, 'error':errorCallback || null },
			'post'
		);	
	},
	
	/*
	 * Envia foto por email
	 */
	enviarFotoEmail:function(albumID, fotoID, webloggerID, apelido, endereco, callback, errorCallback) {
		Remote.call(
			'/flog/publico/ajax/linkFotoEnviarPorEmail.ssp',
			{
				'albumID':albumID, 
				'fotoID':fotoID,
				'webloggerID':webloggerID,
				'apelido':apelido,
				'endereco':Remote.wrapper(endereco)
			},
			{'complete':callback, 'error':errorCallback || null },
			'post'
		);
	},
	/*
	 * Inserir comentário na foto
	 */	
	inserirComentario:function( albumID, fotoID, nome, comentario, fotologID, url, stringAntiRobo, urlPost, apelidoDestino, callback ) {
		Remote.call(
			urlPost,
			{
				'albumID':albumID, 
				'fotoID':fotoID,
				'nome':nome,
				'comentario':comentario,
				'ultimaPagina':0,
				'fotologID':fotologID,
				'url':url,
				'stringAntiRobo':stringAntiRobo,
				'apelido':apelidoDestino				
			},
			{'complete':callback, 'error':callback },
			'post'
		);		
	},
	/*
	 * Validar imagem segurança ratings
	 */	
	validarImgSegurancaRatings:function( voto, stringAntiRobo, urlPost, callback ) {
		Remote.call(
			urlPost,
			{
				'voto':voto,
				'stringAntiRobo':stringAntiRobo
			},
			{'complete':callback, 'error':callback },
			'post'
		);		
	},
	/*
	 * Excluir comentario em Foto
	 */	
	excluirComentario:function( comentarioID, albumID, fotoID, callback ) {
		Remote.call(
			'/flog/logado/ajax/comentarioExcluir.ssp',
			{
				'albumID':albumID, 
				'fotoID':fotoID,
				'comentarioID':comentarioID	
			},
			callback,
			'post'
		);			
	},
	/*
	 * Inserir depoimento no perfil
	 */	
	inserirDepoimento:function( depoimento, fotologID, stringAntiRobo, urlPost, callback ) {
		Remote.call(
			urlPost,
			{
				'depoimento':depoimento,
				'ultimaPagina':0,
				'fotologID':fotologID,
				'stringAntiRobo':stringAntiRobo
			},
			{'complete':callback, 'error':callback },
			'post'
		);		
	},	
	/*
	 * Excluir depoimento de um perfil
	 */	
	excluirDepoimento:function( depoimentoID, webloggerID, callback ) {
		Remote.call(
			'/flog/logado/ajax/depoimentoExcluir.ssp',
			{
				'depoimentoID':depoimentoID,
				'webloggerID':webloggerID			
			},
			callback,
			'post'
		);			
	},	
	/*
	 * Adicionar Anotacao
	 */	
	addNote:function(webloggerID, albumID, fotoID, text, coordTopX, coordTopY, coordBottomX, coordBottomY, callback ) {
		Remote.call(
			'/flog/logado/ajax/fotoColarAdesivo.ssp',
			{
				'webloggerID':webloggerID,
				'albumID':albumID, 
				'fotoID':fotoID,
				'valorTopX':coordTopX,
				'valorTopY':coordTopY,
				'valorBottomX':coordBottomX,
				'valorBottomY':coordBottomY,
				'descricao':text
			},
			{'complete':callback, 'error':callback},
			'post'
		);			
	},	
	removeNote:function(albumID, anotacaoID, fotoID, callback ) {
		Remote.call(
			'/flog/logado/ajax/fotoExcluirAdesivo.ssp',
			{
				'anotacaoID':anotacaoID,
				'fotoID':fotoID,
				'albumID':albumID
			},
			callback,
			'post'
		);			
	},	
	loadNotes:function(albumId, fotologId, fotoId, callback ) {
		Remote.call(
			'/users/AnotacoesConsultar.ssp',
			{
				'fotologId':fotologId,
				'fotoId':fotoId,
				'albumId':albumId
			},
			callback
		);			
	},	
	denunciar:function(webloggerID, albumID, fotoID, statusDenunciaID, descricao, callback) {
 		Remote.call(
			'/flog/logado/ajax/fotoDenunciar.ssp',
			{
				'webloggerID':webloggerID, 
				'albumID':albumID, 
				'fotoID':fotoID,
				'statusDenunciaID':statusDenunciaID,
				'descricao':descricao
			},
			{'complete':callback, 'error':callback},
			'post'
		);	
	},
	saveInlineFlogTitulo:function( webloggerID, titulo, callback ) {
		
 		Remote.call(
			'/flog/logado/ajax/tituloFlogAlterar.ssp',
			{
				'webloggerID':webloggerID, 
				'titulo':titulo
			},
			{'complete':callback, 'error':callback},
			'post'
		);			
	},
	saveInlineFlogTagline:function( webloggerID, subtitulo, callback ) {
 		Remote.call(
			'/flog/logado/ajax/subTituloFlogAlterar.ssp',
			{
				'webloggerID':webloggerID, 
				'subtitulo':subtitulo
			},
			{'complete':callback, 'error':callback},
			'post'
		);	
	},
	/*
	 * Exibir Foto e conteudo associado.
	 */	
	exibirFoto:function(fotologId, tipo, albumId, fotoId, callback) {
		var url = ''
		if (tipo == 'g') 
		{
			url = '/grupo'
		}
		else 
		{
			url = '/users'
		}
		url += '/foto/' + fotologId + '/a' + albumId + '/' + fotoId; 
		new glb.Ajax(url, {update:'meio'});
	}	
} //Fotolog


/* Remote User */
var User = {
	/*
	 * Verifica se o login existe
	 */
	loginExists:function( login, tipo, callback ) {
 		Remote.call(
			'/flog/logado/urlValidar.ssp',
			{
				'url':login, 
				'tipo':tipo
			},
			{'complete':callback, 'error':callback},
			'post'
		);	
	},
	
	saveInlineDadosPerfilPessoal:function( perguntaID, perfilID, resposta, callback ) {
 		Remote.call(
			'/flog/logado/ajax/dadosPerfilPessoal.ssp',
			{
				'perguntaID':perguntaID, 
				'perfilID':perfilID,
				'resposta':resposta
			},
			callback,
			'post'
		);		
	},
	addFlogLink:function( webloggerLinkID, callback ) {
 		Remote.call(
			'/flog/logado/ajax/adicionarFlogLink.ssp',
			{
				'webloggerLinkID':webloggerLinkID
			},
			{'complete':callback, 'error':callback},
			'post'
		);
			
	},
	addFlogLinkExterno:function( urlTxt, prefixoUrl, callback ) {
 		Remote.call(
			'/flog/logado/ajax/adicionarFlogLinkExterno.ssp',
			{
				'urlTxt':urlTxt,
				'prefixoUrl':prefixoUrl
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	},	
	validaTagsRatings:function( webloggerID, perfilPessoalID, callback ) {
 		Remote.call(
			'/flog/publico/ajax/validarTagsRatings.ssp',
			{
				'webloggerID':webloggerID,
				'perfilPessoalID':perfilPessoalID
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	}

}; //User


/* Remote Album */
var Album = {
	/**
	 * Enviar emails com o link do album
	 */
	enviarEmail:function( albumID, email, callback ) {
		Remote.call(
			'/flog/logado/album/enviarLinkPorEmail.ssp',
			{
				'albumID':albumID,
				'email':Remote.wrapper(email)
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	},
	enviarEmailFotologID:function( fotologID, email, callback ) {
		Remote.call(
			'/flog/logado/album/enviarLinkPorEmail.ssp',
			{
				'albumID':fotologID,
				'email':Remote.wrapper(email),
				'flagFotologID' : fotologID
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	},
	excluirAlbum:function(albumId, fotologId, callback) {
 		Remote.call(
			'/users/excluirAlbum.ssp',
			{
				'albumId':albumId,
				'fotologId':fotologId
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	},
	excluirAlbumFoto:function(albumId, fotologId, callback) {
 		Remote.call(
			'/users/excluirAlbumFoto.ssp',
			{
				'albumId':albumId,
				'fotologId':fotologId
			},
			{'complete':callback, 'error':callback},
			'post'
		);			
	},
	validarLimite:function( webloggerId, callback ) {
 		Remote.call(
			'/flog/logado/album/validarLimite.ssp',
			{
				'webloggerId':webloggerId
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	},


	/*
	 * Exclui foto do album
	 */
	excluirFoto:function( albumId, fotoId, callback ) {
 		Remote.call(
			'/flog/logado/album/validarLimite.ssp',
			{
				'webloggerId':webloggerId,
				'text':text
			},
			callback,
			'post'
		);		
	},
	/*
	 * Exclui tag no album
	 */
	excluirFoto:function( albumId, fotoId, callback ) {
	},
	inserirTag:function( webloggerID, albumID, fotoID, descricaoTag, callback) {
 		Remote.call(
			'/flog/logado/ajax/tagFotoIncluir.ssp',
			{
				'webloggerID':webloggerID,
				'fotoID':Remote.wrapper(fotoID),
				'albumID':albumID,
				'descricaoTag':descricaoTag
			},
			callback,
			'post'
		);			
	},
	excluirTag:function( webloggerID, tagID, albumID, fotoID, callback ) {
 		Remote.call(
			'/flog/logado/ajax/tagFotoExcluir.ssp',
			{
				'tagID':tagID,
				'webloggerID':webloggerID,
				'albumID':albumID,
				'fotoID':fotoID
			},
			callback,
			'post'
		);			
	},
	saveInlineTituloFoto:function( foto, titulo, callback ) {
 		Remote.call(
			'/flog/logado/ajax/tituloFotoAlterar.ssp',
			{
				'albumID':foto.albumId,
				'fotoID':foto.fotoId,
				'titulo':titulo

			},
			{'complete':callback, 'error':callback},
			'post'
		);			
	},
	saveInlineDescricaoFoto:function( foto, descricao, callback ) {
		Remote.call(
			'/flog/logado/ajax/descricaoFotoAlterar.ssp',
			{
				'albumID':foto.albumId,
				'fotoID':foto.fotoId,
				'descricao':descricao

			},
			{'complete':callback, 'error':callback},
			'post'
		);			
	}		
}; //Album


var Grupo = {
	enviarConvite:function( webloggerID, grupoComunidadeID,  apelidos, callback ) {
		Remote.call(
			'/flog/logado/ajax/convidar.ssp',
			{
				'webloggerID':webloggerID,
				'grupoComunidadeID':grupoComunidadeID,
				'apelidos':Remote.wrapper(apelidos)
			},
			{'complete':callback, 'error':callback},
			'post'
		);
	},
	aceitarConvite:function( memberId, callback ) {
 		Remote.call(
			'/flog/logado/grupo/aceitarConviteGrupo.ssp',
			{
				'conviteID':memberId
			},
			{'complete':callback, 'error':callback},
			'post'
		);	
	},
	
	recusarMembros:function( memberId, origem, callback ) {
 		Remote.call(
			'/flog/logado/grupo/recusarMembros.ssp',
			{
				'conviteID':memberId,
				'origem':origem
			},
			{'complete':callback, 'error':callback},
			'post'
		);			 
	},

    /* carrega membros por inicial */
	loadMembrosPorInicial:function(grupoComunidadeID, inicial, callback)
	{
 		Remote.call(
			'/flog/logado/grupo/consultarMembrosPorInicialNome.ssp',
			{
				'grupoComunidadeID':grupoComunidadeID,
				'inic':inicial
			},
			callback,
			'post'
		);			 
	},
	saveInlineDescricaoPerfilGrupo:function(grupo, descricao, callback ) {
 		Remote.call(
			'/flog/logado/ajax/descricaoPerfilGrupoAlterar.ssp',
			{
				'webloggerID':grupo.webloggerID,
				'comunidadeID':grupo.grupoComunidadeID,
				'descricao':descricao
			},
			{'complete':callback, 'error':callback},
			'post'
		);			
	},
	saveBlast:function( webloggerID, corID, text, callback ) {
 		Remote.call(
			'/flog/logado/ajax/fotologGrupoManterBlast.ssp',
			{
				'webloggerID':webloggerID,
				'corID':corID,
				'mensagem':text
			},
			callback,
			'post'
		);		
	},
	saveInlineRegrasPerfilGrupo:function( webloggerID, regraGrupo, callback ) {
 		Remote.call(
			"/flog/logado/ajax/regrasPerfilGrupoAlterar.ssp",
			{
				'webloggerID':webloggerID,
				'regraGrupo':regraGrupo
			},
			{'complete':callback, 'error':callback},
			'post'
		);		
	},
	entrarGrupo:function( grupoId, callback ) {
 		Remote.call(
			"/flog/logado/grupo/entrar.ssp",
			{
				'webloggerID':grupoId
			},
			callback,
			'post'
		);			
	}		
}


