function googleAuthorize(n,t,i){var r=!1;typeof t=="function"&&typeof i=="function"?r=!isNaN(parseFloat(n))&&isFinite(n):typeof n=="function"&&typeof t=="function"&&i==undefined&&(i=t,t=n,n=undefined);gapi.auth.authorize({client_id:clientId,scope:scopes,user_id:n,authuser:-1,immediate:r},function(n){n&&!n.error?getUserInfo(n,t,i):i!=undefined&&i(n.error)})}function getUserInfo(n,t,i){gapi.client.load("plus","v1").then(function(){gapi.client.plus.people.get({userId:"me",fields:"id,emails,birthday,displayName,name(familyName,givenName),gender,verified"}).then(function(i){t!=undefined&&t(n.access_token,i.result)},function(n){i!=undefined&&i(n.result.error)})})}function TLBGoogleLogin(){googleAuthorize(function(n,t){$.ajax({type:"GET",url:AuthServicesUrl,data:"Field=LoginGoogle&id="+t.id+"&token="+n+"&location="+window.location.toString(),async:!0,cache:!1,crossDomain:!0,dataType:"jsonp",success:function(htmlResponse){var param=eval(htmlResponse);switch(param.State){case 0:window.location.reload();break;case 2:$("[id$='TLBlnkReenviarMailConf']").removeAttr("onclick");$("[id$='TLBlnkReenviarMailConf']").attr("onclick","TLBsendGoogleActivationByPopUp($(this),'"+t.id+"','"+n+"','"+param.Msg+"')");TLBConfirmationAccountIlightbox();break;case 7:window.location.href="/registro?GoogleAct=1&id="+t.id;break;case 3:TLBShowBannedAccount()}}})},function(){document.location.reload()})}var clientId="440763772590-4aaosahfe4756da2kp7hsr97s1s1ds65.apps.googleusercontent.com",apiKey="AIzaSyBOqZiVCYOA-LUZD8TYMOPTTm4oWPvmpZk",scopes="https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email";$("<script>").attr("src","https://apis.google.com/js/client.js?onload=GoogleConnectLoaded").prependTo("head");$(window).load(function(){gapi.client.setApiKey(apiKey)});$(window).unload(function(){gapi.auth.signOut()})