<div id="selListDebates" class="clsAskDebate">
 <div class="clsClearfix clsProfilePageDetails">
  <div class="clsForumTitleHeading clsFloatleft">
	<h2>
    {if $myobj->getFormField('so') == 'adv'}
  		{$myobj->search_home}
	{elseif $myobj->getFormField('cat') != ''}
		{$myobj->dir_title}
	{else}
		{$myobj->title}
    {/if}
    </h2>
   </div>
  <div class="clsFloatRight">
  {if $myobj->getFormField('view') neq 'search' && $myobj->getFormField('so') neq 'adv' }
     {$myobj->displayDebatesTopLinks()}
	 {else}
  {/if}
  </div>
 </div>




{include file='../general/information.tpl'}

  <!-- Confirmation Div -->


  <div id="selShowDebates" class="">

{if $myobj->isShowPageBlock('form_advanced_search')}

    <form name="formAdvanceSearch" id="formAdvanceSearch" method="post" action="{$myobj->form_advanced_search.form_action}">

     <div class="clsShadedBg">
	  <div class="lbtopanalyst">
    <div class="rbtopanalyst">
    <div class="bbtopanalyst">
    <div class="blctopanalyst">
    <div class="brctopanalyst">
    <div class="tbtopanalyst">
    <div class="tlctopanalyst">
    <div class="trctopanalyst">

	<div id="selMsgConfirm" class="selMsgConfirm" style="display:none; position:absolute;">
    <form name="formConfirm" id="formConfirm" method="post" action="{$myobj->getCurrentUrl()}">
      <p id="confirmMessage"></p>
      <table summary="{$LANG.container_to_get_confirmation}" class="clsAlignCenter">
        <tr>
          <td><input type="button" class="clsPopSubmitButton" name="confirm_action" id="confirm_action" value="{$LANG.common_yes_option}" tabindex="{smartyTabIndex}" onClick="hideAllBlocks(); doRemoveAction();"/>
            &nbsp;
            <input type="button" class="clsPopCancelButton" name="cancel" id="cancel" value="{$LANG.common_no_option}" tabindex="{smartyTabIndex}" onClick="return hideAllBlocks();" />
          </td>
        </tr>
      </table>
      <input type="hidden" name="action" />
    </form>
  </div>
      <div id="moreSearchOptions">
        <table summary="{$LANG.common_displaying_more_search_options}" class="clsAskQuestion">
          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('more_debates')}"><label for="more_debates">{$LANG.debates_search_debate}</label>
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('more_debates')}">{$myobj->getFormFieldErrorTip('more_debates')}
              <input type="text" class="clsCommonTextBox" name="more_debates" id="more_debates" value="{$myobj->getFormField('more_debates')}" tabindex="{smartyTabIndex}" />
            </td>
        </tr>
        <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('dname')}"><label for="dname">{$LANG.debate_search_type_username}</label>
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('dname')}">{$myobj->getFormFieldErrorTip('dname')}
              <p><input type="text" class="clsCommonTextBox" name="dname" id="dname" value="{$myobj->getFormField('dname')}" tabindex="{smartyTabIndex}" /></p>
			</td>
          </tr>
          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('tags')}"><label for="tags">{$LANG.search_type_tags}</label>
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('tags')}">{$myobj->getFormFieldErrorTip('tags')}
              <input type="text" class="clsCommonTextBox" name="tags" id="tags" value="{$myobj->getFormField('tags')}" tabindex="{smartyTabIndex}" />
            </td>
          </tr>
          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('type')}"><label for="type">{$LANG.debates_search_type}</label>
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('type')}">{$myobj->getFormFieldErrorTip('type')}
              <select name="type" id="type" tabindex="{smartyTabIndex}">
                {$myobj->generalPopulateArray($myobj->form_advanced_search.populateDebateType_arr, $myobj->getFormField('type'))}
              </select>
            </td>
          </tr>
          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('cat_id')}"><label for="cat_id">{$LANG.debates_select_category}</label></td>
            <td class="{$myobj->getCSSFormFieldCellClass('cat_id')}">{$myobj->getFormFieldErrorTip('cat_id')}
              <select class="clsCommonListBox" name="cat_id" id="cat_id" tabindex="{smartyTabIndex}">
                <option value="">{$LANG.debates_chose_category}</option>
                 {$myobj->generalPopulateArray($myobj->populateCategories_arr, $myobj->getFormField('category'))}
              </select>
            </td>
        </tr>

		  <tr>

	{if chkIsVideoAllowed('debate') or chkIsAudioallowed('debate')}
            <td class="{$myobj->getCSSFormLabelCellClass('video')}">
				<label for="video">{$LANG.debates_with}</label>
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('video')}">{$myobj->getFormFieldErrorTip('video')}
              {if chkIsVideoAllowed('debate')}
	              <input type="checkbox" class="clsCheckRadio" name="video" id="video" tabindex="{smartyTabIndex}" {$myobj->isCheckedCheckBox('video')} />
	              <label for="video">{$LANG.video}</label>
              {/if}
              {if chkIsAudioallowed('debate')}
	              <input type="checkbox" class="clsCheckRadio" name="audio" id="audio" tabindex="{smartyTabIndex}" {$myobj->isCheckedCheckBox('audio')} />
    	          <label for="audio">{$LANG.audio}</label>
              {/if}
            </td>
	{else}
            <td colspan="2" class="{$myobj->getCSSFormLabelCellClass('video')}"></td>
	{/if}

          </tr>

          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('total_response_from')}"><label for="total_response_from">{$LANG.total_response_from}</label></td>
            <td class="{$myobj->getCSSFormFieldCellClass('total_response_from')}">{$myobj->getFormFieldErrorTip('total_response_from')}
                <input type="text" class="clsCommonNumberTextBox" name="total_response_from" id="total_response_from" value="{$myobj->getFormField('total_response_from')}" tabindex="{smartyTabIndex}" />
                 {$LANG.and}
                <input type="text" class="clsCommonNumberTextBox" name="total_response_to" id="total_response_to" value="{$myobj->getFormField('total_response_to')}" tabindex="{smartyTabIndex}" />
			</td>
          </tr>
		  <tr>
			<td class="{$myobj->getCSSFormLabelCellClass('date_limits_to')}"><label for="date_limits_to">{$LANG.date_limits_to}</label></td>
			<td class="{$myobj->getCSSFormFieldCellClass('date_limits_to')}">{$myobj->getFormFieldErrorTip('date_limits_to')}
			<select name="date_limits_to" id="date_limits_to" tabindex="{smartyTabIndex}">
					{$myobj->generalPopulateArray($myobj->searchOption_arr, $myobj->getFormField('date_limits_to'))}
			</select>
			</td>
		</tr>
		<tr>
			<td></td>
			<td colspan="2">
				<div class="clsSubmitLeft">
					<div class="clsSubmitRight">
		    			<input type="submit" class="clsSubmitButton clsMediumSubmitButton" name="adv_search" id="adv_search" tabindex="{smartyTabIndex}" value="{$LANG.search}" />
					</div>
			  </div>
			  <div class="clsCancelLeft">
					<div class="clsCancelRight">
						<input type="reset" class="clsCancelButton" name="reset" id="reset" tabindex="{smartyTabIndex}" value="{$LANG.common_reset}" />
					</div>
		      </div>
			</td>
		</tr>
        </table>
      </div>

        </div> </div> </div> </div> </div> </div> </div> </div>
		</div>
    </form>

