if( $menu->name() == "main" ) {
 if( !isLogged() || Security::isGuest() ) {
	$menu->addURL( "Jobseeker register","register.php?page=register_jobseeker");
	$menu->addURL( "Employer register","register.php?page=register_employer");
}
else{
$menu->addURL( "Forgot password","remind.php");

}
$item = $menu->addPageLink( "Applications", "applications", "list" );
if(Security::getUserGroup() == "jobseeker"){
$item = $menu->addPageLink( "Profile", "jobs_jobseeker_profile", "edit" );
}

else{
if(Security::getUserGroup() !== "admin")
$item = $menu->addPageLink( "Profile", "jobs_employer_profile", "edit" );
}

$url = "chat_history_add.php";
$m_count = DB::Count("chat_history",array("ownerid" => $_SESSION["profile"]["user_id"]));
if(Security::getUserGroup() !== "admin" && $m_count == 0){
	$admin = DB::SelectValue("ID","jobsusers",array("group" => "admin"));
	$url.="?userid=".$admin;
}
if( isLogged() && !Security::isGuest() )
$menu->addURL("Chat",$url);

}
if( $menu->name() == "categories" ) {
	$categories = $menu->addGroup("Industrial Areas");
	$rs = DB::Select("jobsjobtype",array(),array("parent_category"));
	$menuGroups = array();
	while($data = $rs->fetchAssoc()){
		if($data["parent_category"] == 0){
			$item = $menu->addGroup($data["sType"],$categories->id);
			$menuItems[$data["ID"]] = $item->id;
		}
		else
			$menu->addURL( $data["sType"], "jobsjobs_list.php?f=(TypeID~equals~".$data["ID"].")", $menuItems[$data["parent_category"]] );
	}
}
return true;