/*
 * -------------------------------------------------------------------------
 * START MAIN JS FILE DUPLICATION
 * Included from: Array
 * 
 * See line ~1778, further down, for additional files included from:
 * http://ussoccer.pluck.digitaria.com/ver1.0/Direct/DirectProxy
 * 
 * File generated automagically by: http://webdev.digitaria.lan:9043
 * This version to be included on: http://ussoccer.digitaria.com
 * This version generated: Wed, Aug 05th 2009 - 13:08
 * -------------------------------------------------------------------------
 */
document.write("<link href='http://ussoccer.pluck.digitaria.com/ver1.0/SiteLifeCss' rel='stylesheet' type='text/css' />");
document.write("<script type='text/javascript' src='http://ussoccer.pluck.digitaria.com/ver1.0/SiteLifeScripts'></script>");
//document.write("<link href='http://ussoccer.digitaria.com/includes/cssbin/pluck.css' rel='stylesheet' type='text/css' />");

///<summary>constructor to create a new SiteLifeProxy</summary>
function SiteLifeProxy(url) {
    // User Configurable Properties - these can be set at any time

    // your apiKey, this value must be set!
    this.apiKey = null;
    
    this.siteLifeDomainOverride = null;
    this.siteLifeServerBaseOverride = null;
    this.customerCSSOverride = null;
    this.customerForumPagePathOverride = null;

    // sniff the browser for custom behaviors
    this.__isExplorer = navigator.userAgent.toLowerCase().indexOf('msie') != -1;
    this.__isSafari = navigator.userAgent.toLowerCase().indexOf('safari') != -1;
    this.__isMac = navigator.platform.toLowerCase().indexOf('mac') != -1;
    this.__isMacIE = this.__isMac && this.__isExplorer;
    
    // if enabled, spit out debug information through alert()
    this.debug = false;
    
    // used to track the id of the handler expecting the results from the immediately preceeding method invocation
    // this is used only for testing purposes
    this.lastHandlerId = "";
    
    // Methods You can Overide
    //
    // OnSuccess(returnValue) - is passed the return value at the end of a successful call, default does nothing
    // OnError(msg) - is passed an error message if a problem occurs
    // OnDebug(msg) - is called when debugging is enabled
     
    this.__baseUrl = url;
    this.__sendInvokeCount = 0;
    
    this.__eventHandlers = new Object();
};

SiteLifeProxy.prototype.AddEventHandler = function (event_name, callback) {
    var eventList = this.__eventHandlers[event_name];
    if (!eventList){
	eventList = new Array();
	this.__eventHandlers[event_name] = eventList;
    }
    eventList.push(callback);
};

SiteLifeProxy.prototype.FireEvent = function (event_name) {
    var func;
    var handlers;
    if(handlers = this.__eventHandlers[event_name]) {
        var A = new Array(); for (var i = 1; i <  this.FireEvent.arguments.length; i++){ A[i - 1] = this.FireEvent.arguments[i];}
        for(var x=0;x<handlers.length;x++){
	    func = handlers[x];
	    if (func.__Bound){
		if (handlers.length == 1) return func();
		func();
	    }
	    if (handlers.length == 1) return func.apply(this, A);
	    func.apply(this, A);
	}
    }
};

SiteLifeProxy.prototype.ScriptId = function() { return this.__scriptId = "_bb_script_" + this.__sendInvokeCount++; }

// Default error handler for the proxy object, simple alert
    SiteLifeProxy.prototype.OnError = function(msg) {
	alert("OnError: " + msg);
    }

    // Default debug handler for the proxy object, simple alert
	SiteLifeProxy.prototype.OnDebug = function(msg) {
	    if (this.debug)
		alert("Debug: " + msg);
	}

	// fetch a named request parameter from the page URL
	    SiteLifeProxy.prototype.GetParameter = function(parameterName) {
		var key = parameterName + "=";
		var parameters = document.location.search.substring(1).split("&");
		for (var i = 0; i < parameters.length; i++)
		    {
			if (parameters[i].indexOf(key) == 0)
			    return parameters[i].substring(key.length);
		    }
		return null;
	    };

// browser independent method to get elements by ID
SiteLifeProxy.prototype.GetElement = function(id) {
    this.OnDebug("GetElement " + id);
    if (document.getElementById)
        return document.getElementById(id);
    if (document.all)
        return document.all[id];
    this.OnError("No support for GetElement() in this browser");
    return null;
}

