<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Copy Paste Lover Generator</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8">
<meta http-equiv="content-type" content="text-html; charset=utf-8">
<script type="text/javascript">
var autori = new Array('');
var autocon = new Array('');
var original = new Array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ' ');
var concode = new Array('а', 'b', 'с', 'd', 'е', 'f', 'g', 'h', 'і', 'ј', 'k', 'l', 'm', 'n', 'о', 'р', 'q', 'r', 'ѕ', 't', 'u', 'v', 'w', 'x', 'у', 'z', ' ');
function translateText() {
var inputString = document.getElementById('input').value;
if (document.getElementById('conversionType').value == "e") {
for (i = 0; i < autori.length; ++i) inputString = inputString.replace(new RegExp(autori[i], "gi"), autocon[i]);
for (i = 0; i < original.length; ++i) inputString = inputString.replace(new RegExp(original[i], "gi"), concode[i]);
} else {
for (i = 0; i < concode.length; ++i) inputString = inputString.replace(new RegExp(RegExp.escape(concode[i]), "g"), original[i]);
for (i = 0; i < autocon.length; ++i) inputString = inputString.replace(new RegExp(RegExp.escape(autocon[i]), "g"), autori[i]);
}
document.getElementById('input').value = inputString;
}
RegExp.escape = function (text) {
if (!arguments.callee.sRE) {
var specials = ['/', '.', '*', '+', '?', '|', '$', '(', ')', '[', ']', '{', '}', '\\'];
arguments.callee.sRE = new RegExp('(\\' + specials.join('|\\') + ')', 'g');
}
return text.replace(arguments.callee.sRE, '\\$1');
}
</script>
</head>
<body>
<div id="header">
<div align="center"><img src="images/logo.png" width="370" height="200" /></div>
</div>
<label for="input">
</label>
<div align="center">
<p><br />
<textarea id="input" name="input" rows="10" cols="80"
style="font-weight: bold;"></textarea>
<br />
</p>
<p>
<input type="submit" value="Convert"
onclick="translateText();" />
<select id="conversionType">
<option value="e">Convert</option>
<option value="3">Revert</option>
</select>
</p>
<p> </p>
</div>
</body>
</html>