<!-- BEGIN quick_reply -->
<script language='JavaScript'>
<!--
var rus_lr2 = ('Å-å-Î-î-¨-¨-¨-¨-Æ-Æ-×-×-Ø-Ø-Ù-Ù-Ú-Ü-Ý-Ý-Þ-Þ-ß-ß-ß-ß-¸-¸-æ-÷-ø-ù-ý-þ-ÿ-ÿ').split('-');
var lat_lr2 = ('/E-/e-/O-/o-ÛO-Ûo-ÉO-Éo-ÇH-Çh-ÖH-Öh-ÑH-Ñh-ØH-Øh-ú'+String.fromCharCode(35)+'-ü'+String.fromCharCode(39)+'-ÉE-Ée-ÉU-Éu-ÉA-Éa-ÛA-Ûa-ûo-éo-çh-öh-ñh-øh-ée-éu-éa-ûa').split('-');
var rus_lr1 = ('À-Á-Â-Ã-Ä-Å-Ç-È-É-Ê-Ë-Ì-Í-Î-Ï-Ð-Ñ-Ò-Ó-Ô-Õ-Õ-Ö-Ù-Û-ß-à-á-â-ã-ä-å-ç-è-é-ê-ë-ì-í-î-ï-ð-ñ-ò-ó-ô-õ-õ-ö-ù-ú-û-ü-ü-ÿ').split('-');
var lat_lr1 = ('A-B-V-G-D-E-Z-I-J-K-L-M-N-O-P-R-S-T-U-F-H-X-C-W-Y-Q-a-b-v-g-d-e-z-i-j-k-l-m-n-o-p-r-s-t-u-f-h-x-c-w-'+String.fromCharCode(35)+'-y-'+String.fromCharCode(39)+'-'+String.fromCharCode(96)+'-q').split('-');
var rus_rl = ('À-Á-Â-Ã-Ä-Å-¨-Æ-Ç-È-É-Ê-Ë-Ì-Í-Î-Ï-Ð-Ñ-Ò-Ó-Ô-Õ-Ö-×-Ø-Ù-Ú-Û-Ü-Ý-Þ-ß-à-á-â-ã-ä-å-¸-æ-ç-è-é-ê-ë-ì-í-î-ï-ð-ñ-ò-ó-ô-õ-ö-÷-ø-ù-ú-û-ü-ý-þ-ÿ').split('-');
var lat_rl = ('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-'+String.fromCharCode(35)+String.fromCharCode(35)+'-Y-'+String.fromCharCode(39)+String.fromCharCode(39)+'-JE-JU-JA-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-'+String.fromCharCode(35)+'-y-'+String.fromCharCode(39)+'-je-ju-ja').split('-');
var translitown=0;var language = 0;
if (document.images) {swrus_src = new Image; swrus_src = "pict/swrus.gif";swlat_src = new Image; swlat_src = "pict/swlat.gif";}
function setfoc(){document.post.message.focus();}
function compbelongs(isprivate)
{
	translitown = isprivate;
	if (translitown==1) {document.post.message.createTextRange().execCommand("Copy");}
	document.cookie = "trowncomputer=" + escape(isprivate);
	return true;
}
function upgradeclipboard()
{
	if (translitown==1) {document.post.message.createTextRange().execCommand("Copy");}
	return true;
}
function setlangpicture(){document.ruslat.src = swrus_src;}
function changelanguage(){if (language==1) {language=0;  document.images['ruslat'].src = swrus_src; document.post.message.focus();return;}if (language==0) {language=1;  document.images['ruslat'].src = swlat_src; document.post.message.focus();return;}}
function AkeyIsDown()
{
    if (event.ctrlKey && event.altKey) changelanguage();
    if (window.event.keyCode==27) event.returnValue=false;
    return false;
}
function translate_letter()
{	
        if (language==1) return; //no transliteration necessary
        //the entered character
        var code = event.keyCode;
	txt=String.fromCharCode(code);
        //make selection
        cursor_pos_selection = document.selection.createRange();
        //delete something is selected before
	cursor_pos_selection.text="";
	//get the previous character
        cursor_pos_selection.moveStart("character",-1);
	pretxt = cursor_pos_selection.text;
	if (pretxt.length>1) {pretxt="";}
	event.keyCode = 0;
	result = translatesymboltocyrillic(pretxt,txt)
	//delete the previous symbol if it is exists (if the entered symbol is not the first one)
	if (pretxt!="") { cursor_pos_selection.select(); cursor_pos_selection.collapse();}
	with(document.selection.createRange()) {text = result; collapse(); select()}
	return;
}
function translatesymboltocyrillic(pretxt,txt)
{
	var doubletxt = pretxt+txt;
	var code = txt.charCodeAt(0);
	if (!(((code>=65) && (code<=123))||(code==35)||(code==39))) return doubletxt;
	var ii;
	for (ii=0; ii<lat_lr2.length; ii++)
	{
		if (lat_lr2[ii]==doubletxt) return rus_lr2[ii];
	}
	for (ii=0; ii<lat_lr1.length; ii++)
	{
		if (lat_lr1[ii]==txt) return pretxt+rus_lr1[ii];
	}
	return doubletxt;
}
function translatesymboltolatin(symb)
{
	var ii;
	for (ii=0; ii<rus_rl.length; ii++)
	{
		if (rus_rl[ii]==symb)
		return lat_rl[ii];
	}
	return symb;
}
function translateAlltoCyrillic()
{
		var is_selection_flag = 1;
		var userselection = document.selection.createRange();
		var txt = userselection.text;
		if (userselection==null || userselection.text==null || userselection.parentElement==null || userselection.parentElement().type!="textarea") 
		{
			// no text selected, all the text in the textarea is to be processed
			is_selection_flag = 0;
			txt = document.post.message.value;
		}
		var txtnew = translatesymboltocyrillic("",txt.substr(0,1));
		var symb = "";
		for (kk=1;kk<txt.length;kk++)
		{
			symb = translatesymboltocyrillic(txtnew.substr(txtnew.length-1,1),txt.substr(kk,1));
			txtnew = txtnew.substr(0,txtnew.length-1) + symb;
		}
		if (is_selection_flag)
		{
			userselection.text = txtnew; userselection.collapse(); userselection.select();
		}
		else
		{
			document.post.message.value = txtnew;
			document.post.message.focus();
		}
	return;
}
function translateAlltoLatin()
{
		var is_selection_flag = 1;
		var userselection = document.selection.createRange();
		var txt = userselection.text;

		if (userselection==null || userselection.text==null || userselection.parentElement==null || userselection.parentElement().type!="textarea") 
		{
			// no text selected, all the text in the textarea is to be processed
			is_selection_flag = 0;
			txt = document.post.message.value;
		}
		txtnew="";
		var symb = "";
		for (kk=0;kk<txt.length;kk++)
		{
			symb = translatesymboltolatin(txt.substr(kk,1));
			txtnew = txtnew.substr(0,txtnew.length) + symb;
		}
		if (is_selection_flag)
		{
			userselection.text = txtnew; userselection.collapse(); userselection.select();
		}
		else
		{
			document.post.message.value = txtnew;
			document.post.message.focus();
		}
	return;
}
//-->
</SCRIPT>
<script language='JavaScript'>
        function openAllSmiles(){
                smiles = window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');
                smiles.focus();
                return false;
        }

        function AddSelectedText(BBOpen, BBClose) {
		if (document.post.message.caretPos) document.post.message.caretPos.text = BBOpen + document.post.message.caretPos.text + BBClose;
		else document.post.message.value += BBOpen + BBClose;
		document.post.message.focus()
	  }

        function quoteSelection() {

                theSelection = false;
                theSelection = document.selection.createRange().text; // Get text selection

                if (theSelection) {
                        // Add tags around selection
                        emoticon( '[quote]\n' + theSelection + '\n[/quote]\n');
                        document.post.message.focus();
                        theSelection = '';
                        return;
                }else{
                        alert('{L_NO_TEXT_SELECTED}');
                }
        }

	  function InsertBBCode(BBcode)
	  {
			AddSelectedText('[' + BBcode + ']','[/' + BBcode + ']');
    			
	  }
        function storeCaret(textEl) {
                if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
        }

        function emoticon(text) {
                if (document.post.message.createTextRange && document.post.message.caretPos) {
                        var caretPos = document.post.message.caretPos;
                        caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
                        document.post.message.focus();
                } else {
                        document.post.message.value  += text;
                        document.post.message.focus();
                }
        }

        function checkForm() {
                formErrors = false;
                if (document.post.message.value.length < 2) {
                        formErrors = '{L_EMPTY_MESSAGE}';
                }
                if (formErrors) {
                        alert(formErrors);
                        return false;
                } else {
                        if (document.post.quick_quote.checked) {
                                document.post.message.value = document.post.last_msg.value + document.post.message.value;
                        } 
                        document.post.quick_quote.checked = false;
			<!-- [begin] Post Is Sending -->
	    		setTimeout("document.post.post.disabled = true; document.post.post.value='{L_SENDING}'", 0); 
			<!-- [end] Post Is Sending -->
                        return true;
                }
        }
