document.getElementById("superheader_right").innerHTML = "ej inloggad. | <a href=\"https://www.minkarta.se/medlem/000000000000/\">bli medlem</a> | <a rel=\"nofollow\" href=\"https://minkarta.se/glomt_losenord/?next=\">logga in</a> <a rel=\"nofollow\" href=\" https://www.minkarta.se/facebook_login_1.php?fb_arrive_url=\"><img src=\"https://www.allakartor.se/graphics/fb_login.gif\" border=\"0\" style=\"vertical-align:bottom;padding-left:5px;\"></a><div id=\"div_login_text\"></div> ";

// if we are logged in
if (are_we_logged_in=="yes") { 
//alert("we are logged in");exit();
// bake local cookie
setCookie('user_login_code',user_login_code,3650);
}
// if we are NOT logged in
if (are_we_logged_in!="yes") { 
		// alert("not logged in");
		// check local cookie
		logged_out = location.href.substring((location.href.length)-11,location.href.length);
		if (logged_out=="logged_out=") 
		{ setCookie('user_login_code','',-365); } 
		else { user_login_code=getCookie('user_login_code'); }
		if (user_login_code!=null && user_login_code!="")
		{
		// if local cookie exists
		//alert('Local cookie: '+user_login_code+'!');
		top.location.href = "https://www.allakartor.se/compare.php?local=" + user_login_code + "&next=" + escape(encodeURI(location.href));
		}
		else
		{
		// if local cookie does not exist
		//alert("we are not logged in");
		}
}
