";
for (var index = 0; index < groupMembershipPage.CommunityGroupMemberships.length; index++) {
var currentGroup = groupMembershipPage.CommunityGroupMemberships[index].CommunityGroup;
// if current group is private and user is non-member, don't display
var display = true;
if (currentGroup.CommunityGroupVisibility == 'Private') {
display = (currentGroup.RequestingUsersMembershipTier != 'NonMember' && currentGroup.RequestingUsersMembershipTier != 'Banned');
}
if (display) {
// Look for any query parameters that are already using ?
var groupUrlResults = groupBaseUrl.match(/\?/);
if (groupUrlResults != null) {
var groupUrl = groupBaseUrl + "&slGroupKey=" + currentGroup.CommunityGroupKey.Key;
}
else {
var groupUrl = groupBaseUrl + "?slGroupKey=" + currentGroup.CommunityGroupKey.Key;
}
groupsHtml += "

";
}
}
//Pagination for Group List
groupsHtml += "
";
groupsHtml += "
";
groupsDiv.innerHTML = groupsHtml;
while(groupsContainer.hasChildNodes()) {
groupsContainer.removeChild(groupsContainer.childNodes[0]);
}
groupsContainer.appendChild(groupsDiv);
}
}
});
}
// fire any other events
this.FireEvent('persona:home');
}
SiteLifeProxy.prototype.WatchItem = function(Controller,Method,WatchKey, targetDiv) {
var url = this.__baseUrl + '/'+Controller+'/' + Method + '?' + 'plckWatchKey=' + WatchKey + '&plckElementId=' + targetDiv + '&plckWatchUrl=' + this.EscapeValue(window.location.href);
this.__Send(url, "AddWatchScript");
return false;
}
SiteLifeProxy.prototype.PersonaRemoveWatchItem= function(UserId, WatchKey, Div, View) {
return this.PersonaSend('PersonaRemoveWatchItem', Div, 'personaScript', UserId, 'plckWatchView=' + View + '&plckWatchKey=' + WatchKey);
}
SiteLifeProxy.prototype.PersonaAddFriend= function(UserId) {
return this.PersonaSend('PersonaAddFriend', 'personaHDest', 'personaScript', UserId);
}
SiteLifeProxy.prototype.PersonaConnectionAddFriend = function(UserId) {
return this.PersonaSend('PersonaConnectionAddFriend', 'personaDest', 'personaScript', UserId, null, 'persona:connections');
}
SiteLifeProxy.prototype.PersonaRemoveFriend = function(UserId, Friend, Div, View, Expanded, confirmMsg) {
if(!Expanded) Expanded = "false";
if (confirm(confirmMsg) == true) {
return this.PersonaSend('PersonaRemoveFriend', Div, 'personaScript', UserId, 'plckFriendView=' + View + '&plckFriend=' + Friend + '&plckExpanded=' + Expanded);
}
return false;
}
SiteLifeProxy.prototype.PersonaRemovePendingFriend = function(UserId, PendingFriend, Div, confirmMsg) {
if (confirm(confirmMsg) == true) {
return this.PersonaSend('PersonaRemovePendingFriend', Div, 'personaScript', UserId, 'plckPendingFriend=' + PendingFriend);
}
return false;
}
SiteLifeProxy.prototype.PersonaAddPendingFriend = function(UserId, PendingFriend, Div) {
return this.PersonaSend('PersonaAddPendingFriend', Div, 'personaScript', UserId, 'plckPendingFriend=' + PendingFriend);
}
SiteLifeProxy.prototype.PersonaMessages = function(UserId) {
var AdParams = this.GetParameter('plckCurrentPage') ? 'plckCurrentPage=' + this.GetParameter('plckCurrentPage') : "";
var scrl = this.GetParameter('plckScrollToAnchor'); if(scrl){ if(AdParams) {AdParams +='&';} AdParams += 'plckScrollToAnchor=' + scrl;}
if(this.GetParameter('plckMessageSubmitted')){if(AdParams) {AdParams +='&';} AdParams += 'plckMessageSubmitted=' + this.GetParameter('plckMessageSubmitted');}
return this.PersonaSend('PersonaMessages', 'personaDest', 'personaScript', UserId, AdParams, 'persona:messages');
}
SiteLifeProxy.prototype.PersonaComments = function(UserId) {
var AdParams = this.GetParameter('plckCurrentPage') ? 'plckCurrentPage=' + this.GetParameter('plckCurrentPage') : "";
return this.PersonaSend('PersonaComments', 'personaDest', 'personaScript', UserId, AdParams, 'persona:comments');
}
SiteLifeProxy.prototype.PersonaBlog = function(UserId) {
var AdParams = this.GetParameter('plckCurrentPage') ? 'plckCurrentPage=' + this.GetParameter('plckCurrentPage') : "";
if(AdParams) {AdParams +='&';} AdParams += 'plckBlogId=' + UserId;
var url = this.__baseUrl + '/PersonaBlog/PersonaBlog?plckElementId=personaDest&plckUserId='+ UserId + '&' + AdParams;
this.__Send(url, 'personaScript', 'persona:blog', arguments);
return false;
}
SiteLifeProxy.prototype.PersonaProfile = function(UserId) {
return this.PersonaSend('PersonaProfile', 'personaDest', 'personaScript', UserId, null, 'persona:profile');
}
SiteLifeProxy.prototype.PersonaWatchListPaginate = function(UserId, pageNum) {
return this.PersonaPaginate('WatchList', pageNum, UserId);
}
SiteLifeProxy.prototype.PersonaFriendsPaginate = function(UserId, pageNum) {
var AdParam = "plckFullFriendsList=true";
return this.PersonaPaginate('Friends', pageNum, UserId, AdParam);
}
SiteLifeProxy.prototype.PersonaFriendsExpand= function(UserId) {
var url = this.__baseUrl + '/Persona/PersonaFriends?plckFullFriendsList=true&plckFriendsPageNum=0&plckElementId=PersonaFriendsDest&plckUserId='+ UserId;
this.__Send(url, 'PersonaFriendsScript');
return false;
}
SiteLifeProxy.prototype.PersonaFriendsCollapse= function(UserId, pageNum) {
var url = this.__baseUrl + '/Persona/PersonaFriends?plckFullFriendsList=false&plckFriendsPageNum=0&plckElementId=PersonaFriendsDest&plckUserId='+ UserId;
this.__Send(url, 'PersonaFriendsScript');
return false;
}
SiteLifeProxy.prototype.PersonaPendingFriendsPaginate = function(UserId, pageNum) {
var AdParam = "plckPendingFriendsPageNum=" + pageNum;
return this.PersonaPaginate('Friends', 0, UserId,AdParam);
}
SiteLifeProxy.prototype.PersonaMessagesPreviewPaginate = function(UserId, pageNum) {
return this.PersonaPaginate('MessagesPreview', pageNum, UserId);
}
SiteLifeProxy.prototype.PersonaMessageRemove = function(UserId, pageNum, MessageKey, confirmMsg) {
if (confirm(confirmMsg) == true) {
return this.PersonaSend('PersonaRemoveMessage', 'personaDest', 'PersonaMessagesPageScript', UserId, 'plckCurrentPage='+ pageNum + '&plckMessageKey='+MessageKey);
}
return false;
}
SiteLifeProxy.prototype.PersonaSend = function(ApiName, DestDiv, ScriptName, UserId, AddParams, eventId){
var url = this.__baseUrl + '/Persona/' + ApiName + '?plckElementId=' + DestDiv + '&plckUserId='+ UserId;
if(AddParams) url += '&' + AddParams;
this.__Send(url, ScriptName, eventId, arguments);
return false;
}
SiteLifeProxy.prototype.PersonaPaginate = function(ApiName, PageNum, UserId, AddParams){
var url = this.__baseUrl + '/Persona/Persona' + ApiName + '?plck' + ApiName + 'PageNum=' + PageNum + '&plckElementId=Persona' + ApiName + 'Dest&plckUserId='+ UserId;
if(AddParams) url += '&' + AddParams;
this.__Send(url, 'Persona'+ ApiName + 'Script');
return false;
}
SiteLifeProxy.prototype.PersonaPhotoSend = function(ApiName, DestDiv, ScriptName, UserId, AddParams, eventId){
var url = this.__baseUrl + '/PersonaPhoto/' + ApiName + '?plckElementId=' + DestDiv + '&plckUserId='+ UserId;
if(AddParams) url += '&' + AddParams;
this.__Send(url, ScriptName, eventId, arguments);
return false;
}
SiteLifeProxy.prototype.PersonaMostRecent = function(UserId, PhotoID, DestDiv) {
return this.PersonaPhotoSend('PersonaMostRecent', DestDiv, 'personaScript', UserId,'plckPhotoID=' + PhotoID);
}
SiteLifeProxy.prototype.PersonaCommunityGroupsPaginate = function(UserId, PageNum){
return this.PersonaPaginate('CommunityGroups', PageNum, UserId);
}
SiteLifeProxy.prototype.PersonaCreateGallery = function(UserId) {
return this.PersonaPhotoSend('UserGalleryCreate', 'personaDestPhoto', 'personaScript', UserId);
}
SiteLifeProxy.prototype.PersonaEditGallery = function(UserId,GalleryID) {
return this.PersonaPhotoSend('UserGalleryEdit', 'userGalleryDest', 'personaScript', UserId,'plckGalleryID=' + GalleryID);
}
SiteLifeProxy.prototype.PersonaUploadToUserGallery = function(GalleryId) {
var url = this.__baseUrl + '/Photo/PhotoUpload?plckElementId=userGalleryDest&plckGalleryID='+ GalleryId;
this.__Send(url);
return false;
}
SiteLifeProxy.prototype.PersonaPhotos = function(UserId) {
return this.PersonaPhotoSend('PersonaPhotos', 'personaDest', 'personaScript', UserId, null, 'persona:photos');
}
SiteLifeProxy.prototype.PersonaAllPhotos = function(UserId) {
return this.PersonaPhotoSend('PersonaAllPhotos', 'personaDest', 'personaScript', UserId);
}
SiteLifeProxy.prototype.PersonaGalleryPhoto = function(UserId, plckFindCommentKey) {
var findCommentKey = gSiteLife.ReadFindCommentKey(findCommentKey, "widget:personaGalleryPhoto");
return this.PersonaPhotoSend('PersonaGalleryPhoto', 'personaDest', 'personaScript', UserId, 'plckFindCommentKey=' + findCommentKey, "widget:personaGalleryPhoto");
}
SiteLifeProxy.prototype.PersonaMyRecentPhotos = function(UserId,ElementId, PageNum) {
return this.PersonaPhotoSend('PersonaMyRecentPhotos', ElementId, 'personaScript', UserId,'plckPageNum=' + PageNum);
}
SiteLifeProxy.prototype.PersonaGallery = function(UserId,GalleryId,PageNum) {
if(!PageNum){
PageNum = gSiteLife.GetParameter("plckPageNum") ? gSiteLife.GetParameter("plckPageNum") : 0;
}
if(!GalleryId) {
GalleryId = gSiteLife.GetParameter("plckGalleryID");
}
return this.PersonaPhotoSend('PersonaGallery', 'personaDest', 'personaScript', UserId,'plckGalleryID='+ GalleryId + '&plckPageNum=' + PageNum);
}
SiteLifeProxy.prototype.UserGalleryList = function(UserId,ElementId, PageNum) {
return this.PersonaPhotoSend('UserGalleryList', ElementId, 'personaScript', UserId,'plckPageNum=' + PageNum);
}
SiteLifeProxy.prototype.PersonaGallerySubmissions = function(UserId,ElementId, PageNum){
return this.PersonaPhotoSend('PersonaGallerySubmissions', ElementId, 'personaScript', UserId,'plckPageNum=' + PageNum);
}
SiteLifeProxy.prototype.PersonaGalleryPhoto = function(UserId, plckFindCommentKey) {
var findCommentKey = gSiteLife.ReadFindCommentKey(findCommentKey, "widget:personaPhoto");
var photoid = gSiteLife.GetParameter('plckPhotoID');
return this.PersonaPhotoSend('PersonaGalleryPhoto', 'personaDest','personaScript', UserId,'&plckPhotoID=' +photoid + '&plckFindCommentKey=' +findCommentKey, "widget:personaPhoto");
}
SiteLifeProxy.prototype.PersonaRecentGalleryPhoto = function(UserId) {
var photoid = gSiteLife.GetParameter('plckPhotoID');
return this.PersonaPhotoSend('PersonaRecentGalleryPhoto', 'personaDest','personaScript', UserId,'&plckPhotoID=' +photoid);
}
SiteLifeProxy.prototype.LoadPersonaGalleryPage = function(UserId,GalleryID) {
var params = new Object(); params['plckPersonaPage'] = 'PersonaGallery'; params['plckUserId'] = UserId;
params['UID'] = UserId;
params['plckGalleryID'] = GalleryID;
this.ReloadPage(params);
return false;
}
SiteLifeProxy.prototype.LoadPersonaPhotoPage = function(UserId,PhotoID) {
var params = new Object(); params['plckPersonaPage'] = 'PersonaGalleryPhoto'; params['plckUserId'] = UserId;
params['UID'] = UserId;
params['plckPhotoID'] = PhotoID;
this.ReloadPage(params);
return false;
}
SiteLifeProxy.prototype.LoadPersonaRecentPhotoPage = function(UserId,PhotoID) {
var params = new Object(); params['plckPersonaPage'] = 'PersonaRecentGalleryPhoto'; params['plckUserId'] = UserId;
params['UID'] = UserId;
params['plckPhotoID'] = PhotoID;
this.ReloadPage(params);
return false;
}
var fbHelpDialogTimeout;
SiteLifeProxy.prototype.ShowFacebookHelpDialog = function(icon){
var x = 0;
var y = icon.clientHeight/2;
do {
x += icon.offsetLeft;
y += icon.offsetTop;
}
while(icon = icon.offsetParent);
var fb_div = document.getElementById("Persona_FacebookHelpDialog");
fb_div.style.position = "absolute";
fb_div.style.display = "block";
// position div to the left of icon.
var newX = x - fb_div.clientWidth;
var newY = y - Math.floor(fb_div.clientHeight/2);
fb_div.style.left = newX + "px";
fb_div.style.top = newY + "px";
return false;
}
SiteLifeProxy.prototype.HideFacebookHelpDialog = function(){
var fb_div = document.getElementById("Persona_FacebookHelpDialog");
fb_div.style.display = "none";
}
SiteLifeProxy.prototype.CopyRssUrlToClipboard = function(){
rssUrl = document.getElementById("rssUrl");
copy(rssUrl);
return false;
}
/* note: doesn't work with flash 10 */
function copy(inElement) {
if (inElement.createTextRange) {
var range = inElement.createTextRange();
if (range)
range.execCommand('Copy');
} else {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = '