<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="<?php echo $meta_description;?>" />
<meta name="keywords" content="<?php echo $meta_keywords;?>" />
<link href="css/main_style.css" rel="stylesheet" type="text/css" />
<title>activeCM | <?php echo $page_title;?></title>
<script type="text/javascript" src="scripts/swfobject.js"></script>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type="text/javascript" src="scripts/jquery/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="scripts/jquery/js/jquery-ui-1.8.6.custom.min.js"></script>
<script type="text/javascript">
//jQuery.noConflict();
</script>
<link type="text/css" href="scripts/jquery/css/south-street/jquery-ui-1.8.6.custom.css" rel="stylesheet" />
<script type="text/javascript">
function eraseText (text, id) {
	if (document.getElementById(id).value == text) {
		document.getElementById(id).value = '';
	}
}
function retrieveText (text, id) {
	if (document.getElementById(id).value == '') {
		document.getElementById(id).value = text;
	}
}
</script>
</head>

<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<a href="index.php"><img src="images/logo.png" alt="activeCM"  /></a>
</div>
<div id="search">
<form action="?page=pages" method="get" name="searchform" class="search">
<input type="hidden" name="page" value="pages" />
<input type="hidden" name="orby" value="<?php echo $orby; ?>" />
<input type="text" name="searchbox" class="searchinput" id="searchbox" value="Search Pages..." onfocus="eraseText('Search Pages...', this.id);" onblur="retrieveText('Search Pages...', this.id);" />
<input type="submit" value="" class="submit" />
</form></div>
</div>

<div id="menu">
<ul>
<?php if (in_array('home',$availablePages)) { ?>
<li><a href="?page=home" <?php if ($page=='home') echo " class=\"selected\" "; ?>>Home</a></li>
<?php } ?>
<?php if (in_array('dashboard',$availablePages)) { ?>
<li><a href="?page=home" <?php if ($page=='home') echo " class=\"selected\" "; ?>>Dashboard</a></li>
<?php } ?>
<?php if (in_array('pages',$availablePages)) { ?>
<li><a href="?page=pages" <?php if ($page=='pages' or $page=='page' or $page=='pages_non' or $page=='page_non') echo " class=\"selected\" "; ?>>Pages</a></li>
<?php } ?>
<?php if (in_array('notes',$availablePages)) { ?>
<li><a href="?page=notes" <?php if ($page=='notes') echo " class=\"selected\" "; ?>>Notes</a></li>
<?php } ?>
<?php if (in_array('news',$availablePages)) { ?>
<li><a href="?page=news" <?php if ($page=='news') echo " class=\"selected\" "; ?>>News</a></li>
<?php } ?>
<?php /* if (in_array('settings',$availablePages)) { ?>
<li><a href="?page=settings" <?php if ($page=='settings') echo " class=\"selected\" "; ?>>Settings</a></li>
<?php } */ ?>
<?php if (in_array('users',$availablePages)) { ?>
<li><a href="?page=users" <?php if ($page=='users' or $page=='user') echo " class=\"selected\" "; ?>>Users</a></li>
<?php } ?>
<?php if (in_array('users',$availablePages)) { ?>
<li><a href="?page=log" <?php if ($page=='log') echo " class=\"selected\" "; ?>>Log</a></li>
<?php } ?>
</ul>
<?php if (in_array('personal',$availablePages)) { ?>
<div class="personal"><a href="?page=personal"><?php echo $_SESSION['user']; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="?page=logout">Sign out</a></div>
<?php } ?>
</div>