{/if}

<!--{if $myobj->isShowPageBlock('form_open') OR $myobj->isShowPageBlock('form_resolved') OR $myobj->isShowPageBlock('form_search_results') OR $myobj->isShowPageBlock('form_best')  || $myobj->isShowPageBlock('form_popular') || $myobj->isShowPageBlock('form_featured') || $myobj->isShowPageBlock('form_favourite') || $myobj->isShowPageBlock('form_recent')}
  {if !$myobj->isShowPageBlock('form_search_results') AND $myobj->isResultsFound() AND !$myobj->isShowPageBlock('form_best')}
        <div class="clsViewBy clsViewByDebates">
         <div class="clsViewHeading clsDebatesViewHeading"> <h3>{$LANG.debates_view_by}</h3></div>
          <ul>
            <li class="{$myobj->displayAllDebates_arr.dateOrderClass}"><a {$myobj->displayAllDebates_arr.date_alt} class="{$myobj->displayAllDebates_arr.clsDate}" href="{$myobj->displayAllDebates_arr.view_debates_by_date.url}">{$LANG.debates_view_by_date}</a></li>
            <li class="{$myobj->displayAllDebates_arr.ansOrderClass} clsNoBorder"><a {$myobj->displayAllDebates_arr.ans_alt} class="{$myobj->displayAllDebates_arr.clsAnswer}" href="{$myobj->displayAllDebates_arr.view_debates_by_responses.url}">{$LANG.debates_view_by_responses}</a></li>
          </ul>
        </div>
    {/if}
   {/if}-->


