<title>{$lang['Send_PM']} -
{$_CONF['info_row']['title']}</title>
<div class="usercp_context">

{if !{$address_bar_pm_send_SHOW}}
{template}address_bar_part1{/template}
<a href="index.php?page=pm_list&amp;list=1&amp;folder=inbox">{$lang['Private_Messages']}</a>
{$_CONF['info_row']['adress_bar_separate']}
 {$lang['Send_PM']}
{template}address_bar_part2{/template}
{/if}

<script language="javascript">
function AddMoreResiver(x)
{
	x += 1;

	var up_max = {$_CONF['info_row']['members_send_pm']};

	if (x <= up_max)
	{

	$(".more_tr").hide();
	$("#resivers").append('<tr><td class="row1 rows_space">{$lang['Send_to1']} ' + x + '</td><td class="row1"><input name="to[]" class="to' + x + '" value="" type="text" /></td></tr>');
	$("#resivers").append('<tr class="more_tr"><td class="row1 rows_space" colspan="2" align="center"><input name="more_resiver" class="more_resiver_id" type="button" value="{$lang['Add_more_recipients']}" /></td></tr>');

	$(".more_resiver_id").click(function() { AddMoreResiver(x) });

	    if (function() { AddMoreResiver(x) })
		{
		$(".more_tr").stopPropagation();

		}

		if (x == up_max)
		{
			$(".more_tr").hide();
		}
	}
}

function AddMoreAttach(x)
{
	x += 1;

	var up_max = {$_CONF['group_info']['upload_attach_num']};

	if (x <= up_max)
	{
		$(".more_attach_tr").hide();
		$("#add_attach_table").append('<tr align="center"><td class="row1 rows_space">{$lang['File']}' + x + '</td><td class="row1 rows_space"><input name="files[]" type="file" id="attach' + x + '" size="40" /></td></tr>');
		$("#add_attach_table").append('<tr align="center" class="more_attach_tr"><td class="row1 rows_space" colspan="2"><input type="button" name="more_attach" class="more_attach_class" value="{$lang['Add_another_file']}" /></td></tr>');

		$(".more_attach_class").click(function() { AddMoreAttach(x) });

		if (function() { AddMoreAttach(x) })
		{
		$(".more_attach_tr").stopPropagation();
		}

		if (x == up_max)
		{
			$(".more_attach_tr").hide();
		}
	}
}

function ShowAttachTable()
{
	if ($("#attach_id").is(":checked"))
	{
		$("#attach_table").fadeIn();
	}
	else
	{
		$("#attach_table").fadeOut();
	}
}

function Ready()
{
	$(".more_resiver_id").click(function() { AddMoreResiver(1) });
	$("#attach_table").hide();
	$("#attach_id").click(ShowAttachTable);
	$(".more_attach_class").click(function() { AddMoreAttach(1) });
}

$(document).ready(Ready);
-->
</script>

<form name="topic" method="post" enctype="multipart/form-data" action="index.php?page=pm_send&amp;send=1&amp;start=1">
<table border="0" cellspacing="1" width="98%" id="table1" cellpadding="0" style="border-collapse: collapse;margin: auto;">
	<tr>
		<td width="20%" valign="top">{template}usercp_menu{/template}</td>
		<td width="80%" valign="top">{if {$SHOW_MSG}}
<div align="center"><strong>{$MSG}</strong></div>
{/if}

{if {$SHOW_MSG1}}
<div align="center">
<strong>{$to}
{$lang['Currently_absent']}
<br />
{$lang['Reason_for_absence']}
 {$MSG1}</strong>
</div>
<br />
{/if}


		<div align="center">
{template}pm_preview{/template}

<table border="0" id="resivers" cellspacing="1" width="100%" class="border">
	<tr>
		<td class="tcat" colspan="2">
		{$lang['Data_transmission']}
		</td>
	</tr>
	<tr>
		<td class="row1 rows_space">
			 {$lang['Send_to']}
		</td>
		<td class="row1">
			<input name="to[]" value="{$to}" type="text" />
		</td>
	</tr>
	<tr class="more_tr">
		<td class="row1 rows_space" colspan="2" align="center">
			 <input name="more_resiver" class="more_resiver_id" type="button" value="{$lang['Add_more_recipients']}" />
		</td>
	</tr>
</table>

		</div>

<br />

		<div align="center">

<table border="0" cellspacing="1" width="100%" class="border">
	<tr>
		<td class="tcat" colspan="2">
		{$lang['message']}
		</td>
	</tr>
	</tr>
		<td class="row1 rows_space">
			{$lang['PmTitle']}
		</td>
		<td class="row1">
			<input name="title" value="{$send_title}" type="text" size="35" />
		</td>
	</tr>
	<tr>
		<td class="row1 rows_space" colspan="2">

<div id="none">
	<table border="0" cellspacing="1" class="border" style="border-collapse: collapse">
	<tr>
		<td class="editortoolbar" valign="top">
		{template}editor_js{/template}
<textarea name="text" id="box_text" style="display:block;" class="editoriframe" tabindex="3" >{$send_text}
{$prev}</textarea>
<script type='text/javascript'>
//<![CDATA[
    comm._toggle();
    var smiley_wysiwyg = true;
//]]>
</script>

		</td>
		<div style="border-style: solid; border-width: 0px; width:70px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px ; ">
		<td class="editortoolbar" valign="top" width="50" align="center">
		<br />
		<br />
		<br />
		<br />
		<br />
		<br />
		<br />

		<table align="center" border="0" cellspacing="1" cellpadding="4" cellspacing="0" >
			<tr valign="bottom" align="center">
				<td class="editortoolbar" align="center">
           {template}smilebox{/template}</td>
			</tr>
		</table>
</div></td>
	</tr>
	<tr>
		<td class="editoricon" valign="top" colspan="2">
{template}iconbox{/template}
</td>
	</tr>
</table></div>
		</td>
	</tr>
	<?php if ($PowerBB->_CONF['template']['_CONF']['group_info']['upload_attach'] == '1') {  ?>
	<tr>
		<td class="row1" colspan="2" align="center">
		<INPUT name="attach" type="button" value="{$lang['Add_attachments']}"
 onClick="window.open('index.php?page=pm_send&amp;add_attach_pm=1','mywindow','scrollbars=yes,width=400,height=300')">
 <br />
		</td>
	</tr>
{/if}
	<tr>
		<td class="row1" colspan="2" align="center">
					<input class="button" name="insert" type="submit" value="{$lang['Count']}" onClick="comm._submit();" />
					<input class="button" type="submit" value="{$lang['Preview']}" name="preview" onclick="comm._submit();" />
</td>
	</tr>
</table>

		</div>

<br />
</td>
	</tr>
</table>

</form>

</div>

<br />