function connect()
{ 
	//Show connected user, when it exists 
	var user_disconnected = document.getElementById("user_disconnected");
	if(user_disconnected != undefined)
	{
		//From https://developer.mozilla.org/En/DOM:element.replaceChild
		//Create <div id="user_connected">
		var user_connected = document.createElement("div");
		user_connected.setAttribute("id","user_connected");
		user_connected.innerHTML = '<div class="fbcName"><fb:name uid="'+FB.Connect.get_loggedInUser()+'" useyou="false" linked="false"></fb:name><br /><a href="javascript:void(0);" onclick="FB.Connect.logout(function() { disconnect(); })">Logga ut från Facebook</a></div><div class="fbcPicture"><fb:profile-pic uid="'+FB.Connect.get_loggedInUser()+'" facebook-logo="true" size="square" width="33" height="33"></fb:profile-pic></div><div class="bottom"></div>';
		
		//Build a reference to the existing node to be replaced
		var parentDiv = user_disconnected.parentNode;
		
		//Replace <div id="user_disconnected"> with <div id="user_connected">
		parentDiv.replaceChild(user_connected, user_disconnected);
	}
	
	
	//Hide login button, when it exists
	var loginbutton = document.getElementById("loginbutton");
	if(loginbutton != undefined)
	{
		//Dirty hack for IE, should be loginbutton.innerHTML = '';
		loginbutton.style.visibility = "hidden";
		loginbutton.style.display = "none";
	}
	
	
	//Show form, when it exists
	var addComment = document.getElementById("addComment");
	if(addComment != undefined)
	{
		addComment.style.visibility = "visible";
		addComment.style.display = "inline";
	}
	
	//Because this is XFBML, we need to tell Facebook to re-process the document
	FB.XFBML.Host.parseDomTree(); 
}