<?php

/*################################

This code is COPYRIGHTED by joomlathemes.org

Do not redistribute it to third part without permission
from joomlathemes.org

*/################################

$database->setQuery("SELECT * FROM #__menu WHERE menutype = 'topmenu' AND published ='1' AND parent = '0' ORDER BY ordering");
$mymenu_rows = $database->loadObjectList();
$ms_topmenu_content = "";
foreach($mymenu_rows as $mymenu_row) {
	// print_r($mymenu_rows);
	$mymenulink = $mymenu_row->link;
	if ($mymenu_row->type != "url") {
		$mymenulink .= "&Itemid=$mymenu_row->id";
	}
	if ($mymenu_row->type != "separator") {
		$ms_topmenu_content .= "<a href=\"".sefRelToAbs($mymenulink)."\" class=\"bar\">$mymenu_row->name</a> | ";
	}
}
$ms_topmenu_content = substr($ms_topmenu_content,0,strlen($ms_topmenu_content)-2);
?>