Download Flexi Custom Code Module from the JED and install it. Publish the module to whatever position on the page you want. Hide the module title. Disable clean css, clean, html and clean jscript. Leave PHP turned on
Enter this code in the custom code box
<?php
$menu = JFactory::getApplication()->getMenu();
$JInput = JFactory::getApplication()->input;
$Itemid = $JInput->get('Itemid','','int');
$items = $menu->getMenu();
$pagination = array();
foreach($items as $item){
if($item->link != '' && $item->type != 'separator' && $item->level == 1){
if(strpos($item->link, 'index.php?option')!== false){
$link = JRoute::_($item->link.'&Itemid='.$item->id);
}else{
$link = $item->link;
}
$pagination[] = array('Itemid'=>$item->id, 'link' => $link);
}
}
foreach($pagination as $k => $menuItem){
if($menuItem['Itemid'] == $Itemid){
if($k == 0){
$prev = $pagination[count($pagination) - 1]['link'];
$next = $pagination[$k + 1]['link'];
}elseif($k == count($pagination) - 1){
$prev = $pagination[count($pagination) - 2]['link'];
$next = $pagination[0]['link'];
}else{
$prev = $pagination[$k - 1]['link'];
$next = $pagination[$k + 1]['link'];
}
}
}
echo $next.'<br />'.$prev;
echo '<pre>';
print_r($items);
echo '</pre>';
?>
This code assumes that all of your menu items are root level menu items and that they are not Text Separators. The pagination should automatically update based on what page you are on and if you change the sort order of menu items in the backend.
I only briefly tested this on my site and it works. You may need to tweak it a little bit but it should be a good place to start at least.