{if $myobj->isShowPageBlock('form_open') OR $myobj->isShowPageBlock('form_resolved') OR $myobj->isShowPageBlock('form_search_results') OR $myobj->isShowPageBlock('form_best')  || $myobj->isShowPageBlock('form_popular') || $myobj->isShowPageBlock('form_featured') || $myobj->isShowPageBlock('form_favourite') || $myobj->isShowPageBlock('form_recent')}
    <div class="clsDebateMain">
<div class="clsShadedBg">
			  <div class="lbtopanalyst">
			    <div class="rbtopanalyst">
			      <div class="bbtopanalyst">
			        <div class="blctopanalyst">
			          <div class="brctopanalyst">
			            <div class="tbtopanalyst">
			              <div class="tlctopanalyst">
			                <div class="trctopanalyst">
					<!--{if !$myobj->isShowPageBlock('form_search_results')  AND !$myobj->isShowPageBlock('form_best')}
						<div id="selQuickLinks" class="clsQuestionsLink">
							<ul class="">
							<li class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.openQuestionsLI}"><span class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.openQuestionsSPAN}"><a class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.openQuestionsA}" href="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.open_debates.url}">{$LANG.debates_open}</a></span></li>
							<li class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.resolvedQuestionsLI}"><span class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.resolvedQuestionsSPAN}"><a class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.resolvedQuestionsA}" href="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.resolved_debates.url}">{$LANG.debates_resolved}</a></span></li>
							<li class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.recentQuestionsLI}"><span class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.recentQuestionsSPAN}"><a class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.recentQuestionsA}" href="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.recent_debates.url}">{$LANG.debates_recent}</a></span></li>
							<li class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.popularQuestionsLI}"><span class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.popularQuestionsSPAN}"><a class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.popularQuestionsA}" href="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.popular_debates.url}">{$LANG.debates_popular}</a></span></li>
							<li class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.featuredQuestionsLI}"><span class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.featuredQuestionsSPAN}"><a class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.featuredQuestionsA}" href="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.featured_debates.url}">{$LANG.debates_featured}</a></span></li>
							<li class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.favouriteQuestionsLI}"><span class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.favouriteQuestionsSPAN}"><a class="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.favouriteQuestionsA}" href="{$myobj->displayAllDebates_arr.displayOpenAndResolvedLinks_arr.favourite_debates.url}">{$LANG.debates_favourite}</a></span></li>
						  </ul>
						</div>
					{/if}-->


					{if $myobj->isResultsFound()}
						{if $CFG.admin.navigation.top}
							{include file='../general/pagination.tpl'}
						{/if}

						{foreach key=dadrKey item=dadrValue from=$myobj->displayAllDebates_arr.results}
						 <!-- sel users debate start from here -->
                           <div class="clsBlogDisplay clsUserThumbDetails">
								<div class="{$dadrValue.clsOddOrEvenDebate} clsUsersDebate">
									<!-- sel debate display start from here -->
									<div id="selDisplayDebate">
										<!--  start of chart-->
										<div class="shadow clsPieChart">
										  	<div id="example">
										      	<div class="pie {$dadrValue.size}"></div>
												<div class="clsSmallPercentage">
													<div class="clsForPercentage">{$dadrValue.debateRatio_for}</div>
												 	<div class="clsAgainstPercentage">{$dadrValue.debateRatio_againsts}</div>
                                            	</div>
										  	</div>
										</div>
										<!--  end of chart-->
                                        <div class="clsUserDetails">
                                         <p class="clsDebateLink" {$dadrValue.boldClass}>
                                          <span class="clsQuestionLink clsNoBorder"><a href="{$dadrValue.debateUrl}">{$dadrValue.row_subject_manual}</a></span>
                                         </p>
										<!-- sel debate description start from here -->
										 <div id="selDebateDescription">
											<p class="clsDebateDescription">
												{$dadrValue.row_description_manual}
											</p>

                                            <div class="clsClearfix clsUserSubLinks">
                                             <div class="clsUserUploaded clsNoLeftBgPadngMrgn">
                                              {if chkIsVideoAllowed('debate') and $dadrValue.record.video_id}
                                                <span class="{$dadrValue.video_class}">
                                                    <a id="{$dadrValue.ans_view_video.id}" href="{$dadrValue.ans_view_video.url}" onClick="{$myobj->getBrowser($dadrValue.ans_view_video.id)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusvideo.gif" alt="{$LANG.debates_video_available}" title="{$LANG.debates_video_available}" /></a>
                                                </span>
                                              {/if}
                                            {if chkIsAudioallowed('debate') and $dadrValue.record.audio_id}
                                                <span class="{$dadrValue.audio_class}">
                                                    <a id="{$dadrValue.ans_view_audio.id}" href="{$dadrValue.ans_view_audio.url}" onClick="{$myobj->getBrowser($dadrValue.ans_view_audio.id)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusaudio.gif" alt="{$LANG.debates_audio_available}" title="{$LANG.debates_audio_available}" /></a>
                                                </span>
                                            {/if}
                                            </div>
  											<!-- category selection start from here -->
												<div id="selDebateCategory" class="clsUserLinkBy {if $dadrValue.record.video_id eq 0 and $dadrValue.record.audio_id eq 0}clsNoLeftBgPadngMrgn{/if}">
													{$myobj->showDebateCategoryName($dadrValue.cat_id)}
												</div>
												<!-- category selection end here -->
											<div id="selDebateUserDetails">
												<div class="clsVoteNowContainer">
													<div class="clsVoteLeft">
														<div class="clsNoBorder clsForumAuthor clsUserLinkBy">{$LANG.debates_created_by}</div>
                                                    	{if isUserImageAllowed()}
                                                     	<div class="clsUserLinkImage">
                                                     	{$myobj->displayProfileImage($dadrValue.record, 'tiny', false, false)}
														</div>
                                                     	{/if}
													<div class="clsUserLinkName clsNoLeftBgPadngMrgn">
                                                    	<a href="{$dadrValue.myanswers.url}">{$dadrValue.row_asked_by_manual}</a>
                                                    </div>
                                                    <div class="clsNoBorder clsDebateTime clsUserLinkDate">{$myobj->getTimeDiffernceFormat($dadrValue.record.date_asked)}</div>
												</div>
											</div>
										</div>
                                    </div>
								</div>
                            </div>
										<!-- sel debate description end here -->
							<div class="clsBlogCount">
								<div id="selResponseCountDetails">
									<p class="clsLastBlogInfo">
									<span>{math equation="against + for" against=$dadrValue.record.total_againsts for=$dadrValue.record.total_fors}</span>
									{$dadrValue.response_plural} {$dadrValue.video_audio_count}
									</p>
								</div>
							<div class="clsVoteRight">
								{if $dadrValue.record.is_open}
									{if isMember()}
										<div class="clsDebateCommentLeft">
											<div class="clsDebateCommentRight">
											<span class="clsFirstOne clsNoBorder"><a href="{$dadrValue.debateresponse.url}">{$LANG.debate_vote_now}</a></span>
											</div>
										</div>
									{else}
										<div class="clsDebateCommentLeft">
											<div class="clsDebateCommentRight">
											<span class="clsFirstOne clsNoBorder"><a href="{$dadrValue.debateresponse.url}" class="lightwindow">{$LANG.debate_vote_now}</a></span>
											</div>
										</div>
									{/if}
								{else}
									<div class="clsDebateCommentLeft">
										<div class="clsDebateCommentRight">
											<span class="clsFirstOne clsNoBorder clsResolvedDebate"><a href="{$dadrValue.debateresponse.url}">{$LANG.debate_resolved}</a></span>
										</div>
									</div>
								{/if}
							</div>
						</div>
					</div>
									<!-- sel debate display end here -->
					</div>
                   </div>
				<!-- sel users debate end here -->
				{/foreach}

				{if $CFG.admin.navigation.bottom}
					{include file='../general/pagination.tpl'}
				{/if}

				{else}
					<div class="clsDebateError"><div id="selMsgAlert">
						{if $myobj->isShowPageBlock('form_users_debates')}
							<p>{$LANG.debates_no_records}</p>
						{elseif $myobj->isShowPageBlock('form_search_results')}
							<p>{$myobj->displayAllDebates_arr.form_search_results.debate_no_search_results}</p>
							<p class="clsMsgAdditionalText">{$LANG.debate_check_your_spelling}</p>
							<p class="clsMsgAdditionalText"><a href="{$myobj->displayAllDebates_arr.form_search_results.ask_debates.url}">{$LANG.debates_search_ask}</a> {$LANG.debate_the_user_off} {$CFG.site.name}!</p>
						{else}
							<p>{$LANG.debates_no_records}</p>
						{/if}
						</div>
					</div>
				{/if}
				 </div>
				 </div>
			   </div>
			 </div>
		   </div>
		 </div>
	    </div>
	  </div>
	</div>
    </div>