// browser independent method to get elements by tag name
    SiteLifeProxy.prototype.GetTags = function(tagName) {
	this.OnDebug("GetTags " + tagName);
	if (document.getElementsByTagName)
	    return document.getElementsByTagName(tagName);
	if (document.all)
	    return document.tags(tagName);
	this.OnError("No support for GetTags() in this browser");
	return null;
    }

	SiteLifeProxy.prototype.Trim = function(s) {
	    return s.replace(/^\s+|\s+$/g,"");

	};

SiteLifeProxy.prototype.EscapeValue = function(s) {
    if (s == null) return null;
    return encodeURIComponent(s);
};

SiteLifeProxy.prototype.__ArrayValidation = function(s)
{
    if ((typeof s == 'undefined') || (s.length < 1))
	{
	    return false;
	}
    return true;
}

    SiteLifeProxy.prototype.__CheckErrorHandler = function(onError) {
	this.OnDebug("__CheckErrorHandler " + onError);
	if ((typeof onError == 'undefined') || (eval("window." + onError) == null))
	    {
		return "gSiteLife.OnError";
	    }
	return onError;
    }
	SiteLifeProxy.prototype.SetCookie = function SetCookie( name, value) {
	    var today = new Date(); today.setTime( today.getTime() );
    
	    var expires_date = new Date( today.getTime() + 126144000000 );
    
	    document.cookie = name + "=" +escape( value ) +
	    ";expires=" + expires_date.toGMTString() + 
	    ";path=/" + ";domain=ussoccer.digitaria.com" ;
	}
	// validate and fetch arguments, if the argument is missing and optional, we return an empty string        
	    SiteLifeProxy.prototype.__GetArgument = function(variableName, variableValue, isRequired, isArray) {
		this.OnDebug("__GetArgument " + variableName + "," + variableValue + "," + isRequired + "," + isArray);
		if (typeof variableValue == "undefined" || variableValue == null || variableValue == "")
		    {
			if (isRequired)
			    {
				this.OnError("Missing required parameter " + variableName);
				this.__isValid = false;
				return "";
			    }
			else
			    return "";
		    }
		if (isRequired && isArray) 
		    {
			if (!this.__ArrayValidation(variableValue)) 
			    {
				this.OnError("Invalid array parameter " + variableName);
				this.__isValid = false;
				return "";
			    }
		    }
		return "&" + variableName + "=" + this.EscapeValue(variableValue);
	    };

SiteLifeProxy.prototype.__StripAnchorFromUrl = function(url) {
    var aIdx = url.indexOf("#");
    return aIdx == -1 ? url : url.substring(0, aIdx);
}

    SiteLifeProxy.prototype.__SafeAppendUrlValue = function(url, key, value) {
	url += url.indexOf("?") != -1 ? "&" : "?";
	return url + key + "=" + value;
    }

	SiteLifeProxy.prototype.__AppendUrlValues = function (url)
{
    time = new Date();
    url += this.__GetArgument("plckNoCache", time.getTime(), false, false);
    url += this.__GetArgument("plckApiKey", this.apiKey, true, false);
    url += this.__GetArgument("pcksld", this.siteLifeDomainOverride, false, false);
    url += this.__GetArgument("pcksbu", this.siteLifeServerBaseOverride, false, false);
    url += this.__GetArgument("pckcss", this.customerCSSOverride, false, false);
    url += this.__GetArgument("pckfpp", this.customerForumPagePathOverride, false, false);
        
    return url;
}

	    SiteLifeProxy.prototype.ReloadPage = function(params) {
		var sSearch = window.location.search.substring(1);
		var sNVPs = sSearch.split('&');
		var newSearch = "";
		var anchorPoint = "";
		for(var k in params) {
		    if(k == "extend") continue;
		    if(k == "#") {
			anchorPoint = '#' + params[k];
			continue;
		    }
		    if(newSearch == "") newSearch += "?"; else newSearch += "&";
		    newSearch += k + '=' + params[k];
		}
		for (var i = 0; i < sNVPs.length; i++) {
		    var kv = sNVPs[i].split('=');
		    if(kv[0] && kv[0].indexOf('plck') != 0 && ! params[kv[0]]) {
			newSearch += "&" + sNVPs[i];        
		    }
		}
            
		if(anchorPoint != ""){ 
		    window.location.hash = anchorPoint;
		}
		window.location.search = newSearch;
	    }

		function loadScript (url, callback) {
		    var script = document.createElement('script');
		    script.type = 'text/javascript';
		    script.charset = 'utf-8';
		    if (callback)
			script.onload = script.onreadystatechange = function() {
			    if (script.readyState && script.readyState != 'loaded' && script.readyState != 'complete')
				return;
			    script.onreadystatechange = script.onload = null;
			    callback();
			};
		    script.src = url;
		    document.getElementsByTagName('head')[0].appendChild (script);
		}

