<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Loading ... </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="language" content="<?php echo __LANG;?>" />
<link rel="stylesheet" type="text/css" href="../styles/main.css?v=<?php echo __POSHVERSION;?>" />
<script type="text/javascript" src="../portal/selections/waiting.js"></script>
<script type="text/javascript" src="../l10n/<?php echo __LANG;?>/lang.js?v=<?php echo __POSHVERSION;?>"></script>
<script type="text/javascript" src="../includes/config.js?v=<?php echo __rand;?>"></script>
<script type="text/javascript" src="../tools/mootools.js?v=1.2.1"></script>
<script type="text/javascript" src="../includes/ajax<?php if (!__debugmode) echo '_compressed';?>.js?v=<?php echo __POSHVERSION;?>"></script>
<script type="text/javascript" src="../includes/php/ajax-urls.js?v=<?php echo __POSHVERSION;?>"></script>
<?php 
	launch_hook('userinterface_header',$pagename);
?>
</head>
<body class="connected_body" onUnload="$p.app.counter.stop();" onKeyPress="$p.navigator.keyPressed(event);"> 
<div id="cache" style="position:absolute;left:0;top:0;z-index:8;display:none;"></div>
<div id="vmenu"></div>
<!-- Old header -->
<div id='headlink' name='headlink' style="display:none;"></div>
<div id='information'></div>
<div id="hmenu"></div>

<!-- Header menu -->
<div id="header">
	<table>
		<tr>
			<td id="logo">
				<a href="#" onclick="return $p.app.openHome();"><img id="logolink" src="../images/s.gif" /></a>
			</td>
			<td valign="top"><div id="profile"></div></td>
			<td valign="top"><div id="header_menu_social"></div></td>
			<td valign="top"><div id="header_menu_search"></div></td>
		</tr>
	</table>
	<!--
	<div id="logo" style="float: left;">
		<a href="#" onclick="return $p.app.openHome();"><img id="logolink" src="../images/s.gif" /></a>
	</div>
	<div id="profile"></div>
	<div id="header_menu_social" style="float: left;"></div>
	<div id="header_menu_search" style="float: left;"></div>
	-->
</div>
<div id="tabs"></div>

<table id="area" cellpadding="0" cellspacing="0" border="0" width="100%">
<!--do not suppress this part (for xcss improvement), else the portal could be unstable-->
	<tr>
	<td>
<!-- Menus -->
	<div id="tabscontent">
		<div id="headmenu"></div>
		<div id="menus">
			<div id="audio"></div>
			<div id="advise"></div>&nbsp;
			<div id="message"></div>
			<a name="contac"></a>
			<div id="contact"></div>
			<div id="box"></div>
			<div id="other"></div>
			<div id="newmod"></div>
		</div>
		<!-- Modules -->
		<div id="messages"></div>
		<div id="modules" class="maintbl"></div>
		<div id="newspaper"></div>
		<div id="plugin"></div>
		<div id="empty" style="display:none"></div>
		<!-- Footer -->
		<div id="footer"></div>
		<div id="debug"></div>
	</div>
	</td>
	</tr>
</table>

<script type="text/javascript"><!--
//var pfolder="../portal/";
//Work in progress message
//wip_message="<center><br /><img src='../images/loading.gif' align='absmiddle' /> <strong>"+lg("lblLoadingPage")+"<\/strong><br \/>- <a href='../portal/blank.html' class='smalll'>"+lg("lblCancel")+"<\/a> -<br /><br /><br />"+waiting()+"<br /><br /><a href='#' onclick='$p.app.resetAndReload()'>"+lg("appLoadingIssue")+"</a>";
wip_message="<center><br />loading...<br/><img src='../images/ajax-loader.gif' align='absmiddle' /><br /><a href='#' onclick='$p.app.resetAndReload()'>"+lg("appLoadingIssue")+"</a></center>";
//$p.app.loading();
window.onload=function()
{
	//load Posh objects
	$p.app.user.init(<?php echo $_SESSION['user_id'];?>,
                      "<?php echo $_SESSION['longname'];?>",
                      "<?php echo $_SESSION['type'];?>",
                      "<?php echo $_SESSION['availability'];?>",
                      "<?php echo $_SESSION['picture'];?>",
                      "<?php echo $_SESSION['username'];?>",
                      "<?php echo $_SESSION['lang'];?>",
					  "<?php echo $_SESSION['email'];?>"
                      );
    <?php echo getPoshUserGroups($DB);?>
    $p.plugin.hook.launch('index_connected');
	//noinclusion(); prevent from page inclusion
	$p.app.pageMode();
	
	// includes options in menu
	$p.app.menu.addSearchbox('header_menu_search');
	 $p.app.menu.addOption('profile','header_menu_social');
	// $p.app.menu.addOption('contributions','header_menu_profile');
	$p.app.menu.addOption('network','header_menu_social');
	$p.app.menu.addOption('groups','header_menu_social');
	$p.app.displayUserProfile('profile');
}
window.window.onbeforeunload = function()
{
	return false;
}

// -->
</script>
<?php
launch_hook('userinterface_end',$pagename);?>
</body>
</html>