function Translite($string)
{
$rus = array('ё','ж','ц','ч','ш','щ','ю','я','Ё','Ж','Ц','Ч','Ш','Щ','Ю','Я');
$lat = array('yo','zh','tc','ch','sh','sh','yu','ya','YO','ZH','TC','CH','SH','SH','YU','YA');
$string = str_replace($lat,$rus,$string);
$string = strtr($string,
"ABVGDEZIJKLMNOPRSTUFH_I_Eabvgdezijklmnoprstufh_i_e",
"АБВГДЕЗИЙКЛМНОПРСТУФХЪЫЬЭабвгдезийклмнопрстуфхъыьэ");
return($string);
}