SiteLifeProxy.prototype.__Send = function(url, scriptToUse, callbackName, args) {
    this.OnDebug("_Send " + url);
    function gLoadScript(url, callbackName) {
	var script = document.createElement('script');
	script.setAttribute('type', 'text/javascript');
	script.setAttribute('charset', 'utf-8');
	script.setAttribute('src', url + (callbackName ? '&EVENT_ID=' + callbackName : ''));
	document.getElementsByTagName('head')[0].appendChild (script);
    }
    function bind(_function, _this, _arguments) {
	var f = function() {
	    _function.apply(_this, _arguments);
	};
	f['__Bound'] = true;
	return f;
    };
    var func;
    if ((typeof callbackName == 'string') && (func = this.__eventHandlers[callbackName]) && (typeof func == 'function') && !func['__Bound']) {
	this.__eventHandlers[callbackName] = bind(func, this, args);
    }
    
    //append our various parameters as necessary
    url = this.__AppendUrlValues(url);
    this.OnDebug("_Send (updated) " + url);
    // add the script node to the document
    if (document.createElement && ! this.__isMacIE) {
        gLoadScript(url, callbackName);
        return;
    }

    // could fall back to sync at this point, but will bust if the page is already loaded

    this.OnError("No support for async in this browser");
}

    SiteLifeProxy.prototype.Logout = function(ScriptToUse, IsRestPage) {
	var plckRest = IsRestPage ? true : false;
	this.__Send(this.__baseUrl + '/Utility/Logout?plckRedirectUrl=' + escape(window.location.href) + '&plckRest=' + plckRest, ScriptToUse);
	return false;
    }

	SiteLifeProxy.prototype.AddLoadEvent = function(func) {
	    if(window.addEventListener){
		window.addEventListener("load", func, false);
	    }else{
		if(window.attachEvent){
		    window.attachEvent("onload", func);
		}else{
		    if(document.getElementById){
			var oldonload = window.onload;
			if (typeof window.onload != 'function') {
			    window.onload = func;
			} else {
			    window.onload = function() {
				if (oldonload) {
				    oldonload();
				}
				func();
			    }}}}}}

	    SiteLifeProxy.prototype.AdInsertHelper = function() {
		for(var src in gSiteLife.__adsToInsert) {
		    if(src == "extend") continue;
		    var dest = gSiteLife.__adsToInsert[src];
		    var parent = document.getElementById(dest);
		    var newChild = document.getElementById(src);
		    if( ! parent || ! newChild ) {continue; }
		    parent.replaceChild( newChild, document.getElementById(dest + "Child"));
		    newChild.style.display = "block"; parent.style.display = "block";
		}
	    }

		SiteLifeProxy.prototype.InsertAds = function(source, destination) {
		    gSiteLife.__adsToInsert = new Object();
		    for(ii=0; ii< this.InsertAds.arguments.length; ii+=2) { gSiteLife.__adsToInsert[this.InsertAds.arguments[ii]] = this.InsertAds.arguments[ii+1];}
		    this.AddLoadEvent(gSiteLife.AdInsertHelper);
		}

		    SiteLifeProxy.prototype.TitleTag = function() {
			var titleTag = document.getElementById("plckTitleTag");
			return titleTag ? titleTag.innerText || titleTag.textContent : null;
		    }

			SiteLifeProxy.prototype.WriteDiv = function(id, divClass) {
			    var cssClass = divClass ? divClass : "";
			    document.write('<div id="'+id+'" class="'+cssClass+'"></div>'); return id;
			}

			    SiteLifeProxy.prototype.InnerHtmlWrite = function(elementId, innerContents ) {
				var el = document.createElement("div");
				try {
				    if(document.location.href.indexOf("debug=true") > -1) {
					el.innerHTML += "<div style='border:1px solid red;'><span style='background-color:red; color:white; position:absolute; cursor:pointer; font-size:8pt;' onclick='DebugShowInnerHTML(\"${plckElementId}\",\"http://ussoccerprod1/ver1.0/Proxies/Default.rails\");'> ? </span><div>" + innerContents + "</div></div>";
				    } else {
					el.innerHTML += innerContents;
					el.style.display = "inline";
				    }
				    var destDiv = document.getElementById(elementId);
				    while (destDiv.childNodes.length >= 1) {
					destDiv.removeChild(destDiv.childNodes[0]);
				    }
        
				    destDiv.appendChild(el);
				} catch (error) {
				    alert(elementId + " Error "  + error.number + ": " + error.description);
				}
			    }

				SiteLifeProxy.prototype.SortTimeStampDescending = "TimeStampDescending";
