public static function isSelected($url)
{
$server_url = parse_url($_SERVER['PHP_SELF']);
$check_url = parse_url($url);
/* Try to match the item's path against the current script
filename as well as other possible URLs to this script. */
return isset($check_url['path']) && ($check_url['path'] == $server_url['path'] || $check_url['path'] . 'index.php' == $server_url['path'] || $check_url['path'] . '/index.php' == $server_url['path']);
}