{/if}

</div>
{if $myobj->isShowPageBlock('form_add')}
    {literal}
		<script language="javascript" type="text/javascript">
            var videoPreviewUrl = {/literal}'{$myobj->form_add.askDebate_arr.script_video_preview_url}'{literal};
			var audioPreviewUrl = {/literal}'{$myobj->form_add.askDebate_arr.script_audio_preview_url}'{literal};
        </script>
    {/literal}
    <form name="selFormCreateDebate" id="selFormCreateDebate" method="post" action="{$myobj->getCurrentUrl(true)}" autocomplete="off">
     {$myobj->populateHidden($myobj->form_add.askDebate_arr.hidden_arr)}
      <!-- sel create debate start from here -->
    <div class="clsDebateMain">
<div class="clsShadedBg">
			  <div class="lbtopanalyst">
			    <div class="rbtopanalyst">
			      <div class="bbtopanalyst">
			        <div class="blctopanalyst">
			          <div class="brctopanalyst">
			            <div class="tbtopanalyst">
			              <div class="tlctopanalyst">
			                <div class="trctopanalyst">
        <div id="selCreateDebate">
         <div class="clsClearfix">
          <div class="clsFloatleft">
		  {if $myobj->form_add.askDebate_arr.earn_points_details_info neq ''}
            <p class="clsEarnPoint clsDebaterEarnPoint">{$myobj->form_add.askDebate_arr.earn_points_details_info}</p>
		  {else}
			<p class="clsEarnPoint clsDebaterEarnPoint">&nbsp;</p>
		  {/if}
          </div>
         </div>
            <!-- sel debate category start from here -->
       <div class="clsCreateDebateMain" id="selDebateCtegory">
           <div class="clsSelectCategory clsDebateCategoryHead">{$LANG.debates_select_your_category}</div>
                <div id="selselectCategoryForDebate">
                      <div class="clsClearfix clsCreateDebateMain">
                        <div class="clsCreateDebateLeft">{$LANG.debates_select_category}</div>
                         <div class="clsCreateDebateRight">
                              {if $CFG.admin.debate_category.mandatory}
	                                <select name="category" id="category" class="clsSelectBox" tabindex="{smartyTabIndex}" {$myobj->form_add.askDebate_arr.focus_element} onchange="addNewStatusMessage(this); return call_ajax_populate_debate_sub_categories('{$CFG.site.url}{$CFG.admin.index.anova_module}/debate_ajax.php', 'new=1&t={smartyTabIndex}', 'subCatDiv');">
                                {else}
	                                <select name="category" id="category" tabindex="{smartyTabIndex}" {$myobj->form_add.askDebate_arr.focus_element} onchange="addNewStatusMessage(this); return call_ajax_populate_debate_sub_categories('{$CFG.site.url}debate_ajax.php', 'new=1&t={smartyTabIndex}','subCatDiv');">
                                {/if}
                                	    <option value="" selected>{$LANG.debates_chose_category}</option>
                                    	{$myobj->generalPopulateArray($myobj->populateCategories_arr, $myobj->getFormField('category'))}
                                	</select>
                                {$myobj->getFormFieldElementErrorTip('category', 'select')}
                             <div id="selGeneralCategory"></div>
                        </div>
                        <input type="hidden" name="new_status_hidden" id="new_status_hidden" />
                     </div>

                    <div class="clsClearfix">
                        <div class="clsCreateDebateLeft">{$LANG.debates_select_sub_category}</div>
                        <div id="subCatDiv" class="clsCreateDebateRight">
                                <select name="sub_category" id="sub_category" class="clsSelectBox" tabindex="{smartyTabIndex}" {$myobj->form_add.askDebate_arr.focus_element} onChange="addNewSubStatusMessage(this);" >
                                    <option value="">{$LANG.debates_chose_category}</option>
									{if $myobj->getFormField('category')}
                                  	  {$myobj->generalPopulateArray($myobj->populateSubCategories_arr, $myobj->getFormField('sub_category'))}
									{/if}
                                </select>
                               <input type="hidden" name="new_substatus_hidden" id="new_substatus_hidden" />
                            <input type="hidden" name="option_length" id="option_length" value="{$myobj->populateSubCategoriesCount($myobj->getFormField('category'), $myobj->getFormField('sub_category'))}" />
                          </div>
                       </div>
                 </div>
            </div>
            <!-- sel debate category end here -->

            <!-- sel debate subject start from here -->
            <div id="selDebateSubject" class="clsDebateSubject">
                {if !$myobj->getFormField('qid')}
                    <div class="clsDebateCategoryHead">{$LANG.debates_type_subject}</div>
                    <p class="clsZeroColour">{$LANG.debates_subject_description}</p>
                    <p class="clsZeroColour">{$LANG.debates_example}</p>
                {else}
                    <p class="clsZeroColour">{$LANG.debates_your_subject}</p>
                {/if}
                <p>
                    {if $myobj->getFormField('qid')}
	                    <input type="hidden" class="clsSubjectTextBox" name="subject" id="debate_subject" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('subject')}" />
                        <strong>{$myobj->form_add.askDebate_arr.subject_manual}</strong>
                    {else}
                    	{if $CFG.admin.debate_suggest.allowed}
							<input type="text" class="clsSubjectTextBox" name="subject" id="debate_subject" maxlength="250" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('subject')}" onkeypress="init();"  onkeyup="handleKeyUp(event)" />
							{$myobj->getFormFieldElementErrorTip('subject')}
                                <div id="scroll">
                                    <div id="suggest"></div>
                                </div>
                        {else}
                            <input type="text" class="clsSubjectTextBox" name="subject" id="debate_subject" maxlength="250" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('subject')}" />
                            {$myobj->getFormFieldElementErrorTip('subject')}
                        {/if}
                    {/if}
                </p>
            </div>
            <!-- sel debate subject end here -->

            <!-- sel debate explanation  start from here -->
            <div id="selDebateExplanation" class="clsDebateSubject">
                {if !$myobj->getFormField('qid')}
                    <div class="clsDebateCategoryHead">{$LANG.debates_subject_explanation}</div>
                    <p class="clsZeroColour">{$LANG.debates_subject_description}</p>
                    <p class="clsZeroColour">{$LANG.debates_example_explanation}</p>
                {else}
                    <p class="clsZeroColour">{$LANG.debates_your_subject_explanation}</p>
                {/if}

                {if $CFG.admin.debate_suggest.allowed AND !$myobj->getFormField('qid')}
                <p>
                    <textarea name="description" class="clsSubjectTextBox" id="debates_test_description" cols="200" rows="4" maxlength="{$CFG.admin.debate_description.limit}" tabindex="{smartyTabIndex}" onclick="hideSuggestions();" onKeyUp="updatelength(this); hideSuggestions();" >{$myobj->form_add.askDebate_arr.description_manual}</textarea>
                {else}
                    <textarea name="description" class="clsSubjectTextBox" id="debates_test_description" cols="200" rows="4" maxlength="{$CFG.admin.debate_description.limit}" tabindex="{smartyTabIndex}" onclick="updatelength(this);" onKeyUp="updatelength(this);" >{$myobj->form_add.askDebate_arr.description_manual}</textarea>
                 </p>
                {/if}
                {$myobj->getFormFieldElementErrorTip('description')}
                <div class="clsZeroColour">{$LANG.debates_total_charaters_entered} <span id="ss">0  (Limit {$CFG.admin.debate_description.limit})</span></div>
            </div>
            <!-- sel debate explanation end here -->

            <!-- sel debate audio video start from here -->
			{if chkIsVideoAllowed('debate')}
            <div class="clsDebateCategoryHead">Attachments</div>
   				<div class="clsVideoUpload clsDebateVideoSeperator" id="video_first" {$myobj->form_add.askDebate_arr.style_add_video}>
					<div class="clsVideoContainer">
					<a id="video_add" href="{$myobj->form_add.askDebate_arr.video_upload_url}" onClick="{$myobj->getBrowser('video_add')}"></a>
    				{$myobj->getFormFieldErrorTip('debate_video')}
					</div>
					<div class="clsVideoDetails">
						<a href="{$myobj->form_add.askDebate_arr.video_upload_url}" onClick="{$myobj->getBrowser('video_add')}">
							<p>{$LANG.common_record_video}</p>
							<p>{$LANG.common_using_webcams}</p>
						</a>
					</div>
				</div>

				<div class="clsAudioUpload" id="video_secnd" {if $myobj->form_add.askDebate_arr.style_add_video==''} style="display:none;" {/if}>
					<div class="clsAudioDetails clsAudioOptions">
						<div >
							<p class="clsAVDelete"><a {$myobj->form_add.askDebate_arr.style_delete_video} id="video_delete" href="{$myobj->getCurrentUrl()}" onClick="return confrimRemove('video', 'video_delete', '{$LANG.are_you_sure_to_delete}');">{$LANG.delete_video}</a></p>
							<p class="clsAVPreview"><a {$myobj->form_add.askDebate_arr.style_preview_video} id="video_preview" href="{$myobj->form_add.askDebate_arr.video_preview_url}" onClick="{$myobj->getBrowser('video_preview')}">{$LANG.preview_video}</a></p>
						</div>
					</div>
				</div>
			{/if}
			{if chkIsAudioAllowed('debate')}
				<div class="clsAudioUpload clsClearfix" id="audio_first" {$myobj->form_add.askDebate_arr.style_add_audio}>
					<div class="clsAudioContainer">
						<a id="audio_add" href="{$myobj->form_add.askDebate_arr.audio_upload_url}" onClick="{$myobj->getBrowser('audio_add')}"></a>
    					{$myobj->getFormFieldErrorTip('audio')}
					</div>
					<div class="clsAudioDetails">
						<div>
							<a href="{$myobj->form_add.askDebate_arr.audio_upload_url}" onClick="{$myobj->getBrowser('audio_add')}">
								<p>{$LANG.common_record_audio}</p>
								<p>{$LANG.common_using_recorder}</p>
							</a>
						</div>
					</div>
				</div>
				<div class="clsAudioUpload clsClearfix" id="audio_secnd" {if $myobj->form_add.askDebate_arr.style_add_audio==''} style="display:none;" {/if}>
					<div class="clsAudioDetails clsAudioOptions">
						<div >
							<p class="clsAVDelete"><a {$myobj->form_add.askDebate_arr.style_delete_audio} id="audio_delete" href="{$myobj->getCurrentUrl()}" onClick="return confrimRemove('audio', 'audio_delete', '{$LANG.are_you_sure_to_delete}');">{$LANG.delete_audio}</a></p>
							<p class="clsAVPreview"><a {$myobj->form_add.askDebate_arr.style_preview_audio} id="audio_preview" href="{$myobj->form_add.askDebate_arr.audio_preview_url}"  onClick="{$myobj->getBrowser('audio_preview')}">{$LANG.preview_audio}</a></p>
						</div>
					</div>
				</div>
			{/if}

            <!-- sel debate audio video end here -->

            <!-- sel debate tag start from here -->
            <div id="selDebatetag" class="clsDebateSubject">
                <div class="clsDebateCategoryHead">{$LANG.debates_enter_tags}:</div>
                <p>
                 <input type="text" class="clsSubjectTextBox" name="tags" id="tags" maxlength="250" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('tags')}" />
                </p>
                {$myobj->getFormFieldElementErrorTip('tags')}
                <p class="clsZeroColour">{$LANG.debates_subscribe_keywords_info} {$LANG.tag_size} {$LANG.debates_subscribe_keywords_invalid}</p>
            </div>
            <!-- sel debate tag end here -->

            <!-- sel debate publish  start from here -->
            {if $CFG.admin.response_publish_option.allowed AND !$CFG.admin.debate_auto_publish.allowed}
            <div id="selDebatePublish" class="clsDebateSubject">
                     <div class="clsDebateCategoryHead">{$LANG.debate_publish_allresponses}</div>
                     <p><input type="radio" class="clsCheckRadio" name="publish" id="status_yes" value="Yes"{$myobj->isCheckedRadio('publish', 'Yes')} /><label for="status_yes">{$LANG.common_yes_option}</label>
                    <input type="radio" class="clsCheckRadio" name="publish" id="status_no" value="No"{$myobj->isCheckedRadio('publish', 'No')} /><label for="status_no">{$LANG.common_no_option}</label></p>
                    <p class="clsZeroColour">{$LANG.msg_debates_publish_help}</p>
                </div>
            {/if}
            <!-- sel debate publish end here -->

            <!-- sel debate submit form  start from here -->
            <div id="selDebateSubmitForm" class="clsClearfix">
                <p>
                {if $myobj->getFormField('qid')}
                 <div class="clsSubmitLeft">
				   <div class="clsSubmitRight">
	                <input type="submit" class="clsSubmitButton clsMediumSubmitButton clsGetStarted" name="update_debate" id="update_debate" tabindex="{smartyTabIndex}" value="{$LANG.debates_update_button}" />
                   </div>
                 </div>
	                <input type="hidden" name="qid" id="qid" value="{$myobj->getFormField('qid')}" />
                {else}
                <div class="clsSubmitLeft">
				  <div class="clsSubmitRight">
	               <input type="submit" class="clsSubmitButton clsMediumSubmitButton clsGetStarted" name="submit" id="submit" tabindex="{smartyTabIndex}" value="{$LANG.debates_ask_button}" />                  </div>
                </div>
                {/if}
                <div class="clsCancelLeft">
				  <div class="clsCancelRight">
                   <input type="submit" class="clsCancelButton clsCancelDebate" name="cancel" id="cancel" tabindex="{smartyTabIndex}" value="{$LANG.common_cancel}" />
                  </div>
                </div>
                </p>
            </div>
            <!-- sel debate submit form end here -->
        </div>
		</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
       </div>
      <!-- sel create debate end here -->
    </form>
    {literal}
	    <script language="javascript">
		{/literal}
		{if !$myobj->getFormField('qid')}
		{literal}
			needLiveValidation('debate_subject',Array('Presence'));
		{/literal}
		{/if}
		{if $CFG.admin.debate_category.mandatory}
		{literal}
			needLiveValidation('category',Array('Presence'));
		{/literal}
		{/if}
		{if $CFG.admin.debate_description.mandatory}
		{literal}
			needLiveValidation('debates_test_description',Array('Presence'));
		{/literal}
		{/if}
		{literal}
		</script>
	{/literal}

{/if}
</div>