SiteLifeProxy.prototype.SortTimeStampAscending = "TimeStampAscending";
SiteLifeProxy.prototype.SortRecommendationsDescending = "RecommendationsDescending";
SiteLifeProxy.prototype.SortRecommendationsAscending = "RecommendationsAscending";
SiteLifeProxy.prototype.SortRatingDescending = "RatingDescending";
SiteLifeProxy.prototype.SortRatingAscending = "RatingAscending";
SiteLifeProxy.prototype.SortAlphabeticalAscending = "AlphabeticalAscending";
SiteLifeProxy.prototype.SortAlphabeticalDescending = "AlphabeticalDescending";
SiteLifeProxy.prototype.KeyTypeExternalResource = "ExternalResource";
        



SiteLifeProxy.prototype.PersonaHeaderRequest = function(UserId) {
    var url = this.__baseUrl + '/Persona/PersonaHeader?plckElementId=personaHDest&plckUserId='+ UserId;
    this.__Send(url, "personaHeaderScript", 'persona:header', arguments);
}
    SiteLifeProxy.prototype.PersonaHeader = function(UserId) {
	this.WriteDiv("personaHDest", "Persona_Main");
        this.AddEventHandler('persona:header', function() { gSiteLife.PersonaHeaderInbox();  });
        this.PersonaHeaderRequest(UserId); 
    }
	SiteLifeProxy.prototype.PersonaHeaderInbox = function() {
	    // if DAAPI proxy is not present, fail gracefully
	    if (!document.getElementById('PrivateMessageInbox') || !window.RequestBatch || !window.PrivateMessageFolderList) {
		var pmContainer = document.getElementById('PersonaHeader_PrivateMessageContent');
		if (pmContainer) {
		    pmContainer.style.display = 'none';
		}
		return;
	    }

	    var rb = new RequestBatch();
	    rb.AddToRequest(new PrivateMessageFolderList());
	    rb.BeginRequest(serverUrl,
			    function(responseBatch) {
				var count = '';
				try {
				    if (responseBatch && responseBatch.Messages && responseBatch.Messages.length && responseBatch.Messages[0].Message == 'ok') {
					var folders = responseBatch.Responses[0].PrivateMessageFolderList.FolderList;
					for (var i = 0; i < folders.length; i++) {
					    var f = folders[i];
					    if (f.FolderID == 'Inbox') { count = f.UnreadMessageCount; break; }
					}
				    }
				} catch (e) {}
				var inboxStr = "Inbox ({0})";
				var idx = inboxStr.indexOf("{0}");
				if (inboxStr == '' || idx >= -1)
				    inboxStr = inboxStr.substring(0, idx) + count + inboxStr.substring(idx+3);
				var inbox = document.getElementById('PrivateMessageInbox');
				inbox.innerHTML = inboxStr;
				if (count > 0) inbox.style.fontWeight = 'bold';
			    });
	}

	    SiteLifeProxy.prototype.Persona = function(UserId) {
		this.WriteDiv("personaDest", "Persona_Main");
		var action = this.GetParameter("plckPersonaPage");
		if(action && (typeof this[action] == 'function')) this[action](UserId);
		else this.PersonaHome(UserId);
	    }
		SiteLifeProxy.prototype.LoadPersonaPage = function(PageName, UserId) {
		    var params = new Object(); params['plckPersonaPage'] = PageName; params['plckUserId'] = UserId;
		    params['UID'] = UserId;
		    for(ii=2; ii< this.LoadPersonaPage.arguments.length; ii+=2) { params[this.LoadPersonaPage.arguments[ii]] = this.LoadPersonaPage.arguments[ii+1];}
		    this.ReloadPage(params);
		    return false;
		}

		    SiteLifeProxy.prototype.PersonaHome = function(UserId) {

			var me = this;
			this.AddEventHandler('persona:home:complete', function() { me.PopulateGroupsDiv(UserId, 1); });
			return this.PersonaSend('PersonaHome', 'personaDest', 'personaScript', UserId, null, 'persona:home:complete');
			  
		    }

			SiteLifeProxy.htmlEncode = function(str){
			    // Fix HTML
			    var ret = str;
			    var div = document.createElement('div');
			    var text = document.createTextNode(str);
			    div.appendChild(text);
			    ret = new String(div.innerHTML);
			    
			    // The above doesn't take care of quotes.
			    ret = ret.replace(/"/g, '"');

return ret;
};

SiteLifeProxy.prototype.PopulateGroupsDiv = function(UserId, OnPage) {
        // check for DAAPI objects; if not there, fail gracefully
    if (window.RequestBatch && window.CommunityGroupMembershipPage && window.UserKey) {
        var requestBatch = new RequestBatch();
        requestBatch.AddToRequest(new CommunityGroupMembershipPage(new UserKey(UserId+""), 8, OnPage, "TimeStampAscending", "Member"));
        requestBatch.BeginRequest("http://ussoccer.pluck.digitaria.com/ver1.0/Direct/Process", function(responseBatch) {   
            if (responseBatch.Responses.length > 0 && responseBatch.Responses[0].CommunityGroupMembershipPage) {
                // create the div that will house all this info
                var groupsDiv = document.createElement('div');
                groupsDiv.className = 'PersonaStyle_ItemContainer';
                var groupsContainer = document.getElementById('PersonaStyle_GroupsContainer');
                // Check groupsContainer is null because PersonaStyle_GroupContainer may be absent due to private persona files.
                if (groupsContainer != null) {
                    groupsContainer.appendChild(groupsDiv);
                        
                    var groupBaseUrl = "http://ussoccer.digitaria.com/community/groups.html";
                    var groupMembershipPage = responseBatch.Responses[0].CommunityGroupMembershipPage;
                    var groupsHtml = "<div class=\"PersonaStyle_SectionHead\">Groups</div>";
                    groupsHtml += "<div class=\"PersonaStyle_GroupList\">";
                    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) {
						  var groupUrl = groupBaseUrl + "?slGroupKey=" + currentGroup.CommunityGroupKey.Key;
						  groupsHtml += "<a href=\"" + groupUrl + "\"><img height=\"50\" width=\"50\" title=\"" + SiteLifeProxy.htmlEncode(currentGroup.Title) + "\" src=\"" + currentGroup.AvatarImageUrl + "\" /></a>";
					      }
					      }
			    //Pagination for Group List
			    groupsHtml += "<p><ul class=\"PersonaStyle_GroupListPagination\">";
                    
			    if (groupMembershipPage.OnPage > 1)                {
				groupsHtml += "<li><a href='#PreviousGroup' onclick='gSiteLife.PopulateGroupsDiv(\"" + UserId + "\", " + (parseInt(groupMembershipPage.OnPage) - 1) + ");'><<Previous</a></li>";
			    }
                    
			    if (groupMembershipPage.NumberOfCommunityGroupMemberships > (groupMembershipPage.NumberPerPage * groupMembershipPage.OnPage))                {
				groupsHtml += "<li><a href='#NextGroup' onclick='gSiteLife.PopulateGroupsDiv(\"" + UserId + "\", " + (parseInt(groupMembershipPage.OnPage) + 1) + ");'>Next>></a></li>";
			    }
			    groupsHtml += "</p>";
                    
			    //End Pagination for Group List            
			    groupsHtml += "</ul><div class=\"PersonaStyle_GroupListClear\"></div>";                   
			    groupsHtml += "</div>";                   
			    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.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;
										}
