// Testing Merge
function CommunityBuildRoute(&$query){
$segments = array();
$gost = array(
"Рђ"=>"A","Р‘"=>"B","Р’"=>"V","Р“"=>"G","Р”"=>"D",
"Р•"=>"E","РЃ"=>"JO","Р–"=>"ZH",
"Р—"=>"Z","Р˜"=>"I","Р™"=>"J","Рљ"=>"K","Р›"=>"L",
"Рњ"=>"M","Рќ"=>"N","Рћ"=>"O","Рџ"=>"P","Р "=>"R",
"РЎ"=>"S","Рў"=>"T","РЈ"=>"U","Р¤"=>"F","РҐ"=>"H",
"Р¦"=>"C","Р§"=>"CH","РЁ"=>"SH","Р©"=>"SHH","РЄ"=>"",
"Р«"=>"Y","Р¬"=>"","Р"=>"JE","Р®"=>"YU","РЇ"=>"YA",
"Р°"=>"a","Р±"=>"b","РІ"=>"v","Рі"=>"g","Рґ"=>"d",
"Рµ"=>"e","С‘"=>"jo","Р¶"=>"zh",
"Р·"=>"z","Рё"=>"i","Р№"=>"j","Рє"=>"k","Р»"=>"l",
"Рј"=>"m","РЅ"=>"n","Рѕ"=>"o","Рї"=>"p","СЂ"=>"r",
"СЃ"=>"s","С‚"=>"t","Сѓ"=>"u","С„"=>"f","С…"=>"h",
"С†"=>"c","С‡"=>"ch","С?"=>"sh","С‰"=>"shh","СЉ"=>"",
"С‹"=>"y","СЊ"=>"","СЌ"=>"je","СЋ"=>"yu","СЏ"=>"ya"," "=>"-"
);
$str1 = trim($str);
$str1=strtr($str1, $gost);
$str1=preg_replace(array('/\s+/','/[\$\&\+\,\/\:\;\=\?\@\'\"\<\>\#\%\{\}\|\\\^\~\[\]\`\.]/'), array('-',''), $str1);
// remove any '-' from the str they will be used as concatonater
$str1 = str_replace ('-', ' ', $str1);
// lowercase and trim
$str1 = trim (strtolower ($str1));
// remove any duplicate whitespace, and ensure all characters are alphanumeric
$str1 = preg_replace(array('/\s+/','/[^A-Za-z0-9\-]/'), array('-','-'), $str1);
return $str1;
// Cha0sHead }
//off// $escapeRouteChar = array('.', '-', '\\', '/', '@', '#', '?', '!', '^', '&', '<', '>', '\'' , '"' );
include_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
$config =& CFactory::getConfig();