Файл: gamele.ru/ch/ch_but.js
Строк: 50
<?php
function smile_open(page) {
top.frames['ch_list'].location = "/ch/smile" + page + ".html";
return;
}
function group_open(page) {
top.frames['ch_list'].location = "/ch/group" + page + ".cgi";
return;
}
var map_en = new Array('s`h','S`h','S`H','s`Х','sh`','Sh`','SH`',"'o",'yo',"'O",'Yo','YO','zh','w','Zh','ZH','W','ch','Ch','CH','sh','Sh','SH','e`','E`',"'u",'yu',"'U",'Yu',"YU","'a",'ya',"'A",'Ya','YA','a','A','b','B','v','V','g','G','d','D','e','E','z','Z','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','r','R','s','S','t','T','u','U','f','F','h','H','c','C','`','y','Y',"'")
var map_ru = new Array('сх','Сх','СХ','сХ','щ','Щ','Щ','ё','ё','Ё','Ё','Ё','ж','ж','Ж','Ж','Ж','ч','Ч','Ч','ш','Ш','Ш','э','Э','ю','ю','Ю','Ю','Ю','я','я','Я','Я','Я','а','А','б','Б','в','В','г','Г','д','Д','е','Е','з','З','и','И','й','Й','к','К','л','Л','м','М','н','Н','о','О','п','П','р','Р','с','С','т','Т','у','У','ф','Ф','х','Х','ц','Ц','ъ','ы','Ы','ь')
function convert(str)
{
for (var i = 0; i <map_en.length; ++i)
while (str.indexOf (map_en[i]) >= 0)
str = str.replace (map_en[i], map_ru[i]);
return str;
}
function submit_msg()
{
var re, pr, tmail, tmail2;
tmail = /^([-]?w+)(.?w+[+-]?)*@w+(.w+)+$/;
tmail2 =/_+/;
re = /^((?:%?<[^>]{2,20}>s?)+)(.*?)$/;
var email;
if (top.latrus == 1)
{
var msg = new Array();
msg = re.exec(document.FBT.text.value);
if (msg)
{
strarr = msg[2].split(' ');
for (var j = 0; j < strarr.length; j++)
{
email = tmail.test (strarr[j]) && !tmail2.test (strarr[j]);
if (strarr[j].indexOf("http://") < 0 &&
strarr[j] != "%clan%" &&
strarr[j].indexOf("www.") < 0 && !email)
{
strarr[j] = convert (strarr[j]);
}
}
msg[2] = strarr.join(' ');
document.FBT.text.value = msg[1]+msg[2];
}
else
{
strarr = document.FBT.text.value.split(' ');
for (var j = 0; j < strarr.length; j++)
{
email = tmail.test (strarr[j]) && !tmail2.test (strarr[j]);
if (strarr[j].indexOf("http://") < 0 &&
strarr[j] != "%clan%" &&
strarr[j].indexOf("www.") < 0 && !email)
{
strarr[j] = convert (strarr[j]);
}
}
document.FBT.text.value = strarr.join(' ');
}
}
}
function use_action(usetype)
{
top.frames['main_top'].location='../main.php?useaction='+usetype;
}
?>