<?
	function loadframework($content = '', $framework = 'swedish')
	{
		if (strlen($content) == 0)
		{
			$content = basename($_SERVER['PHP_SELF']);
			
			$blocks = explode(".",$content);
			
			if ( isset($_SESSION['lang']) ){
			   
			   if ( $_SESSION['lang'] == 0 ){
			      $content = $blocks[0] . "_swe.php";
			   }
			   else{
			      $content = $blocks[0] . "_eng.php";
			   }
			   
			}
			
			else{
			   $content = $blocks[0] . "_swe.php";
			}

		}
		else
		{
			$content .= '.php';
		}

		ob_start();
		include('content/' . $content);
		$content = ob_get_contents();
 		ob_end_clean();
		include('framework/' . $framework . 'framework.php');
	}

	function cleantext($text){
	   $swedish = array("å","ä","ö","Å","Ä","Ö");
	   $htmlsigns = array("&aring;","&auml;","&ouml;","&Aring;","&Auml;","&Ouml;");
	   str_replace($swedish,$htmlsigns,$text);
	   
	   return $text;
	}

?>
