			var url = "/mxajax/core/cf/addConnect.cfc";
	
	            function addConn(params, destination) {
	                new mxAjax.Data({
	                    executeOnLoad:true,
	                    paramArgs: new mxAjax.Param(url,{param:params, cffunction:"addConnection"}),
	                    postFunction: handleData
	                });
	               
	                function handleData(response) {
	                    var myHTMLOutput = JSON.parse(response);
	                    document.getElementById(destination).innerHTML = myHTMLOutput;
						refreshConn(params);
	                }
	                
	                
	            }
	
	            function remConn(params, destination) {
	                new mxAjax.Data({
	                    executeOnLoad:true,
	                    paramArgs: new mxAjax.Param(url,{param:params, cffunction:"remConnection"}),
	                    postFunction: handleData
	                });
	               
	                function handleData(response) {
	                    var myHTMLOutput = JSON.parse(response);
	                    document.getElementById(destination).innerHTML = myHTMLOutput;
						refreshConn(params);
	                }
	                
	                
	            }

	            function addAllConn(params, destination) {
	                new mxAjax.Data({
	                    executeOnLoad:true,
	                    paramArgs: new mxAjax.Param(url,{param:params, cffunction:"addAllConnection"}),
	                    postFunction: handleData
	                });
	               
	                function handleData(response) {
	                    var myHTMLOutput = JSON.parse(response);
	                    document.getElementById(destination).innerHTML = myHTMLOutput;
						refreshConn(params);
	                }
	                
	                
	            }

	            function refreshConn(params) {
	                new mxAjax.Data({
	                    executeOnLoad:true,
	                    paramArgs: new mxAjax.Param(url,{param:params, cffunction:"refreshConn"}),
	                    postFunction: handleData
	                });
	               
	                function handleData(response) {
	                    var myHTMLOutput = JSON.parse(response);
	                    document.getElementById('showConnHere').innerHTML = myHTMLOutput;
	                }
	                
	                
	            }	
				
	            function refreshMainConn(params) {
	                new mxAjax.Data({
	                    executeOnLoad:true,
	                    paramArgs: new mxAjax.Param(url,{param:params, cffunction:"refreshConn"}),
	                    postFunction: handleData
	                });
	               
	                function handleData(response) {
	                    var myHTMLOutput = JSON.parse(response);
	                    document.getElementById('mainConnList').innerHTML = myHTMLOutput;
	                }
	                
	                
	            }	


			var urlMsg = "/mxajax/core/cf/messages.cfc";
	
	            function fwdMsg(params, destination) {
	                new mxAjax.Data({
	                    executeOnLoad:true,
	                    paramArgs: new mxAjax.Param(urlMsg,{param:params, cffunction:"fwdMsg"}),
	                    postFunction: handleData
	                });
	               
	                function handleData(response) {
	                    var myHTMLOutput = JSON.parse(response);
	                    document.getElementById(destination).innerHTML = myHTMLOutput;
	                }
	                
	                
	            }				
				
				
	function openWindow(msgID) {
		ColdFusion.Window.create(
					'Window1'+msgID, 
					'Message Details',
        			'message-detail.cfm?id='+msgID,
			        {
						x:100,
						y:100,
						height:480,
						width:640,
						modal:true,
						closable:true,
						draggable:true,
						resizable:true,
						center:true,
						initshow:true,
						minheight:200,
						minwidth:200 
					}
					);

				
		
	}

	function openProfile(userID){
		ColdFusion.Window.create('Window2' + userID, 'Member Profile', 'community-profile.cfm?nh=1&id=' + userID, {
			x: 100,
			y: 100,
			height: 480,
			width: 640,
			modal: true,
			closable: false,
			draggable: true,
			resizable: true,
			center: true,
			initshow: true,
			minheight: 200,
			minwidth: 200
		});
	}


	function closeWindow(msgID) {
		ColdFusion.Window.hide(msgID);
	}				
	
	function toggleShow(destination, source, showtext, hidetext) {
	
	            var e = document.getElementById(destination);
	            var f = document.getElementById(source);
	            
				if (e.style.display == 'none') 
				{
		            e.style.display = 'block';
					f.innerHTML = hidetext;
				}
				else
				{
		            e.style.display = 'none';
					f.innerHTML = showtext;
				}		
	
	}
	
	