</script>

<form action='{quick_reply.POST_ACTION}' method='post' name='post' onsubmit='return checkForm(this)'>
<input type="hidden" name="sid" value="{quick_reply.SID}">
<table border='0' cellpadding='1' cellspacing='1' width='100%' class='forumline'>
    <tr>
        <th class='thHead' colspan='2' height='25'><b>{L_QUICK_REPLY}</b></th>
    </tr>
    <tr>
	<td width="100%" colspan="2">
	    <table border='0' cellpadding='10' cellspacing='0' width='100%'>
		<!-- BEGIN user_logged_out -->
		<tr>
		    <td class='row2' align="right"><span class='gen'><b>{L_USERNAME}:&nbsp;</b></span></td>
		    <td class='row2' align="left"><span class='genmed'><input type='text' class='post' tabindex='1' name='username' size='25' maxlength='25' value='' /></span></td>
		</tr>
		<!-- END user_logged_out -->
		<tr>
		    <td class='row1' valign='middle' width="22%" align="center">
			<span class="gensmall"><b>{L_EMOTICONS}</b></span><br />
			<table border="0" cellspacing="0" cellpadding="0">
			    <tr>
    	                	<!-- BEGIN smilies_first_row -->
		                <td>&nbsp;<img src="{quick_reply.smilies_first_row.URL}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon(' {quick_reply.smilies_first_row.CODE} ');" alt="{quick_reply.smilies_first_row.DESC}" title="{quick_reply.smilies_first_row.DESC}" />&nbsp;</td>
                  	        <!-- END smilies_first_row -->
			    </tr>
			    <tr>
	        	        <!-- BEGIN smilies_second_row -->
		                <td>&nbsp;<img src="{quick_reply.smilies_second_row.URL}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon(' {quick_reply.smilies_second_row.CODE} ');" alt="{quick_reply.smilies_second_row.DESC}" title="{quick_reply.smilies_second_row.DESC}" />&nbsp;</td>
                  	        <!-- END smilies_second_row -->
			    </tr>
			    <tr>
	                        <!-- BEGIN smilies_third_row -->
		                <td>&nbsp;<img src="{quick_reply.smilies_third_row.URL}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon(' {quick_reply.smilies_third_row.CODE} ');" alt="{quick_reply.smilies_third_row.DESC}" title="{quick_reply.smilies_third_row.DESC}" />&nbsp;</td>
                  	        <!-- END smilies_third_row -->
			    </tr>
			    <tr>
	                        <!-- BEGIN smilies_fourth_row -->
		                <td>&nbsp;<img src="{quick_reply.smilies_fourth_row.URL}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon(' {quick_reply.smilies_fourth_row.CODE} ');" alt="{quick_reply.smilies_fourth_row.DESC}" title="{quick_reply.smilies_fourth_row.DESC}" />&nbsp;</td>
                  	        <!-- END smilies_fourth_row -->
			    </tr>
			    <tr>
	                        <!-- BEGIN smilies_five_row -->
		                <td>&nbsp;<img src="{quick_reply.smilies_five_row.URL}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon(' {quick_reply.smilies_five_row.CODE} ');" alt="{quick_reply.smilies_five_row.DESC}" title="{quick_reply.smilies_five_row.DESC}" />&nbsp;</td>
                  	        <!-- END smilies_five_row -->
			    </tr>
			</table>
			<br /><INPUT TYPE=button CLASS=BUTTON NAME="SmilesButt" VALUE="{L_ALL_SMILIES}" ONCLICK="openAllSmiles();">
		    </td>
		    <td align="left">
			<table width="450" border="0" cellspacing="0" cellpadding="0">
			    <tr align="left" valign="middle" height="20">
				<td class='row1' align="left">
				    <INPUT class=button onclick=translateAlltoCyrillic();upgradeclipboard(); type=button value="â êèðèëëèöó">
				    <INPUT class=button onclick=translateAlltoLatin();upgradeclipboard(); type=button value="â ëàòèíèöó">
            	            	    <input type='button' name='quoteselected' class='button' value='{L_QUOTE_SELECTED}' onclick='javascript:quoteSelection()'>&nbsp;
				</td>
			    </tr>
			    <tr align="left">
				<td class='row1'>
    	      	    		    <textarea name='message' rows='15' cols='35' wrap='virtual' style="width:450px" tabindex='3' class='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea><br>
				</td>
			    </tr>
			    </tr>
			    <tr align="left">
				<td class='row1' colspan="3">
				    <span class="genmed">
				    <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="InsertBBCode('b')" />
				    <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="InsertBBCode('i')" />
				    <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="InsertBBCode('u')" />
				    <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="InsertBBCode('quote')" />
				    <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="InsertBBCode('code')" />
				    <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px"  onClick="InsertBBCode('img')" />
				    <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="InsertBBCode('url')" />&nbsp;
				    <a href="/imagemanager.php?target=message&op=upload&imgcat_id=7" target=_blank>Çàêà÷àòü êàðòèíêó</a>
				    </span>
				</td>
			    </tr>
			</table>
		    </td>
		</tr>
	    </table>
	</td>	
    </tr>
    <tr>
	<td class='row2' valign='top' align='left'>
	    <span class='gen'>
      	    <b>{L_OPTIONS}</b><br />
	    <input type='checkbox' name='quick_quote'>{L_QUOTE_LAST_MESSAGE}<br>
	    <!-- BEGIN user_logged_in -->
	    <input type='checkbox' name='attach_sig' {quick_reply.user_logged_in.ATTACH_SIGNATURE}>{L_ATTACH_SIGNATURE}<br>
	    <input type='checkbox' name='notify' {quick_reply.user_logged_in.NOTIFY_ON_REPLY}>{L_NOTIFY_ON_REPLY}
	    <!-- END user_logged_in -->
	</td>
    </tr>
    <tr>
        <td class='catBottom' align='center' valign='middle' height='28' colspan='2'>
	    <input type='hidden' name='mode' value='reply'>
            <input type='hidden' name='t' value='{quick_reply.TOPIC_ID}'>
            <input type='hidden' name='last_msg' value='{quick_reply.LAST_MESSAGE}'>
            <!--input type='hidden' name='message' value=''-->
    	    <input type='submit' name='preview' class='mainoption' value='{L_PREVIEW}'>&nbsp;
            <input type='submit' name='post' class='mainoption' value='{L_SUBMIT}'>
        </td>
    </tr>
</table>
</form>
<!-- END quick_reply -->