{if isMember()}
	{include file='../general/information.tpl'}

    {if $myobj->isShowPageBlock('show_option_to_answer')}
        <form name="postans{$myobj->getFormField('ans_id')}" id="postans{$myobj->getFormField('ans_id')}" method="post">
            <div class="clsDebatePostReply">
                <input type="hidden" name="type" id="type" value="{$myobj->getFormField('type')}">
                <div class="clsAgainstAns">
                 <p class="clsQuestionDesc">{$LANG.post_your_reply_here}</p>
                </div>
                <p id="validReply{$myobj->getFormField('ans_id')}" class="clsValidReply"></p>
                <p><textarea name="user_reply" id="user_reply" rows="5" class="clsCommentTextBox" cols='5' maxlength="{$CFG.admin.comment.limit}" onFocus="updatelength(this, 'ss{$myobj->getFormField('ans_id')}');" onKeyUp="updatelength(this, 'ss{$myobj->getFormField('ans_id')}');"></textarea></p>
                <div class="clsZeroColour">
                 {$LANG.debatesResponse_commrnt_total_charaters_entered}
                   <span id="ss{$myobj->getFormField('ans_id')}">0  ({$LANG.limit} {$CFG.admin.comment.limit})</span>
                </div>
            </div>
           <div class="clsClearfix">
            <div class="clsCommentDebateButtons">
             <div class="clsDebateSubmitRight">
               <div class="clsDebateSubmitLeft">
                <input type="button" class="clsSubmitButton" name="post_reply" id="submit" onclick="ajaxSubmitForm('{$showOptionToAnswer_arr.submit.onclick}', 'postans{$myobj->getFormField('ans_id')}', '{$myobj->getFormField('selReplyId')}', '{$myobj->getFormField('ans_id')}');hideAllBlocks(); return false;" value="{$LANG.post_reply}" tabindex="{smartyTabIndex}" />
               </div>
             </div>
             <div class="clsDebateCancelRight">
               <div class="clsDebateCancelLeft">
                <input type="button" class="clsCancelButton" name="cancel_reply" id="cancel_reply" onclick="ajaxUpdateDiv('{$showOptionToAnswer_arr.cancel.onclick}', '&ajax_page=true&cancelOptionToAnswer=1&ans_id={$myobj->getFormField('ans_id')}&selReplyId={$myobj->getFormField('selReplyId')}', '{$myobj->getFormField('selReplyId')}'); return false;" value="{$LANG.debatesResponse_cancel_debate}" tabindex="{smartyTabIndex}" />
               </div>
             </div>
            </div>
           </div>
        </form>
        {literal}
            <!-- live validation for response -->
            <script language="javascript" type="text/javascript">
                //needLiveValidation('user_reply',Array('Presence'));
            </script>
            <!-- live validation end here -->
        {/literal}
    {/if}

	{if $myobj->isShowPageBlock('cancel_option_to_Answer')}
		{if $myobj->hasReply($myobj->getFormField('ans_id'))}
			<div class="clsClearfix clsDetailsComments">
				<div id="selViewReplyId{$myobj->getFormField('ans_id')}" class="clsViewReplies">{$myobj->fetchReply($myobj->getFormField('ans_id'))}</div>
			</div>
		{/if}
    {/if}

	{if $myobj->isShowPageBlock('post_your_answer')}
		{if $myobj->getFormField('user_reply')}
            {if $myobj->hasReply($myobj->getFormField('ans_id'))}
            	<div class="clsClearfix clsDetailsComments">
                  <div id="selViewReplyId{$myobj->getFormField('ans_id')}" class="clsViewReplies">{$myobj->fetchReply($myobj->getFormField('ans_id'))}</div>
                </div>
            {/if}
        {/if}
    {/if}

    {if $myobj->isShowPageBlock('delete_replies')}
        {if $myobj->hasReply($myobj->getFormField('main_ans_id'))}
        	<div class="clsClearfix clsDetailsComments">
				<div id="selViewReplyId{$myobj->getFormField('ans_id')}" class="clsViewReplies">{$myobj->fetchReply($myobj->getFormField('ans_id'))}</div>
			</div>
        {/if}
    {/if}

{else}
	Session Expired. <a href="{$CFG.auth.login_url}?r">Login to continue..!</a>
{/if}